]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86/acpi: Prevent out of bound access caused by broken ACPI tables
authorSeunghun Han <kkamagui@gmail.com>
Tue, 18 Jul 2017 11:03:51 +0000 (20:03 +0900)
committerTim Tianyang Chen <tianyang.chen@oracle.com>
Wed, 23 Aug 2017 23:30:05 +0000 (16:30 -0700)
commita02187d44cde5207fdd22b4b80f63e1618e6aa40
treea73fb33293618ee6537e6e5581547c87b3048dac
parent6778dab894f7a87148981c1d6f95147229d6a6a1
x86/acpi: Prevent out of bound access caused by broken ACPI tables

The bus_irq argument of mp_override_legacy_irq() is used as the index into
the isa_irq_to_gsi[] array. The bus_irq argument originates from
ACPI_MADT_TYPE_IO_APIC and ACPI_MADT_TYPE_INTERRUPT items in the ACPI
tables, but is nowhere sanity checked.

That allows broken or malicious ACPI tables to overwrite memory, which
might cause malfunction, panic or arbitrary code execution.

Add a sanity check and emit a warning when that triggers.

[ tglx: Added warning and rewrote changelog ]

Signed-off-by: Seunghun Han <kkamagui@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: security@kernel.org
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: stable@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
(cherry picked from commit dad5ab0db8deac535d03e3fe3d8f2892173fa6a4)

Orabug: 26540612
CVE: CVE-2017-11473

Signed-off-by: Tim Tianyang Chen <tianyang.chen@oracle.com>
Reviewed-by: Jack Vogel <jack.vogel@oracle.com>
arch/x86/kernel/acpi/boot.c