CVE-2025-40126 sparc: fix accurate exception reporting in copy_{from_to}_user for UltraSPARC
A flaw in Linux kernel SPARC copy functions allows local attackers to read uninitialized kernel memory due to incorrect exception handling calculations.
- 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-40126?
CVE-2025-40126 is a 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 UltraSPARC
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. This will fix the return value 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-40126?
How do I fix CVE-2025-40126?
Apply the vendor's patch.
Is CVE-2025-40126 being exploited?
There is no known exploitation of CVE-2025-40126 in the wild and no public exploit code.
Sources
Also known as BELL-CVE-2025-40126, DEBIAN-CVE-2025-40126, GHSA-pgqq-8578-f8gj, ROOT-OS-DEBIAN-11-CVE-2025-40126, ROOT-OS-DEBIAN-13-CVE-2025-40126, ROOT-OS-UBUNTU-2404-CVE-2025-40126 and 1 more.