android_kernel_oneplus_msm8998/arch/x86/entry/vdso
Mathias Krause f1c5d01635 x86/vdso: Ensure vdso32_enabled gets set to valid values only
commit c06989da39cdb10604d572c8c7ea8c8c97f3c483 upstream.

vdso_enabled can be set to arbitrary integer values via the kernel command
line 'vdso32=' parameter or via 'sysctl abi.vsyscall32'.

load_vdso32() only maps VDSO if vdso_enabled == 1, but ARCH_DLINFO_IA32
merily checks for vdso_enabled != 0. As a consequence the AT_SYSINFO_EHDR
auxiliary vector for the VDSO_ENTRY is emitted with a NULL pointer which
causes a segfault when the application tries to use the VDSO.

Restrict the valid arguments on the command line and the sysctl to 0 and 1.

Fixes: b0b49f2673 ("x86, vdso: Remove compat vdso support")
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Acked-by: Andy Lutomirski <luto@amacapital.net>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Roland McGrath <roland@redhat.com>
Link: http://lkml.kernel.org/r/1491424561-7187-1-git-send-email-minipli@googlemail.com
Link: http://lkml.kernel.org/r/20170410151723.518412863@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-21 09:30:05 +02:00
..
vdso32 x86/entry: Restore traditional SYSENTER calling convention 2015-12-21 16:05:01 +01:00
.gitignore
checkundef.sh
Makefile x86/vdso: Define BUILD_VDSO while building and emit .eh_frame in asm 2015-10-09 09:41:05 +02:00
vclock_gettime.c x86/asm/tsc: Add rdtsc_ordered() and use it in trivial call sites 2015-07-06 15:23:29 +02:00
vdso-layout.lds.S
vdso-note.S
vdso.lds.S
vdso2c.c x86/vdso/32: Save extra registers in the INT80 vsyscall path 2015-10-09 09:41:06 +02:00
vdso2c.h
vdso32-setup.c x86/vdso: Ensure vdso32_enabled gets set to valid values only 2017-04-21 09:30:05 +02:00
vdsox32.lds.S
vgetcpu.c
vma.c x86/vdso: Remove runtime 32-bit vDSO selection 2015-10-07 11:34:08 +02:00