LiveActive security incident?Get immediate response
CVE Record

CVE-2025-40124: sparc: fix accurate exception reporting in copy_{from_to}_user for UltraSPARC III

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.

HighCVSS 7.8Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

A Linux kernel fault-handling bug on UltraSPARC III systems can report an impossible number of uncopied bytes when moving data between user and kernel memory. This can corrupt higher-level error accounting and has triggered an ext4 kernel assertion. The supplied CVSS score is 7.8, but exposure is limited to affected SPARC systems and requires local low-privileged access.

Executive priority

Treat this as high priority where UltraSPARC III systems remain operational, especially multi-user or externally administered hosts. Prioritize inventory first because architecture sharply limits exposure. Systems on other architectures are not shown affected by the supplied evidence. There is no documented active exploitation, so emergency organization-wide Linux action is unsupported.

Technical view

The SPARC copy_from_user() and copy_to_user() exception handlers calculate remaining bytes from register %o2. On UltraSPARC III, they assumed %o2 was already masked, although masking occurred after the bulk-copy loop. A memory fault could therefore produce an oversized return value, propagate impossible values through __copy_from_iter(), and trigger safety checks such as the reported ext4 BUG_ON.

Likely exposure

Likely exposure is confined to systems running affected Linux kernels on UltraSPARC III hardware. The supplied record identifies affected releases from 4.9 through 6.18, with several fixed stable releases and commits, but vendor backports may change status. Other architectures should not be treated as affected from this evidence.

Exploitation context

The CVSS vector describes a local, low-complexity issue requiring low privileges and no user interaction. CISA KEV status is false, and the supplied evidence does not document active exploitation or weaponization. The documented real-world symptom is a kernel BUG_ON involving ext4 large folios, not a demonstrated confidentiality or integrity compromise.

Researcher notes

The failure is inaccurate residual-length reporting during fault handling, not a change to memcpy behavior. The supplied record assigns no CWE. Researchers should validate architecture, exact kernel lineage, and backport status before declaring exposure. The reported ext4 assertion demonstrates impact, while broader confidentiality and integrity consequences are represented by CVSS rather than a documented exploit.

Mitigation direction

  • Update to a vendor-supported kernel containing the applicable cited stable fix.
  • Confirm distribution kernels include the fix, because package versions may use backports.
  • Prioritize affected UltraSPARC III production systems accessible to untrusted local users.
  • Restrict unnecessary local accounts until affected systems are remediated.

Validation and detection

  • Inventory Linux kernel versions and hardware architecture across SPARC systems.
  • Confirm whether each system uses UltraSPARC III hardware.
  • Compare kernel provenance against affected releases and cited stable fix commits.
  • Check vendor advisories or package changelogs for an explicit backport.
  • Review kernel logs for copy-related faults, ext4 BUG_ON events, or unexplained crashes.
Prepared
Confidence
high
Sources
10

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cve · low confidence lookup

CVE-2025-40124 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
7.8 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
3Timeline events
0ADP providers
9Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
7.8CVSS 3.1HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H1.85.9Linux

Vulnerability scoring details

Base CVSS 3.1 score

7.8High
CVSS 3.1 vector shape for CVE-2025-40124Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. CVE publishedCVE Program

    The CVE record was published.

  3. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
LinuxLinuxee841d0aff649164080e445e84885015958d8ff4, ee841d0aff649164080e445e84885015958d8ff4, ee841d0aff649164080e445e84885015958d8ff4, ee841d0aff649164080e445e84885015958d8ff4, ee841d0aff649164080e445e84885015958d8ff4, ee841d0aff649164080e445e84885015958d8ff4, ee841d0aff649164080e445e84885015958d8ff4, ee841d0aff649164080e445e84885015958d8ff4, 1c7e17b1c4d60cc5aa575460f7efb73686dd3b39, ac663c54f40b2830b1ca32d1ae9d683fe248b14c, 4.4.34, 4.8.10unaffected
LinuxLinux4.9, 0, 5.4.301, 5.10.246, 5.15.195, 6.1.156, 6.6.112, 6.12.53, 6.17.3, 6.18affected
Weakness

CWE details

No CWE listed

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.