CVE-2025-40112 sparc: fix accurate exception reporting in copy_{from_to}_user for Niagara

High 7.8 Published Updated

A flaw in SPARC kernel copy functions causes crashes due to incorrect exception handling, leading to denial of service.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2025-40112?

CVE-2025-40112 is a high-severity vulnerability in Linux, published on 12 Nov 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official 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.

Which versions are affected by CVE-2025-40112?

How do I fix CVE-2025-40112?

Apply the vendor's patch.

Is CVE-2025-40112 being exploited?

There is no known exploitation of CVE-2025-40112 in the wild and no public exploit code.

Sources

Also known as BELL-CVE-2025-40112, DEBIAN-CVE-2025-40112, GHSA-92f2-89hh-wf7v, ROOT-OS-DEBIAN-11-CVE-2025-40112, ROOT-OS-UBUNTU-2404-CVE-2025-40112, UBUNTU-CVE-2025-40112.

Is CVE-2025-40112 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free