OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
89d1666
)
x86, efi: Check table header length in efi_bgrt_init()
author
Jan Beulich
<JBeulich@suse.com>
Wed, 7 Nov 2012 16:46:08 +0000
(16:46 +0000)
committer
H. Peter Anvin
<hpa@linux.intel.com>
Wed, 14 Nov 2012 16:49:34 +0000
(08:49 -0800)
Header length should be validated for all ACPI tables before accessing
any non-header field.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Link:
http://lkml.kernel.org/r/509A9E6002000078000A7079@nat28.tlf.novell.com
Acked-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
arch/x86/platform/efi/efi-bgrt.c
patch
|
blob
|
history
diff --git
a/arch/x86/platform/efi/efi-bgrt.c
b/arch/x86/platform/efi/efi-bgrt.c
index
f6a0c1b
..
d9c1b95
100644
(file)
--- a/
arch/x86/platform/efi/efi-bgrt.c
+++ b/
arch/x86/platform/efi/efi-bgrt.c
@@
-39,6
+39,8
@@
void efi_bgrt_init(void)
if (ACPI_FAILURE(status))
return;
+ if (bgrt_tab->header.length < sizeof(*bgrt_tab))
+ return;
if (bgrt_tab->version != 1)
return;
if (bgrt_tab->image_type != 0 || !bgrt_tab->image_address)