From: tip-bot for Jan Beulich <JBeulich@suse.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
jbeulich@suse.com, matt.fleming@intel.com, JBeulich@suse.com,
tglx@linutronix.de, hpa@linux.intel.com
Subject: [tip:core/efi] x86, efi: Check table header length in efi_bgrt_init()
Date: Wed, 14 Nov 2012 09:34:23 -0800 [thread overview]
Message-ID: <tip-5d6d578c170bb280db5d4779f666e456f4f82ec5@git.kernel.org> (raw)
In-Reply-To: <509A9E6002000078000A7079@nat28.tlf.novell.com>
Commit-ID: 5d6d578c170bb280db5d4779f666e456f4f82ec5
Gitweb: http://git.kernel.org/tip/5d6d578c170bb280db5d4779f666e456f4f82ec5
Author: Jan Beulich <JBeulich@suse.com>
AuthorDate: Wed, 7 Nov 2012 16:46:08 +0000
Committer: H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Wed, 14 Nov 2012 08:49:34 -0800
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>
---
arch/x86/platform/efi/efi-bgrt.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/x86/platform/efi/efi-bgrt.c b/arch/x86/platform/efi/efi-bgrt.c
index f6a0c1b..d9c1b95 100644
--- 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)
parent reply other threads:[~2012-11-14 17:34 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <509A9E6002000078000A7079@nat28.tlf.novell.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-5d6d578c170bb280db5d4779f666e456f4f82ec5@git.kernel.org \
--to=jbeulich@suse.com \
--cc=hpa@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=matt.fleming@intel.com \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome