{"api_version":"1","generated_at":"2026-08-03T21:27:37+00:00","cve":"CVE-2025-40124","urls":{"html":"https://cve.report/CVE-2025-40124","api":"https://cve.report/api/cve/CVE-2025-40124.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2025-40124","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2025-40124"},"summary":{"title":"sparc: fix accurate exception reporting in copy_{from_to}_user for UltraSPARC III","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nsparc: fix accurate exception reporting in copy_{from_to}_user for UltraSPARC III\n\nAnthony Yznaga tracked down that a BUG_ON in ext4 code with large folios\nenabled resulted from copy_from_user() returning impossibly large values\ngreater than the size to be copied. This lead to __copy_from_iter()\nreturning impossible values instead of the actual number of bytes it was\nable to copy.\n\nThe BUG_ON has been reported in\nhttps://lore.kernel.org/r/b14f55642207e63e907965e209f6323a0df6dcee.camel@physik.fu-berlin.de\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. The exception handlers expect that\n%o2 has already been masked during the bulk copy loop, but the masking was\nperformed after that loop. This will fix the return value of copy_from_user\nand copy_to_user in the faulting case. The behaviour of memcpy stays\nunchanged.","state":"PUBLISHED","assigner":"Linux","published_at":"2025-11-12 11:15:41","updated_at":"2026-07-30 06:24:12"},"problem_types":[],"metrics":[{"version":"3.1","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","score":"7.8","severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","data":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"}},{"version":"3.1","source":"CNA","type":"DECLARED","score":"7.8","severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","data":{"baseScore":7.8,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"}}],"references":[{"url":"https://git.kernel.org/stable/c/1198077606aeffb102587c6ea079ce99641c99d4","name":"https://git.kernel.org/stable/c/1198077606aeffb102587c6ea079ce99641c99d4","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/dc766c4830a7e1e1ee9d7f77d4ab344f2eb23c8e","name":"https://git.kernel.org/stable/c/dc766c4830a7e1e1ee9d7f77d4ab344f2eb23c8e","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/91eda032eb16e5d2be27c95584665bc555bb5a90","name":"https://git.kernel.org/stable/c/91eda032eb16e5d2be27c95584665bc555bb5a90","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/5ef9c94d7110e90260c06868cf1dcf899b9f25ee","name":"https://git.kernel.org/stable/c/5ef9c94d7110e90260c06868cf1dcf899b9f25ee","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/e50377c6b3f278c9f3ef017ffce17f5fcc9dace4","name":"https://git.kernel.org/stable/c/e50377c6b3f278c9f3ef017ffce17f5fcc9dace4","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/fdd43fe6d286f27b826572457a89c926f97e2d3a","name":"https://git.kernel.org/stable/c/fdd43fe6d286f27b826572457a89c926f97e2d3a","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/1857cdca12c4aff58bf26a7005a4d02850c29927","name":"https://git.kernel.org/stable/c/1857cdca12c4aff58bf26a7005a4d02850c29927","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/47b49c06eb62504075f0f2e2227aee2e2c2a58b3","name":"https://git.kernel.org/stable/c/47b49c06eb62504075f0f2e2227aee2e2c2a58b3","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2025-40124","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-40124","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected ee841d0aff649164080e445e84885015958d8ff4 fdd43fe6d286f27b826572457a89c926f97e2d3a git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected ee841d0aff649164080e445e84885015958d8ff4 1198077606aeffb102587c6ea079ce99641c99d4 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected ee841d0aff649164080e445e84885015958d8ff4 1857cdca12c4aff58bf26a7005a4d02850c29927 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected ee841d0aff649164080e445e84885015958d8ff4 91eda032eb16e5d2be27c95584665bc555bb5a90 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected ee841d0aff649164080e445e84885015958d8ff4 dc766c4830a7e1e1ee9d7f77d4ab344f2eb23c8e git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected ee841d0aff649164080e445e84885015958d8ff4 5ef9c94d7110e90260c06868cf1dcf899b9f25ee git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected ee841d0aff649164080e445e84885015958d8ff4 e50377c6b3f278c9f3ef017ffce17f5fcc9dace4 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected ee841d0aff649164080e445e84885015958d8ff4 47b49c06eb62504075f0f2e2227aee2e2c2a58b3 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1c7e17b1c4d60cc5aa575460f7efb73686dd3b39 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected ac663c54f40b2830b1ca32d1ae9d683fe248b14c git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 4.4.34 4.5 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 4.8.10 4.9 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 4.9","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 4.9 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.4.301 5.4.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.10.246 5.10.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.15.195 5.15.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.1.156 6.1.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.6.112 6.6.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.53 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.17.3 6.17.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":{"cve_year":"2025","cve_id":"40124","cve":"CVE-2025-40124","epss":"0.001510000","percentile":"0.048250000","score_date":"2026-07-31","updated_at":"2026-08-01 00:10:35"},"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["arch/sparc/lib/U3memcpy.S"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"fdd43fe6d286f27b826572457a89c926f97e2d3a","status":"affected","version":"ee841d0aff649164080e445e84885015958d8ff4","versionType":"git"},{"lessThan":"1198077606aeffb102587c6ea079ce99641c99d4","status":"affected","version":"ee841d0aff649164080e445e84885015958d8ff4","versionType":"git"},{"lessThan":"1857cdca12c4aff58bf26a7005a4d02850c29927","status":"affected","version":"ee841d0aff649164080e445e84885015958d8ff4","versionType":"git"},{"lessThan":"91eda032eb16e5d2be27c95584665bc555bb5a90","status":"affected","version":"ee841d0aff649164080e445e84885015958d8ff4","versionType":"git"},{"lessThan":"dc766c4830a7e1e1ee9d7f77d4ab344f2eb23c8e","status":"affected","version":"ee841d0aff649164080e445e84885015958d8ff4","versionType":"git"},{"lessThan":"5ef9c94d7110e90260c06868cf1dcf899b9f25ee","status":"affected","version":"ee841d0aff649164080e445e84885015958d8ff4","versionType":"git"},{"lessThan":"e50377c6b3f278c9f3ef017ffce17f5fcc9dace4","status":"affected","version":"ee841d0aff649164080e445e84885015958d8ff4","versionType":"git"},{"lessThan":"47b49c06eb62504075f0f2e2227aee2e2c2a58b3","status":"affected","version":"ee841d0aff649164080e445e84885015958d8ff4","versionType":"git"},{"status":"affected","version":"1c7e17b1c4d60cc5aa575460f7efb73686dd3b39","versionType":"git"},{"status":"affected","version":"ac663c54f40b2830b1ca32d1ae9d683fe248b14c","versionType":"git"},{"lessThan":"4.5","status":"affected","version":"4.4.34","versionType":"semver"},{"lessThan":"4.9","status":"affected","version":"4.8.10","versionType":"semver"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["arch/sparc/lib/U3memcpy.S"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"4.9"},{"lessThan":"4.9","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"5.4.*","status":"unaffected","version":"5.4.301","versionType":"semver"},{"lessThanOrEqual":"5.10.*","status":"unaffected","version":"5.10.246","versionType":"semver"},{"lessThanOrEqual":"5.15.*","status":"unaffected","version":"5.15.195","versionType":"semver"},{"lessThanOrEqual":"6.1.*","status":"unaffected","version":"6.1.156","versionType":"semver"},{"lessThanOrEqual":"6.6.*","status":"unaffected","version":"6.6.112","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.53","versionType":"semver"},{"lessThanOrEqual":"6.17.*","status":"unaffected","version":"6.17.3","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"6.18","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.4.301","versionStartIncluding":"4.9","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.10.246","versionStartIncluding":"4.9","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.15.195","versionStartIncluding":"4.9","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.1.156","versionStartIncluding":"4.9","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.6.112","versionStartIncluding":"4.9","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.53","versionStartIncluding":"4.9","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.17.3","versionStartIncluding":"4.9","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18","versionStartIncluding":"4.9","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.4.34","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.8.10","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nsparc: fix accurate exception reporting in copy_{from_to}_user for UltraSPARC III\n\nAnthony Yznaga tracked down that a BUG_ON in ext4 code with large folios\nenabled resulted from copy_from_user() returning impossibly large values\ngreater than the size to be copied. This lead to __copy_from_iter()\nreturning impossible values instead of the actual number of bytes it was\nable to copy.\n\nThe BUG_ON has been reported in\nhttps://lore.kernel.org/r/b14f55642207e63e907965e209f6323a0df6dcee.camel@physik.fu-berlin.de\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. The exception handlers expect that\n%o2 has already been masked during the bulk copy loop, but the masking was\nperformed after that loop. This will fix the return value of copy_from_user\nand copy_to_user in the faulting case. The behaviour of memcpy stays\nunchanged."}],"metrics":[{"cvssV3_1":{"baseScore":7.8,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"}}],"providerMetadata":{"dateUpdated":"2026-07-30T06:00:48.718Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/fdd43fe6d286f27b826572457a89c926f97e2d3a"},{"url":"https://git.kernel.org/stable/c/1198077606aeffb102587c6ea079ce99641c99d4"},{"url":"https://git.kernel.org/stable/c/1857cdca12c4aff58bf26a7005a4d02850c29927"},{"url":"https://git.kernel.org/stable/c/91eda032eb16e5d2be27c95584665bc555bb5a90"},{"url":"https://git.kernel.org/stable/c/dc766c4830a7e1e1ee9d7f77d4ab344f2eb23c8e"},{"url":"https://git.kernel.org/stable/c/5ef9c94d7110e90260c06868cf1dcf899b9f25ee"},{"url":"https://git.kernel.org/stable/c/e50377c6b3f278c9f3ef017ffce17f5fcc9dace4"},{"url":"https://git.kernel.org/stable/c/47b49c06eb62504075f0f2e2227aee2e2c2a58b3"}],"title":"sparc: fix accurate exception reporting in copy_{from_to}_user for UltraSPARC III","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2025-40124","datePublished":"2025-11-12T10:23:19.861Z","dateReserved":"2025-04-16T07:20:57.169Z","dateUpdated":"2026-07-30T06:00:48.718Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2025-11-12 11:15:41","lastModifiedDate":"2026-07-30 06:24:12","problem_types":[],"metrics":{"cvssMetricV31":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"},"exploitabilityScore":1.8,"impactScore":5.9}]},"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2025","CveId":"40124","Ordinal":"1","Title":"sparc: fix accurate exception reporting in copy_{from_to}_user f","CVE":"CVE-2025-40124","Year":"2025"},"notes":[{"CveYear":"2025","CveId":"40124","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nsparc: fix accurate exception reporting in copy_{from_to}_user for UltraSPARC III\n\nAnthony Yznaga tracked down that a BUG_ON in ext4 code with large folios\nenabled resulted from copy_from_user() returning impossibly large values\ngreater than the size to be copied. This lead to __copy_from_iter()\nreturning impossible values instead of the actual number of bytes it was\nable to copy.\n\nThe BUG_ON has been reported in\nhttps://lore.kernel.org/r/b14f55642207e63e907965e209f6323a0df6dcee.camel@physik.fu-berlin.de\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. The exception handlers expect that\n%o2 has already been masked during the bulk copy loop, but the masking was\nperformed after that loop. This will fix the return value of copy_from_user\nand copy_to_user in the faulting case. The behaviour of memcpy stays\nunchanged.","Type":"Description","Title":"sparc: fix accurate exception reporting in copy_{from_to}_user f"}]}}}