android_kernel_samsung_msm8976/arch/x86/kernel
Seunghun Han 94bee3919a 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>
CVE-2017-11473

Change-Id: I06eeb72e3207d795a87279ecfdd362e361f505f7
2019-07-27 21:51:30 +02:00
..
acpi x86/acpi: Prevent out of bound access caused by broken ACPI tables 2019-07-27 21:51:30 +02:00
apic x86/apic: Serialize LVTT and TSC_DEADLINE writes 2015-10-22 14:37:49 -07:00
cpu x86/MCE: Serialize sysfs changes 2019-07-27 21:51:20 +02:00
kprobes ftrace/jprobes/x86: Fix conflict between jprobes and function graph tracing 2015-01-27 07:52:32 -08:00
.gitignore
Makefile x86_64: add KASan support 2015-05-04 14:03:57 -07:00
alternative.c
amd_gart_64.c
amd_nb.c
apb_timer.c
aperture_64.c
apm_32.c
asm-offsets.c
asm-offsets_32.c
asm-offsets_64.c
audit_64.c
bootflag.c
check.c
cpuid.c
crash.c
crash_dump_32.c
crash_dump_64.c
devicetree.c
doublefault_32.c
dumpstack.c x86_64: add KASan support 2015-05-04 14:03:57 -07:00
dumpstack_32.c
dumpstack_64.c x86_64, traps: Stop using IST for #SS 2014-12-06 15:05:46 -08:00
e820.c
early-quirks.c x86: Adjust irq remapping quirk for older revisions of 5500/5520 chipsets 2014-04-26 17:15:34 -07:00
early_printk.c
entry_32.S x86, espfix: Make it possible to disable 16-bit support 2014-08-07 14:30:26 -07:00
entry_64.S x86/asm/entry/64: Remove a bogus 'ret_from_fork' optimization 2015-03-18 13:22:28 +01:00
espfix_64.c x86/espfix/xen: Fix allocation of pages for paravirt page tables 2014-08-07 14:30:27 -07:00
ftrace.c ftrace/x86: One more missing sync after fixup of function modification failure 2014-05-06 07:55:28 -07:00
head.c
head32.c
head64.c This is the 3.10.98 stable release 2017-04-18 17:17:24 +02:00
head_32.S x86/asm/irq: Stop relying on magic JMP behavior for early_idt_handlers 2016-02-25 11:57:49 -08:00
head_64.S This is the 3.10.98 stable release 2017-04-18 17:17:24 +02:00
hpet.c
hw_breakpoint.c
i386_ksyms_32.c
i387.c x86, fpu: Check tsk_used_math() in kernel_fpu_end() for eager FPU 2014-03-23 21:38:19 -07:00
i8237.c
i8253.c
i8259.c
io_delay.c
ioport.c x86/iopl: Fix iopl capability check on Xen PV 2016-06-07 10:42:44 +02:00
irq.c
irq_32.c
irq_64.c
irq_work.c
irqinit.c
jump_label.c
kdebugfs.c
kgdb.c
kvm.c x86, kvm: Clear paravirt_enabled on KVM guests for espfix32's benefit 2015-01-08 09:58:15 -08:00
kvmclock.c x86, kvm: Clear paravirt_enabled on KVM guests for espfix32's benefit 2015-01-08 09:58:15 -08:00
ldt.c x86, espfix: Make it possible to disable 16-bit support 2014-08-07 14:30:26 -07:00
machine_kexec_32.c
machine_kexec_64.c
microcode_amd.c
microcode_core.c
microcode_core_early.c
microcode_intel.c
microcode_intel_early.c x86/microcode/intel: Guard against stack overflow in the loader 2015-07-03 19:48:09 -07:00
microcode_intel_lib.c
mmconf-fam10h_64.c
module.c x86, kaslr: randomize module base load address 2015-12-08 23:47:16 -08:00
mpparse.c
msr.c
nmi.c
nmi_selftest.c
paravirt-spinlocks.c
paravirt.c
paravirt_patch_32.c
paravirt_patch_64.c x86_64/entry/xen: Do not invoke espfix64 on Xen 2014-08-07 14:30:26 -07:00
pci-calgary_64.c
pci-dma.c x86: dma-mapping: fix GFP_ATOMIC macro usage 2014-03-06 21:30:08 -08:00
pci-iommu_table.c
pci-nommu.c
pci-swiotlb.c
pcspeaker.c
perf_regs.c
probe_roms.c
process.c Merge upstream linux-stable v3.10.28 into msm-3.10 2014-03-24 14:28:34 -07:00
process_32.c x86, flags: Rename X86_EFLAGS_BIT1 to X86_EFLAGS_FIXED 2014-11-14 08:47:54 -08:00
process_64.c x86/iopl/64: Properly context-switch IOPL on Xen PV 2016-06-07 10:42:43 +02:00
ptrace.c x86, x32, audit: Fix x32's AUDIT_ARCH wrt audit 2014-11-21 09:22:52 -08:00
pvclock.c
quirks.c x86/amd/numa: Fix northbridge quirk to assign correct NUMA node 2014-03-23 21:38:15 -07:00
reboot.c This is the 3.10.96 stable release 2017-04-18 17:16:02 +02:00
reboot_fixups_32.c
relocate_kernel_32.S
relocate_kernel_64.S
resource.c x86: don't exclude low BIOS area when allocating address space for non-PCI cards 2014-09-05 16:28:36 -07:00
rtc.c
setup.c This is the 3.10.94 stable release 2017-04-18 17:12:56 +02:00
setup_percpu.c
signal.c x86/signal: Fix restart_syscall number for x32 tasks 2016-01-28 21:49:28 -08:00
smp.c
smpboot.c sched: Fix unreleased llc_shared_mask bit during CPU hotplug 2014-10-05 14:54:14 -07:00
stacktrace.c
step.c
sys_x86_64.c mm: larger stack guard gap, between vmas 2017-07-11 00:00:39 +00:00
syscall_32.c
syscall_64.c
tboot.c
tce_64.c
test_nx.c
test_rodata.c
time.c
tls.c x86, tls: Interpret an all-zero struct user_desc as "no segment" 2015-01-29 17:40:56 -08:00
tls.h
topology.c
trace_clock.c
traps.c x86/asm/traps: Disable tracing and kprobes in fixup_bad_iret and sync_regs 2015-01-29 17:40:56 -08:00
tsc.c x86/platform: Fix Geode LX timekeeping in the generic x86 build 2015-10-22 14:37:49 -07:00
tsc_sync.c
uprobes.c
verify_cpu.S x86/cpu: Call verify_cpu() after having entered long mode too 2015-12-09 13:40:08 -05:00
vm86_32.c
vmlinux.lds.S
vsmp_64.c
vsyscall_64.c x86_64/vsyscall: Fix warn_bad_vsyscall log output 2014-09-05 16:28:36 -07:00
vsyscall_emu_64.S
vsyscall_trace.h
x86_init.c
x8664_ksyms_64.c x86_64: kasan: add interceptors for memset/memmove/memcpy functions 2015-05-04 14:03:56 -07:00
xsave.c x86/fpu: Avoid math_state_restore() without used_math() in __restore_xstate_sig() 2015-03-26 15:01:00 +01:00