Skip to main content

Linux Kernel CVE-2025-40124

HIGH
2025-11-12 416baaa9-dc9f-4396-8d5f-8c081fb06d67
7.8
CVSS 3.1 · Vendor: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Share

Severity by source

Vendor (416baaa9-dc9f-4396-8d5f-8c081fb06d67) PRIMARY
7.8 HIGH
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
vuln.today AI
7.0 HIGH

Local unprivileged trigger (AV:L/PR:L) but requires legacy SPARC hardware and precise mid-copy fault timing (AC:H); high impact reflects observed kernel panic plus possible memory-corruption/leak.

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

Primary rating from Vendor (416baaa9-dc9f-4396-8d5f-8c081fb06d67).

CVSS VectorVendor: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

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

Lifecycle Timeline

7
Analysis Updated
Jul 30, 2026 - 09:11 vuln.today
v3 (cvss_changed)
Analysis Updated
Jul 30, 2026 - 09:10 vuln.today
v2 (cvss_changed)
Re-analysis Queued
Jul 30, 2026 - 06:37 vuln.today
cvss_changed
CVSS changed
Jul 30, 2026 - 06:37 NVD
7.8 (HIGH)
Patch released
Mar 28, 2026 - 19:31 nvd
Patch available
Analysis Generated
Mar 28, 2026 - 19:21 vuln.today
CVE Published
Nov 12, 2025 - 11:15 nvd
N/A

DescriptionCVE.org

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

sparc: fix accurate exception reporting in copy_{from_to}_user for UltraSPARC III

Anthony Yznaga tracked down that a BUG_ON in ext4 code with large folios enabled resulted from copy_from_user() returning impossibly large values greater than the size to be copied. This lead to __copy_from_iter() returning impossible values instead of the actual number of bytes it was able to copy.

The BUG_ON has been reported in https://lore.kernel.org/r/b14f55642207e63e907965e209f6323a0df6dcee.camel@physik.fu-berlin.de

The referenced commit introduced exception handlers on user-space memory references in copy_from_user and copy_to_user. These handlers return from the respective function and calculate the remaining bytes left to copy using the current register contents. The exception handlers expect that %o2 has already been masked during the bulk copy loop, but the masking was performed after that loop. This will fix the return value of copy_from_user and copy_to_user in the faulting case. The behaviour of memcpy stays unchanged.

AnalysisAI

Local memory-safety mishandling in the Linux kernel's SPARC (UltraSPARC III) copy_from_user/copy_to_user routines causes these functions to return impossibly large "bytes not copied" values when a user-space access faults, because the %o2 register masking was performed after the bulk copy loop instead of before the exception handlers ran. Downstream consumers such as __copy_from_iter propagate the bogus count, which was observed triggering a BUG_ON in ext4 with large folios enabled, and can lead to kernel state corruption, information disclosure of uninitialized memory, or denial of service. No public exploit is identified at time of analysis (EPSS 0.09%, not in CISA KEV); the flaw is limited to legacy SPARC hardware.

Technical ContextAI

The issue lives in the SPARC64 assembly implementations of copy_from_user and copy_to_user for the UltraSPARC III (Cheetah) family. A prior commit added exception (fixup) handlers on the user-space load/store instructions so that a fault during the copy returns the number of un-copied bytes computed from live register contents. Those handlers assume the length register %o2 has already been masked down during the aligned bulk-copy loop, but the masking actually happened only after the loop completed. When a fault interrupts the copy mid-loop, the handler reads an unmasked %o2 and returns a value larger than the requested size. Because the CWE is unpopulated by NVD, the root cause is best classified as an incorrect return-value/calculation error (CWE-682/CWE-393 family) in exception handling rather than a classic buffer overflow. The affected code is architecture-specific SPARC uaccess primitives - memcpy behavior is unchanged.

Affected ProductsAI

The Linux kernel on SPARC64 / UltraSPARC III (Cheetah-class) processors is affected; the defect is in the architecture-specific copy_from_user/copy_to_user uaccess routines. Exact vulnerable version ranges are not enumerated in the provided NVD data (CPE strings were not supplied), but fixes were backported across multiple stable trees as shown by the eight git.kernel.org stable commits (e.g. https://git.kernel.org/stable/c/91eda032eb16e5d2be27c95584665bc555bb5a90 and https://git.kernel.org/stable/c/1198077606aeffb102587c6ea079ce99641c99d4). Distribution coverage is confirmed for Ubuntu via advisories USN-8126-1 (https://ubuntu.com/security/notices/USN-8126-1) and USN-8125-1 (https://ubuntu.com/security/notices/USN-8125-1). Non-SPARC architectures are not affected.

RemediationAI

Patch available per vendor: apply the upstream stable kernel fix that moves the %o2 masking before the bulk-copy loop so the exception handlers report accurate remaining-byte counts. Ubuntu users should update to the fixed kernel packages in USN-8126-1 (https://ubuntu.com/security/notices/USN-8126-1) and USN-8125-1 (https://ubuntu.com/security/notices/USN-8125-1); upstream/self-built kernels should incorporate the corresponding stable commits at https://git.kernel.org/stable/c/91eda032eb16e5d2be27c95584665bc555bb5a90 (and the sibling stable backports) and reboot into the patched image. No exact upstream tagged release number is provided in the input, so confirm the fixed version against your distribution's changelog before deployment. Because exploitation requires SPARC UltraSPARC III hardware, a practical compensating measure where patching is delayed is to prioritize or retire the affected legacy SPARC hosts and restrict untrusted local user access on them; there is no configuration toggle to disable the vulnerable copy path since it is core uaccess code, so patching is the only real fix.

Vendor StatusVendor

SUSE

Severity: Moderate
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-40124 vulnerability details – vuln.today

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