mirror of https://gitee.com/openkylin/linux.git
x86, efi: Check table header length in efi_bgrt_init()
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>
This commit is contained in:
parent
89d16665d3
commit
5d6d578c17
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue