linux/arch/x86/entry
Dan Williams 2fbd7af5af x86/syscall: Sanitize syscall table de-references under speculation
The syscall table base is a user controlled function pointer in kernel
space. Use array_index_nospec() to prevent any out of bounds speculation.

While retpoline prevents speculating into a userspace directed target it
does not stop the pointer de-reference, the concern is leaking memory
relative to the syscall table base, by observing instruction cache
behavior.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-arch@vger.kernel.org
Cc: kernel-hardening@lists.openwall.com
Cc: gregkh@linuxfoundation.org
Cc: Andy Lutomirski <luto@kernel.org>
Cc: alan@linux.intel.com
Link: https://lkml.kernel.org/r/151727417984.33451.1216731042505722161.stgit@dwillia2-desk3.amr.corp.intel.com
2018-01-30 21:54:31 +01:00
..
syscalls Merge branch 'x86/build' into x86/asm, to fix up conflicts 2017-11-07 10:54:30 +01:00
vdso Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-12-06 17:47:29 -08:00
vsyscall x86/pti: Map the vsyscall page if needed 2017-12-23 21:13:00 +01:00
calling.h x86/pti: Fix !PCID and sanitize defines 2018-01-14 10:45:53 +01:00
common.c x86/syscall: Sanitize syscall table de-references under speculation 2018-01-30 21:54:31 +01:00
entry_32.S x86/retpoline: Simplify vmexit_fill_RSB() 2018-01-27 19:10:45 +01:00
entry_64_compat.S x86/pti: Switch to kernel CR3 at early in entry_SYSCALL_compat() 2018-01-03 23:19:32 +01:00
entry_64.S x86/entry/64: Push extra regs right away 2018-01-30 15:30:36 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
syscall_32.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
syscall_64.c x86/entry/64: Remove the SYSCALL64 fast path 2018-01-30 15:30:36 +01:00
thunk_32.S x86: move exports to actual definitions 2016-08-07 23:47:15 -04:00
thunk_64.S x86: move exports to actual definitions 2016-08-07 23:47:15 -04:00