android_kernel_oneplus_msm8998/arch
Dianzhang Chen 85707634a0 x86/tls: Fix possible spectre-v1 in do_get_thread_area()
commit 993773d11d45c90cb1c6481c2638c3d9f092ea5b upstream.

The index to access the threads tls array is controlled by userspace
via syscall: sys_ptrace(), hence leading to a potential exploitation
of the Spectre variant 1 vulnerability.

The index can be controlled from:
        ptrace -> arch_ptrace -> do_get_thread_area.

Fix this by sanitizing the user supplied index before using it to access
the p->thread.tls_array.

Signed-off-by: Dianzhang Chen <dianzhangchen0@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: bp@alien8.de
Cc: hpa@zytor.com
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/1561524630-3642-1-git-send-email-dianzhangchen0@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-21 09:07:09 +02:00
..
alpha alpha: Fix Eiger NR_IRQS to 128 2019-02-20 10:13:22 +01:00
arc ARC: handle gcc generated __builtin_trap for older compiler 2019-07-10 09:56:44 +02:00
arm ARM: davinci: da8xx: specify dma_coherent_mask for lcdc 2019-07-21 09:07:08 +02:00
arm64 arm64, vdso: Define vdso_{start,end} as array 2019-07-10 09:56:44 +02:00
avr32
blackfin
c6x
cris mm: replace get_user_pages() write/force parameters with gup_flags 2018-12-17 21:55:16 +01:00
frv
h8300 h8300: use cc-cross-prefix instead of hardcoding h8300-unknown-linux- 2019-04-27 09:33:48 +02:00
hexagon hexagon: modify ffs() and fls() to return int 2018-10-10 08:52:12 +02:00
ia64 bug.h: work around GCC PR82365 in BUG() 2019-07-10 09:56:42 +02:00
m32r
m68k bug.h: work around GCC PR82365 in BUG() 2019-07-10 09:56:42 +02:00
metag
microblaze
mips MIPS: Workaround GCC __builtin_unreachable reordering bug 2019-07-10 09:56:42 +02:00
mn10300
nios2
openrisc
parisc parisc: Fix compiler warnings in float emulation code 2019-07-10 09:56:31 +02:00
powerpc KVM: PPC: Book3S: Use new mutex to synchronize access to rtas token list 2019-06-22 08:18:26 +02:00
s390 KVM: s390: fix memory slot handling for KVM_SET_USER_MEMORY_REGION 2019-06-22 08:18:23 +02:00
score
sh mm: replace get_user_pages_unlocked() write/force parameters with gup_flags 2018-12-17 21:55:16 +01:00
sparc bug.h: work around GCC PR82365 in BUG() 2019-07-10 09:56:42 +02:00
tile
um um: Compile with modern headers 2019-07-10 09:56:39 +02:00
unicore32
x86 x86/tls: Fix possible spectre-v1 in do_get_thread_area() 2019-07-21 09:07:09 +02:00
xtensa xtensa: fix return_address 2019-04-27 09:33:56 +02:00
.gitignore
Kconfig