John David Anglin
89f686a0fb
parisc: Revise __get_user() to probe user read access
...
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+
2025-07-25 22:45:24 +02:00
..
2025-05-04 20:46:27 +02:00
2009-12-12 13:08:14 +01:00
2019-05-30 11:26:32 -07:00
2025-05-04 20:46:27 +02:00
2023-06-05 09:57:16 +02:00
2025-05-04 20:46:27 +02:00
2022-08-22 11:09:17 +02:00
2023-11-27 11:01:38 +01:00
2025-05-04 20:46:27 +02:00
2024-06-12 01:57:05 +02:00
2024-02-22 15:27:19 -08:00
2024-02-27 22:51:45 +01:00
2024-04-09 22:06:00 -07:00
2017-11-02 11:10:55 +01:00
2022-04-26 13:35:54 -07:00
2025-05-04 20:46:27 +02:00
2017-11-02 11:10:55 +01:00
2023-02-15 12:35:20 +01:00
2023-08-10 19:12:16 +02:00
2025-05-04 20:46:27 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2023-11-15 15:30:09 -08:00
2024-01-30 17:18:58 +01:00
2025-05-04 20:46:27 +02:00
2022-06-28 13:20:21 +02:00
2025-05-04 20:46:27 +02:00
2022-02-25 09:36:06 +01:00
2023-05-03 17:43:26 +02:00
2021-02-10 23:34:16 +01:00
2022-10-31 15:37:14 +01:00
2017-11-02 11:10:55 +01:00
2025-02-27 17:40:57 +00:00
2025-04-01 09:29:18 -07:00
2021-01-26 19:57:26 +01:00
2023-06-30 17:14:13 +02:00
2025-05-04 20:46:27 +02:00
2017-11-02 11:10:55 +01:00
2023-02-13 22:13:29 +01:00
2025-05-04 20:46:27 +02:00
2021-10-30 23:11:00 +02:00
2025-05-04 20:46:27 +02:00
2024-02-16 20:18:03 +01:00
2023-11-25 09:43:17 +01:00
2023-08-28 17:58:14 +02:00
2025-05-04 20:46:27 +02:00
2024-11-05 16:49:55 -08:00
2022-03-11 19:49:31 +01:00
2022-03-11 19:49:30 +01:00
2019-05-03 23:47:40 +02:00
2017-11-02 11:10:55 +01:00
2025-05-04 20:46:27 +02:00
2024-07-03 15:16:54 +02:00
2017-11-02 11:10:55 +01:00
2022-07-22 17:23:45 -05:00
2021-05-07 00:26:34 -07:00
2025-05-04 20:46:27 +02:00
2025-05-04 20:46:27 +02:00
2010-10-18 19:58:50 +02:00
2017-11-02 11:10:55 +01:00
2025-05-11 17:48:21 -07:00
2025-07-25 22:45:23 +02:00
2025-05-04 20:46:27 +02:00
2025-05-04 20:46:27 +02:00
2025-05-04 20:46:27 +02:00
2021-11-01 07:36:00 +01:00
2023-08-31 21:42:42 +02:00
2022-03-11 19:49:30 +01:00
2023-08-28 18:00:27 +02:00
2020-11-20 11:16:34 -08:00
2022-02-16 23:25:11 +11:00
2013-11-30 21:02:18 +01:00
2023-09-07 08:00:32 +02:00
2025-05-04 20:46:27 +02:00
2025-05-04 20:46:27 +02:00
2020-10-15 08:10:38 +02:00
2019-05-03 23:47:40 +02:00
2025-07-25 22:45:23 +02:00
2025-05-04 20:46:27 +02:00
2023-08-10 17:32:09 +02:00
2021-08-29 10:13:32 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2025-05-11 17:48:15 -07:00
2024-11-07 14:25:15 -08:00
2025-05-04 20:46:27 +02:00
2022-05-13 23:59:23 +02:00
2019-12-04 19:44:15 -08:00
2022-03-11 19:49:30 +01:00
2022-03-29 21:37:12 +02:00
2025-05-04 20:46:27 +02:00
2025-07-25 22:45:24 +02:00
2017-11-02 11:10:55 +01:00
2025-05-04 20:46:27 +02:00
2018-08-17 17:00:08 +02:00
2025-05-04 20:46:27 +02:00
2024-05-03 17:07:50 +02:00
2019-12-10 10:12:55 +01:00