Files
linux-stable-mirror/arch/parisc/include/asm
John David Anglin f410ef9a03 parisc: Revise __get_user() to probe user read access
commit 89f686a0fb upstream.

Because of the way read access support is implemented, read access
interruptions are only triggered at privilege levels 2 and 3. The
kernel executes at privilege level 0, so __get_user() never triggers
a read access interruption (code 26). Thus, it is currently possible
for user code to access a read protected address via a system call.

Fix this by probing read access rights at privilege level 3 (PRIV_USER)
and setting __gu_err to -EFAULT (-14) if access isn't allowed.

Note the cmpiclr instruction does a 32-bit compare because COND macro
doesn't work inside asm.

Signed-off-by: John David Anglin <dave.anglin@bell.net>
Signed-off-by: Helge Deller <deller@gmx.de>
Cc: stable@vger.kernel.org # v5.12+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-08-28 16:31:00 +02:00
..
2024-07-29 16:19:07 +02:00
2024-04-09 22:06:00 -07:00
2025-08-28 16:31:00 +02:00
2023-08-31 21:42:42 +02:00