android_kernel_oneplus_msm8998/arch/parisc
Helge Deller ce41b6472b parisc: Fix kernel panic due invalid values in IAOQ0 or IAOQ1
commit 10835c854685393a921b68f529bf740fa7c9984d upstream.

On parisc the privilege level of a process is stored in the lowest two bits of
the instruction pointers (IAOQ0 and IAOQ1). On Linux we use privilege level 0
for the kernel and privilege level 3 for user-space. So userspace should not be
allowed to modify IAOQ0 or IAOQ1 of a ptraced process to change it's privilege
level to e.g. 0 to try to gain kernel privileges.

This patch prevents such modifications by always setting the two lowest bits to
one (which relates to privilege level 3 for user-space) if IAOQ0 or IAOQ1 are
modified via ptrace calls in the native and compat ptrace paths.

Link: https://bugs.gentoo.org/481768
Reported-by: Jeroen Roovers <jer@gentoo.org>
Cc: <stable@vger.kernel.org>
Tested-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-04 09:34:52 +02:00
..
configs rtmutex: Delete scriptable tester 2015-07-20 11:45:45 +02:00
include parisc: Remove unnecessary barriers from spinlock.h 2018-08-24 13:27:01 +02:00
kernel parisc: Fix kernel panic due invalid values in IAOQ0 or IAOQ1 2019-08-04 09:34:52 +02:00
lib parisc: Unbreak handling exceptions from kernel modules 2016-04-20 15:41:52 +09:00
math-emu parisc: Fix compiler warnings in float emulation code 2019-07-10 09:56:31 +02:00
mm parisc: Fix map_pages() to not overwrite existing pte entries 2018-11-21 09:27:30 +01:00
oprofile oprofile: more whitespace fixes 2008-10-15 20:55:51 +02:00
defpalo.conf parisc: switch to gzip-compressed vmlinuz kernel 2013-07-09 22:09:20 +02:00
install.sh parisc: make "make install" not depend on vmlinux 2013-11-07 22:28:06 +01:00
Kconfig parisc: Enable CONFIG_MLONGCALLS by default 2018-08-15 17:42:05 +02:00
Kconfig.debug consolidate per-arch stack overflow debugging options 2013-07-04 11:25:39 -07:00
Makefile Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2015-02-19 10:07:08 -08:00
nm