linux-stable/arch/parisc
Helge Deller a6766bb9da parisc: Fix kernel panic due invalid values in IAOQ0 or IAOQ1
commit 10835c8546 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-07-31 07:28:42 +02:00
..
boot parisc: Use PA_ASM_LEVEL in boot code 2019-05-25 18:25:18 +02:00
configs net: Remove CONFIG_NETFILTER_DEBUG and _ASSERT() macros. 2017-09-04 13:25:20 +02:00
include parisc: Rename LEVEL to PA_ASM_LEVEL to avoid name clash with DRBD code 2019-05-25 18:25:18 +02:00
kernel parisc: Fix kernel panic due invalid values in IAOQ0 or IAOQ1 2019-07-31 07:28:42 +02:00
lib License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
math-emu parisc: Fix compiler warnings in float emulation code 2019-06-25 11:36:51 +08:00
mm parisc: Fix map_pages() to not overwrite existing pte entries 2018-11-13 11:14:46 -08:00
oprofile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
defpalo.conf
install.sh
Kconfig parisc: Enable CONFIG_MLONGCALLS by default 2018-08-15 18:12:46 +02:00
Kconfig.debug License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile parisc: Reintroduce option to gzip-compress the kernel 2017-09-22 22:26:41 +02:00
nm