From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Malcolm Crossley <malcolm.crossley@citrix.com>
Cc: JBeulich@suse.com, xen-devel@lists.xen.org
Subject: Re: [PATCH] ACPI: Prevent acpi_table_entries from falling into a infinite loop
Date: Tue, 3 Jun 2014 15:54:57 +0100 [thread overview]
Message-ID: <538DE1C1.7090503@citrix.com> (raw)
In-Reply-To: <af3b2493951c2e5b3ad2.1401807098@malcolmc.uk.xensource.com>
On 03/06/14 15:51, Malcolm Crossley wrote:
> If a buggy BIOS programs an ACPI table with entry length 0 then
> acpi_table_entries gets stuck in an infinite loop.
>
> To aid debugging, report the error and exit the loop.
>
> Signed-off-by: Malcolm Crossley <malcolm.crossley@citrix.com>
Could you put a reference to the Linux commit in the message?
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
>
> diff -r 4708591d8aa8 -r af3b2493951c xen/drivers/acpi/tables.c
> --- a/xen/drivers/acpi/tables.c
> +++ b/xen/drivers/acpi/tables.c
> @@ -238,6 +238,12 @@ acpi_table_parse_entries(char *id,
> if (handler(entry, table_end))
> return -EINVAL;
>
> + if (entry->length == 0) {
> + printk(KERN_ERR PREFIX "[%4.4s:0x%02x] Invalid zero length\n",
> + id, entry_id);
> + return -EINVAL;
> + }
> +
> entry = (struct acpi_subtable_header *)
> ((unsigned long)entry + entry->length);
> }
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2014-06-03 14:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-03 14:51 [PATCH] ACPI: Prevent acpi_table_entries from falling into a infinite loop Malcolm Crossley
2014-06-03 14:54 ` Andrew Cooper [this message]
2014-06-03 15:51 ` Jan Beulich
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=538DE1C1.7090503@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=malcolm.crossley@citrix.com \
--cc=xen-devel@lists.xen.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.