{"id":"CVE-2025-40112","summary":"sparc: fix accurate exception reporting in copy_{from_to}_user for Niagara","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nsparc: fix accurate exception reporting in copy_{from_to}_user for Niagara\n\nThe referenced commit introduced exception handlers on user-space memory\nreferences in copy_from_user and copy_to_user. These handlers return from\nthe respective function and calculate the remaining bytes left to copy\nusing the current register contents. This commit fixes a couple of bad\ncalculations and a broken epilogue in the exception handlers. This will\nprevent crashes and ensure correct return values of copy_from_user and\ncopy_to_user in the faulting case. The behaviour of memcpy stays unchanged.","modified":"2026-04-02T12:48:17.171068Z","published":"2025-11-12T10:23:16.690Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40112.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/05440320ea3e249d5f984918f2bf51210c1a7c03"},{"type":"WEB","url":"https://git.kernel.org/stable/c/088c5098ec6d6b0396edfbf3dad3e81de8469c1c"},{"type":"WEB","url":"https://git.kernel.org/stable/c/0b67c8fc10b13a9090340c5f8a37d308f4e1571c"},{"type":"WEB","url":"https://git.kernel.org/stable/c/37547d8e6eba87507279ee3dfddfd9dc46335454"},{"type":"WEB","url":"https://git.kernel.org/stable/c/7823fc4d8ab5e57f8db7806ff2530c03c166c4bb"},{"type":"WEB","url":"https://git.kernel.org/stable/c/8cdeb5e482d3fdce7e825444b6ca3865e24c0228"},{"type":"WEB","url":"https://git.kernel.org/stable/c/a365ee556e45f780ee322b349a06efdad0c1458f"},{"type":"WEB","url":"https://git.kernel.org/stable/c/a90ce516a73dbe087f9bf3dbf311301a58d125c6"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40112.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-40112"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"7ae3aaf53f1695877ccd5ebbc49ea65991e41f1e"},{"fixed":"05440320ea3e249d5f984918f2bf51210c1a7c03"},{"fixed":"7823fc4d8ab5e57f8db7806ff2530c03c166c4bb"},{"fixed":"37547d8e6eba87507279ee3dfddfd9dc46335454"},{"fixed":"a365ee556e45f780ee322b349a06efdad0c1458f"},{"fixed":"8cdeb5e482d3fdce7e825444b6ca3865e24c0228"},{"fixed":"a90ce516a73dbe087f9bf3dbf311301a58d125c6"},{"fixed":"088c5098ec6d6b0396edfbf3dad3e81de8469c1c"},{"fixed":"0b67c8fc10b13a9090340c5f8a37d308f4e1571c"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"0"},{"last_affected":"bfc8be6593097cb074d3912ba2f27565cfbb7d6e"},{"last_affected":"a15859f9d8396cce7c55ccdb7e75f70f14cbc349"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-40112.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.9.0"},{"fixed":"5.4.301"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.5.0"},{"fixed":"5.10.246"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.11.0"},{"fixed":"5.15.195"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"6.1.156"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.2.0"},{"fixed":"6.6.112"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.7.0"},{"fixed":"6.12.53"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.17.3"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-40112.json"}}],"schema_version":"1.7.5"}