linux/arch/parisc/lib
John David Anglin b7931c2867 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:26:08 +02:00
..
bitops.c parisc: mark xchg functions notrace 2021-11-01 07:36:00 +01:00
checksum.c unify generic instances of csum_partial_copy_nocheck() 2020-08-20 15:45:14 -04:00
delay.c parisc: remove duplicate includes 2017-12-17 21:06:25 +01:00
io.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
iomap.c parisc: Drop homebrewn io[read|write]64_[lo_hi|hi_lo] 2022-09-23 21:52:27 +02:00
lusercopy.S parisc: Implement __get/put_kernel_nofault() 2021-09-09 22:53:09 +02:00
Makefile Revert "parisc: Add assembly implementations for memset, strlen, strcpy, strncpy and strcat" 2021-08-29 10:13:32 -07:00
memcpy.c parisc: Check region is readable by user in raw_copy_from_user() 2025-08-28 16:26:08 +02:00
memset.c Revert "parisc: Add assembly implementations for memset, strlen, strcpy, strncpy and strcat" 2021-08-29 10:13:32 -07:00
ucmpdi2.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00