summaryrefslogtreecommitdiff
path: root/lib/once.c
diff options
context:
space:
mode:
authorMathias Krause <minipli@googlemail.com>2017-04-10 15:14:27 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-04-21 07:31:20 (GMT)
commitec980b6f7dcc006f6859c0871c0d7298281f0394 (patch)
treefaef2f5a91d9d61a83a75821b18f05c42917b136 /lib/once.c
parenta9826aa4860a9ca1268a9ab5c10fc5e65a72b4ef (diff)
downloadlinux-ec980b6f7dcc006f6859c0871c0d7298281f0394.tar.xz
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: b0b49f2673f0 ("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>
Diffstat (limited to 'lib/once.c')
0 files changed, 0 insertions, 0 deletions