linux/arch/parisc
John David Anglin 537264f4b3 parisc: Check region is readable by user in raw_copy_from_user()
commit 91428ca932 upstream.

Because of the way the _PAGE_READ is handled in the parisc PTE, an
access interruption is not generated when the kernel reads from a
region where the _PAGE_READ is zero. The current code was written
assuming read access faults would also occur in the kernel.

This change adds user access checks to raw_copy_from_user().  The
prober_user() define checks whether user code has read access to
a virtual address. Note that page faults are not handled in the
exception support for the probe instruction. For this reason, we
precede the probe by a ldb access check.

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>
History 2025-08-28 16:31:00 +02:00
..
boot parisc: fix building with gcc-15 2025-06-27 11:11:22 +01:00
configs drm/display: Make DisplayPort CEC-over-AUX Kconfig name consistent 2024-03-28 11:26:47 +01:00
include parisc: Check region is readable by user in raw_copy_from_user() 2025-08-28 16:31:00 +02:00
kernel parisc/unaligned: Fix hex output to show 8 hex chars 2025-06-27 11:11:21 +01:00
lib parisc: Check region is readable by user in raw_copy_from_user() 2025-08-28 16:31:00 +02:00
math-emu parisc: Fix double SIGFPE crash 2025-05-09 09:50:31 +02:00
mm mm: hugetlb: Add huge page size param to huge_ptep_get_and_clear() 2025-03-13 13:02:17 +01:00
net parisc: fix unaligned accesses in BPF 2024-07-29 16:19:07 +02:00
video arch: Rename fbdev header and source files 2024-05-03 17:07:50 +02:00
defpalo.conf parisc: switch to gzip-compressed vmlinuz kernel 2013-07-09 22:09:20 +02:00
install.sh kbuild: Abort make on install failures 2024-07-20 13:34:54 +09:00
Kbuild parisc: Wire up eBPF JIT compiler 2023-08-22 10:24:47 +02:00
Kconfig parisc: Temporarily disable jump label support 2025-02-17 10:05:29 +01:00
Kconfig.debug parisc: Use page table locks only if DEBUG_KERNEL is enabled 2023-08-20 20:23:46 +02:00
Makefile parisc: Makefile: fix a typo in palo.conf 2025-08-20 18:30:55 +02:00