]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
ACPI: bounds check IRQ to prevent memory corruption
authorBjorn Helgaas <bjorn.helgaas@hp.com>
Fri, 1 Aug 2008 21:58:17 +0000 (15:58 -0600)
committerAndi Kleen <ak@linux.intel.com>
Fri, 15 Aug 2008 01:17:07 +0000 (03:17 +0200)
commitfa46d3526461e8aa7c0fb39cc1b98ac656695a43
tree0094d2a1ff5782cdf6f65dcdf8c7c54e0e1bded9
parentb635acec48bcaa9183fcbf4e3955616b0d4119b5
ACPI: bounds check IRQ to prevent memory corruption

acpi_penalize_isa_irq() should validate irq before using it to
index the acpi_irq_penalty[] table.

Here's the path I'm concerned about:

    pnpacpi_parse_allocated_irqresource()
    {
...
irq = acpi_register_gsi(gsi, triggering, polarity);
if (irq >= 0)
pcibios_penalize_isa_irq(irq, 1);

There's no guarantee that acpi_register_gsi() will return an IRQ
within the bounds of acpi_irq_penalty[].

I have not seen a failure I can attribute to this.  However,
ACPI_MAX_IRQS is only 256, and I'm pretty sure ia64 can have
IRQs larger than that.

I think this should go in 2.6.27.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
drivers/acpi/pci_link.c