Junglewise Threat Intelligence

CVE-2025-40112: Linux Kernel SPARC incorrect exception handling in copy_{from_to}_user

CVE-2025-40112 · Severity: high · CVSS 7.8 · Published 2025-11-12

Vendors: Linux.

Executive brief

A vulnerability in the Linux kernel's SPARC architecture support could allow a local user to cause a system crash or potentially gain unauthorized access to data. The issue exists in the way the system handles memory transfers between user applications and the core operating system on Niagara-based processors. If a memory error occurs during these transfers, the system may perform incorrect calculations, leading to instability or security breaches.

Technical details

The vulnerability stems from incorrect calculations and a broken epilogue in the exception handlers for 'copy_from_user' and 'copy_to_user' within the SPARC architecture (specifically Niagara/NGmemcpy.S). When a fault occurs during a user-space memory reference, the handler fails to accurately calculate the remaining bytes to copy based on current register contents. This logic error can result in kernel crashes or the return of incorrect status values to the caller, which may lead to further memory corruption or logic bypasses. The issue is triggered locally during standard memory copy operations between user and kernel space. Patches have been released across multiple stable Linux kernel branches.

Affected products

  • Linux Linux 4.4.34 to 4.5; 4.8.10 to 4.9; 4.9 and later versions prior to fix

Timeline

  • 2025-11-12: advisory: CVE-2025-40112 published by kernel.org

References