Skip to main content

Linux Kernel CVE-2025-38434

MEDIUM
2025-07-25 416baaa9-dc9f-4396-8d5f-8c081fb06d67
5.5
CVSS 3.1 · NVD
Share

Severity by source

NVD PRIMARY
5.5 MEDIUM
AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
vuln.today AI
5.5 MEDIUM

Local low-privileged user triggers kernel crash via RISC-V access_ok() bypass; no confidentiality or integrity impact, availability loss is high (kernel panic).

3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
4.0 AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
SUSE
3.3 LOW
AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L

Primary rating from NVD.

CVSS VectorNVD

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Lifecycle Timeline

2
Analysis Generated
Jul 30, 2026 - 08:52 vuln.today
CVE Published
Jul 25, 2025 - 15:15 nvd
MEDIUM 5.5

DescriptionNVD

In the Linux kernel, the following vulnerability has been resolved:

Revert "riscv: Define TASK_SIZE_MAX for __access_ok()"

This reverts commit ad5643cf2f69 ("riscv: Define TASK_SIZE_MAX for __access_ok()").

This commit changes TASK_SIZE_MAX to be LONG_MAX to optimize access_ok(), because the previous TASK_SIZE_MAX (default to TASK_SIZE) requires some computation.

The reasoning was that all user addresses are less than LONG_MAX, and all kernel addresses are greater than LONG_MAX. Therefore access_ok() can filter kernel addresses.

Addresses between TASK_SIZE and LONG_MAX are not valid user addresses, but access_ok() let them pass. That was thought to be okay, because they are not valid addresses at hardware level.

Unfortunately, one case is missed: get_user_pages_fast() happily accepts addresses between TASK_SIZE and LONG_MAX. futex(), for instance, uses get_user_pages_fast(). This causes the problem reported by Robert [1].

Therefore, revert this commit. TASK_SIZE_MAX is changed to the default: TASK_SIZE.

This unfortunately reduces performance, because TASK_SIZE is more expensive to compute compared to LONG_MAX. But correctness first, we can think about optimization later, if required.

AnalysisAI

Kernel denial-of-service on RISC-V Linux systems stems from a flawed optimization to the access_ok() boundary check that allowed invalid addresses between TASK_SIZE and LONG_MAX to pass validation. Commit ad5643cf2f69 set TASK_SIZE_MAX to LONG_MAX for performance, but get_user_pages_fast() - invoked by syscalls such as futex() - trusts access_ok() and does not rely on hardware-level rejection of those addresses, triggering kernel faults. A local low-privileged user on an affected RISC-V system can cause a kernel crash; no public exploit is identified and EPSS probability is 0.16% (5th percentile), consistent with RISC-V's limited deployment footprint.

Technical ContextAI

The Linux kernel's RISC-V architecture implementation defines TASK_SIZE_MAX as the upper bound used by access_ok() to validate that a pointer is a legitimate user-space address before the kernel dereferences it. The reverted commit ad5643cf2f69 set TASK_SIZE_MAX to LONG_MAX (the largest signed 64-bit value) rather than the correct TASK_SIZE, reasoning that hardware MMU traps would catch accesses to the gap between TASK_SIZE and LONG_MAX. This assumption fails for get_user_pages_fast(), which pins user pages based purely on the software access_ok() result without a subsequent hardware validation stage. Syscalls that call get_user_pages_fast() - notably futex() - can therefore be directed at addresses in this invalid gap, causing the kernel to fault. The fix reverts TASK_SIZE_MAX to TASK_SIZE on RISC-V, restoring correctness at a minor performance cost. CWE data was not provided; the root-cause class is an incorrect bounds check (analogous to CWE-1285: Improper Validation of Specified Index, Position, or Offset Within a Buffer). CPE cpe:2.3:o:linux:linux_kernel:* with 6.16-rc1/rc2/rc3 variants confirms this is a mainline RISC-V kernel defect in the 6.16 development cycle.

RemediationAI

Apply one of the three upstream revert patches confirmed available in the Linux stable kernel tree: commit 890ba5be6335dbbbc99af14ea007befb5f83f174, f8b1898748dfeb4f9b67b6a6d661f354b9de3523, or fe30c30bf3bb68d4a4d8c7c814769857b5c973e6 (https://git.kernel.org/stable/c/890ba5be6335dbbbc99af14ea007befb5f83f174, https://git.kernel.org/stable/c/f8b1898748dfeb4f9b67b6a6d661f354b9de3523, https://git.kernel.org/stable/c/fe30c30bf3bb68d4a4d8c7c814769857b5c973e6). A specific patched release version is not independently confirmed from the available data beyond these commit references; operators should verify inclusion in their distribution's kernel update channel. As a compensating control on unpatched RISC-V systems, restricting untrusted local user access via mandatory access control (SELinux, AppArmor) or limiting syscall surface through seccomp-BPF policies that restrict futex() can reduce exposure, though disabling futex() will break POSIX thread synchronization in many applications and should be tested thoroughly before deployment.

Vendor StatusVendor

SUSE

Severity: Low
Product Status
SUSE Linux Enterprise Desktop 15 SP7 Not-Affected
SUSE Linux Enterprise Desktop 15 SP7 Not-Affected
SUSE Linux Enterprise High Availability Extension 15 SP7 Not-Affected
SUSE Linux Enterprise High Availability Extension 15 SP7 Not-Affected
SUSE Linux Enterprise High Availability Extension 16.0 Not-Affected

Share

CVE-2025-38434 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy