diff options
| author | Helge Deller <[email protected]> | 2019-07-04 01:44:17 +0000 |
|---|---|---|
| committer | Helge Deller <[email protected]> | 2019-07-17 21:11:27 +0000 |
| commit | 34c32fc603311a72cb558e5e337555434f64c27b (patch) | |
| tree | 2fc6df60be3a37856dec2332b73a583eca40b831 /tools/perf/scripts/python/check-perf-trace.py | |
| parent | parisc: Fix kernel panic due invalid values in IAOQ0 or IAOQ1 (diff) | |
| download | kernel-34c32fc603311a72cb558e5e337555434f64c27b.tar.gz kernel-34c32fc603311a72cb558e5e337555434f64c27b.zip | |
parisc: Ensure userspace privilege for ptraced processes in regset functions
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 in the regset support functions 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 regset calls.
Link: https://bugs.gentoo.org/481768
Cc: <[email protected]> # v4.7+
Tested-by: Rolf Eike Beer <[email protected]>
Signed-off-by: Helge Deller <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/check-perf-trace.py')
0 files changed, 0 insertions, 0 deletions
