{"id":"CVE-2025-40126","summary":"sparc: fix accurate exception reporting in copy_{from_to}_user for UltraSPARC","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nsparc: fix accurate exception reporting in copy_{from_to}_user for UltraSPARC\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. This will fix the return value of copy_from_user and\ncopy_to_user in the faulting case. The behaviour of memcpy stays unchanged.","modified":"2026-03-20T12:43:11.344719Z","published":"2025-11-12T10:23:20.460Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40126.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/0bf3dc3a2156f1c5ddaba4b85d09767874634114"},{"type":"WEB","url":"https://git.kernel.org/stable/c/41c18baee66134e6ef786eb075c1b6adb22432b0"},{"type":"WEB","url":"https://git.kernel.org/stable/c/4fba1713001195e59cfc001ff1f2837dab877efb"},{"type":"WEB","url":"https://git.kernel.org/stable/c/57c278500fce3cd4e1c540700c0b05426a958393"},{"type":"WEB","url":"https://git.kernel.org/stable/c/59424dc0d0e044b2eb007686a4724ddd91d57db5"},{"type":"WEB","url":"https://git.kernel.org/stable/c/674ff598148a28bae0b5372339de56f2abf0b1d1"},{"type":"WEB","url":"https://git.kernel.org/stable/c/7de3a75bbc8465d816336c74d50109e73501efab"},{"type":"WEB","url":"https://git.kernel.org/stable/c/9b137f277cc3297044aabd950f589e505d30104c"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40126.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-40126"},{"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":"cb736fdbb208eb3420f1a2eb2bfc024a6e9dcada"},{"fixed":"0bf3dc3a2156f1c5ddaba4b85d09767874634114"},{"fixed":"41c18baee66134e6ef786eb075c1b6adb22432b0"},{"fixed":"59424dc0d0e044b2eb007686a4724ddd91d57db5"},{"fixed":"9b137f277cc3297044aabd950f589e505d30104c"},{"fixed":"674ff598148a28bae0b5372339de56f2abf0b1d1"},{"fixed":"7de3a75bbc8465d816336c74d50109e73501efab"},{"fixed":"57c278500fce3cd4e1c540700c0b05426a958393"},{"fixed":"4fba1713001195e59cfc001ff1f2837dab877efb"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"0"},{"last_affected":"1731d90d8a558ecb20cdee0c2c001ae8e15c251d"},{"last_affected":"b0580eadc19ff3a617a7d07cfaf2a985153c114e"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40126.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/osv-test-cve-osv-conversion/osv-output/CVE-2025-40126.json"}}],"schema_version":"1.7.5"}