# CVE-2025-40112: sparc: fix accurate exception reporting in copy\_{from\_to}\_user for Niagara

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.23% (percentile 9, 2026-11-26)
- **Published:** 2025-11-12T10:23:16.690Z
- **Modified:** 2026-10-19T21:10:00.160Z

## Who should check

- Anyone running Linux \>= 7ae3aaf53f1695877ccd5ebbc49ea65991e41f1e, \< 05440320ea3e249d5f984918f2bf51210c1a7c03; \>= 7ae3aaf53f1695877ccd5ebbc49ea65991e41f1e, \< 7823fc4d8ab5e57f8db7806ff2530c03c166c4bb; \>= 7ae3aaf53f1695877ccd5ebbc49ea65991e41f1e, \< 37547d8e6eba87507279ee3dfddfd9dc46335454; \>= 7ae3aaf53f1695877ccd5ebbc49ea65991e41f1e, \< a365ee556e45f780ee322b349a06efdad0c1458f; \>= 7ae3aaf53f1695877ccd5ebbc49ea65991e41f1e, \< 8cdeb5e482d3fdce7e825444b6ca3865e24c0228; \>= 7ae3aaf53f1695877ccd5ebbc49ea65991e41f1e, \< a90ce516a73dbe087f9bf3dbf311301a58d125c6; \>= 7ae3aaf53f1695877ccd5ebbc49ea65991e41f1e, \< 088c5098ec6d6b0396edfbf3dad3e81de8469c1c; \>= 7ae3aaf53f1695877ccd5ebbc49ea65991e41f1e, \< 0b67c8fc10b13a9090340c5f8a37d308f4e1571c; bfc8be6593097cb074d3912ba2f27565cfbb7d6e; a15859f9d8396cce7c55ccdb7e75f70f14cbc349; …
- Anyone running Linux 4.9

## Description

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

sparc: fix accurate exception reporting in copy\_{from\_to}\_user for Niagara

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. This commit fixes a couple of bad
calculations and a broken epilogue in the exception handlers. This will
prevent crashes and ensure correct return values of copy\_from\_user and
copy\_to\_user in the faulting case. The behaviour of memcpy stays unchanged.

## Affected and fixed versions

- Linux: \>= 7ae3aaf53f1695877ccd5ebbc49ea65991e41f1e, \< 05440320ea3e249d5f984918f2bf51210c1a7c03; \>= 7ae3aaf53f1695877ccd5ebbc49ea65991e41f1e, \< 7823fc4d8ab5e57f8db7806ff2530c03c166c4bb; \>= 7ae3aaf53f1695877ccd5ebbc49ea65991e41f1e, \< 37547d8e6eba87507279ee3dfddfd9dc46335454; \>= 7ae3aaf53f1695877ccd5ebbc49ea65991e41f1e, \< a365ee556e45f780ee322b349a06efdad0c1458f; \>= 7ae3aaf53f1695877ccd5ebbc49ea65991e41f1e, \< 8cdeb5e482d3fdce7e825444b6ca3865e24c0228; \>= 7ae3aaf53f1695877ccd5ebbc49ea65991e41f1e, \< a90ce516a73dbe087f9bf3dbf311301a58d125c6; \>= 7ae3aaf53f1695877ccd5ebbc49ea65991e41f1e, \< 088c5098ec6d6b0396edfbf3dad3e81de8469c1c; \>= 7ae3aaf53f1695877ccd5ebbc49ea65991e41f1e, \< 0b67c8fc10b13a9090340c5f8a37d308f4e1571c; bfc8be6593097cb074d3912ba2f27565cfbb7d6e; a15859f9d8396cce7c55ccdb7e75f70f14cbc349; … (cvelist)
- Linux: 4.9 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-40112. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-40112.md
Affected: Linux >= 7ae3aaf53f1695877ccd5ebbc49ea65991e41f1e, < 05440320ea3e249d5f984918f2bf51210c1a7c03; >= 7ae3aaf53f1695877ccd5ebbc49ea65991e41f1e, < 7823fc4d8ab5e57f8db7806ff2530c03c166c4bb; >= 7ae3aaf53f1695877ccd5ebbc49ea65991e41f1e, < 37547d8e6eba87507279ee3dfddfd9dc46335454; >= 7ae3aaf53f1695877ccd5eb…
Fixed in: Linux 05440320ea3e249d5f984918f2bf51210c1a7c03, Linux 7823fc4d8ab5e57f8db7806ff2530c03c166c4bb, Linux 37547d8e6eba87507279ee3dfddfd9dc46335454, Linux 8cdeb5e482d3fdce7e825444b6ca3865e24c0228, Linux 088c5098ec6d6b0396edfbf3dad3e81de8469c1c, Linux 0b67c8fc10b13a9090340c5f8a37d308f4e1571c

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-40112 being exploited?

There is no confirmed exploitation: CVE-2025-40112 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.23% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-40112?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2025-40112?

Linux \>= 7ae3aaf53f1695877ccd5ebbc49ea65991e41f1e, \< 05440320ea3e249d5f984918f2bf51210c1a7c03; \>= 7ae3aaf53f1695877ccd5ebbc49ea65991e41f1e, \< 7823fc4d8ab5e57f8db7806ff2530c03c166c4bb; \>= 7ae3aaf53f1695877ccd5ebbc49ea65991e41f1e, \< 37547d8e6eba87507279ee3dfddfd9dc46335454; \>= 7ae3aaf53f1695877ccd5ebbc49ea65991e41f1e, \< a365ee556e45f780ee322b349a06efdad0c1458f; \>= 7ae3aaf53f1695877ccd5ebbc49ea65991e41f1e, \< 8cdeb5e482d3fdce7e825444b6ca3865e24c0228; \>= 7ae3aaf53f1695877ccd5ebbc49ea65991e41f1e, \< a90ce516a73dbe087f9bf3dbf311301a58d125c6; \>= 7ae3aaf53f1695877ccd5ebbc49ea65991e41f1e, \< 088c5098ec6d6b0396edfbf3dad3e81de8469c1c; \>= 7ae3aaf53f1695877ccd5ebbc49ea65991e41f1e, \< 0b67c8fc10b13a9090340c5f8a37d308f4e1571c; bfc8be6593097cb074d3912ba2f27565cfbb7d6e; a15859f9d8396cce7c55ccdb7e75f70f14cbc349; …; Linux 4.9.

### Is there a fix for CVE-2025-40112?

Yes. Fixed in Linux 05440320ea3e249d5f984918f2bf51210c1a7c03, Linux 7823fc4d8ab5e57f8db7806ff2530c03c166c4bb, Linux 37547d8e6eba87507279ee3dfddfd9dc46335454, Linux 8cdeb5e482d3fdce7e825444b6ca3865e24c0228, Linux 088c5098ec6d6b0396edfbf3dad3e81de8469c1c, Linux 0b67c8fc10b13a9090340c5f8a37d308f4e1571c. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2025-40112?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/05440320ea3e249d5f984918f2bf51210c1a7c03>
- other: <https://git.kernel.org/stable/c/7823fc4d8ab5e57f8db7806ff2530c03c166c4bb>
- other: <https://git.kernel.org/stable/c/37547d8e6eba87507279ee3dfddfd9dc46335454>
- other: <https://git.kernel.org/stable/c/a365ee556e45f780ee322b349a06efdad0c1458f>
- other: <https://git.kernel.org/stable/c/8cdeb5e482d3fdce7e825444b6ca3865e24c0228>
- other: <https://git.kernel.org/stable/c/a90ce516a73dbe087f9bf3dbf311301a58d125c6>
- other: <https://git.kernel.org/stable/c/088c5098ec6d6b0396edfbf3dad3e81de8469c1c>
- other: <https://git.kernel.org/stable/c/0b67c8fc10b13a9090340c5f8a37d308f4e1571c>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-40112>

HTML: <https://flawdb.com/CVE-2025-40112> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-40112>
