{"api_version":"1","generated_at":"2026-10-27T14:37:49+00:00","cve":"CVE-2025-40358","urls":{"html":"https://cve.report/CVE-2025-40358","api":"https://cve.report/api/cve/CVE-2025-40358.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2025-40358","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2025-40358"},"summary":{"title":"riscv: stacktrace: Disable KASAN checks for non-current tasks","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nriscv: stacktrace: Disable KASAN checks for non-current tasks\n\nUnwinding the stack of a task other than current, KASAN would report\n\"BUG: KASAN: out-of-bounds in walk_stackframe+0x41c/0x460\"\n\nThere is a same issue on x86 and has been resolved by the commit\n84936118bdf3 (\"x86/unwind: Disable KASAN checks for non-current tasks\")\nThe solution could be applied to RISC-V too.\n\nThis patch also can solve the issue:\nhttps://seclists.org/oss-sec/2025/q4/23\n\n[pjw@kernel.org: clean up checkpatch issues]","state":"PUBLISHED","assigner":"Linux","published_at":"2025-12-16 14:15:47","updated_at":"2026-10-14 13:10:00"},"problem_types":[],"metrics":[{"version":"3.1","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","score":"7.1","severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","data":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","baseScore":7.1,"baseSeverity":"HIGH","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"NONE","availabilityImpact":"HIGH"}},{"version":"3.1","source":"CNA","type":"DECLARED","score":"7.1","severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","data":{"baseScore":7.1,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","version":"3.1"}}],"references":[{"url":"https://git.kernel.org/stable/c/ef4d626ac59a56f8ec5cc09c1fef26f2923eec6f","name":"https://git.kernel.org/stable/c/ef4d626ac59a56f8ec5cc09c1fef26f2923eec6f","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/f34ba22989da61186f30a40b6a82e0b3337b96fc","name":"https://git.kernel.org/stable/c/f34ba22989da61186f30a40b6a82e0b3337b96fc","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/2c8d2b53866fb229b438296526ef0fa5a990e5e5","name":"https://git.kernel.org/stable/c/2c8d2b53866fb229b438296526ef0fa5a990e5e5","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/060ea84a484e852b52b938f234bf9b5503a6c910","name":"https://git.kernel.org/stable/c/060ea84a484e852b52b938f234bf9b5503a6c910","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/27379fcc15a10d3e3780fe79ba3fc7ed1ccd78e2","name":"https://git.kernel.org/stable/c/27379fcc15a10d3e3780fe79ba3fc7ed1ccd78e2","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2025-40358","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-40358","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 5d8544e2d0075a5f3c9a2cf27152354d54360da1 ef4d626ac59a56f8ec5cc09c1fef26f2923eec6f git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 5d8544e2d0075a5f3c9a2cf27152354d54360da1 f34ba22989da61186f30a40b6a82e0b3337b96fc git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 5d8544e2d0075a5f3c9a2cf27152354d54360da1 27379fcc15a10d3e3780fe79ba3fc7ed1ccd78e2 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 5d8544e2d0075a5f3c9a2cf27152354d54360da1 2c8d2b53866fb229b438296526ef0fa5a990e5e5 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 5d8544e2d0075a5f3c9a2cf27152354d54360da1 060ea84a484e852b52b938f234bf9b5503a6c910 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 4.15","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 4.15 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.1.167 6.1.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.6.117 6.6.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.58 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.17.8 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":"40358","cve":"CVE-2025-40358","epss":"0.001300000","percentile":"0.030300000","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/riscv/kernel/stacktrace.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"ef4d626ac59a56f8ec5cc09c1fef26f2923eec6f","status":"affected","version":"5d8544e2d0075a5f3c9a2cf27152354d54360da1","versionType":"git"},{"lessThan":"f34ba22989da61186f30a40b6a82e0b3337b96fc","status":"affected","version":"5d8544e2d0075a5f3c9a2cf27152354d54360da1","versionType":"git"},{"lessThan":"27379fcc15a10d3e3780fe79ba3fc7ed1ccd78e2","status":"affected","version":"5d8544e2d0075a5f3c9a2cf27152354d54360da1","versionType":"git"},{"lessThan":"2c8d2b53866fb229b438296526ef0fa5a990e5e5","status":"affected","version":"5d8544e2d0075a5f3c9a2cf27152354d54360da1","versionType":"git"},{"lessThan":"060ea84a484e852b52b938f234bf9b5503a6c910","status":"affected","version":"5d8544e2d0075a5f3c9a2cf27152354d54360da1","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["arch/riscv/kernel/stacktrace.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"4.15"},{"lessThan":"4.15","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.1.*","status":"unaffected","version":"6.1.167","versionType":"semver"},{"lessThanOrEqual":"6.6.*","status":"unaffected","version":"6.6.117","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.58","versionType":"semver"},{"lessThanOrEqual":"6.17.*","status":"unaffected","version":"6.17.8","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":"6.1.167","versionStartIncluding":"4.15","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.6.117","versionStartIncluding":"4.15","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.58","versionStartIncluding":"4.15","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.17.8","versionStartIncluding":"4.15","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18","versionStartIncluding":"4.15","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nriscv: stacktrace: Disable KASAN checks for non-current tasks\n\nUnwinding the stack of a task other than current, KASAN would report\n\"BUG: KASAN: out-of-bounds in walk_stackframe+0x41c/0x460\"\n\nThere is a same issue on x86 and has been resolved by the commit\n84936118bdf3 (\"x86/unwind: Disable KASAN checks for non-current tasks\")\nThe solution could be applied to RISC-V too.\n\nThis patch also can solve the issue:\nhttps://seclists.org/oss-sec/2025/q4/23\n\n[pjw@kernel.org: clean up checkpatch issues]"}],"metrics":[{"cvssV3_1":{"baseScore":7.1,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","version":"3.1"},"scenarios":[{"lang":"en","value":"AV:L - The unwinder is reached through local interfaces only — reading /proc/PID/stack, or by inducing a hung-task/OOM-reaper/workqueue-stall stack dump from a local process. No network-facing code path reaches walk_stackframe on a non-current task.\nAC:L - The attacker controls both sides of the race: one thread spins in the kernel while a sibling thread reads the stack of the still-running task, which is exactly what the published syzkaller reproducer does. No memory layout or timing condition outside the attacker's influence is needed.\nPR:L - The demonstrated /proc/PID/stack path requires CAP_SYS_ADMIN in the initial user namespace, but the same non-current unwind is reached without privileges via default-enabled paths that dump a concurrently running task — hung_task's debug_show_blocker() on a running mutex owner, the OOM reaper failure dump, and the workqueue stall watchdog. An ordinary local account suffices for those.\nUI:N - The attacker triggers the stack walk entirely from its own threads; no action by another user or administrator is required.\nS:U - The faulty read and its consequences are confined to the kernel's own security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - The unwinder performs an out-of-bounds read of another task's live kernel stack, following an attacker-influenced frame chain to essentially arbitrary offsets within that stack, and the resulting KASAN splat plus /proc/PID/stack output disclose raw kernel stack and text addresses, defeating KASLR.\nI:N - walk_stackframe only loads values from the stack and reports them through a bounded consumer callback; there is no write of any kind, so no kernel state can be modified.\nA:H - The KASAN report goes through check_panic_on_warn(\"KASAN\") and honors kasan.fault=panic, so a repeatable attacker-triggered splat becomes a kernel panic on such configurations, and unbounded report flooding degrades the system otherwise."}]}],"providerMetadata":{"dateUpdated":"2026-08-05T12:09:53.455Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/ef4d626ac59a56f8ec5cc09c1fef26f2923eec6f"},{"url":"https://git.kernel.org/stable/c/f34ba22989da61186f30a40b6a82e0b3337b96fc"},{"url":"https://git.kernel.org/stable/c/27379fcc15a10d3e3780fe79ba3fc7ed1ccd78e2"},{"url":"https://git.kernel.org/stable/c/2c8d2b53866fb229b438296526ef0fa5a990e5e5"},{"url":"https://git.kernel.org/stable/c/060ea84a484e852b52b938f234bf9b5503a6c910"}],"title":"riscv: stacktrace: Disable KASAN checks for non-current tasks","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2025-40358","datePublished":"2025-12-16T13:39:57.847Z","dateReserved":"2025-04-16T07:20:57.187Z","dateUpdated":"2026-08-05T12:09:53.455Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2025-12-16 14:15:47","lastModifiedDate":"2026-10-14 13:10:00","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:N/A:H","baseScore":7.1,"baseSeverity":"HIGH","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"NONE","availabilityImpact":"HIGH"},"exploitabilityScore":1.8,"impactScore":5.2}]},"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2025","CveId":"40358","Ordinal":"1","Title":"riscv: stacktrace: Disable KASAN checks for non-current tasks","CVE":"CVE-2025-40358","Year":"2025"},"notes":[{"CveYear":"2025","CveId":"40358","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nriscv: stacktrace: Disable KASAN checks for non-current tasks\n\nUnwinding the stack of a task other than current, KASAN would report\n\"BUG: KASAN: out-of-bounds in walk_stackframe+0x41c/0x460\"\n\nThere is a same issue on x86 and has been resolved by the commit\n84936118bdf3 (\"x86/unwind: Disable KASAN checks for non-current tasks\")\nThe solution could be applied to RISC-V too.\n\nThis patch also can solve the issue:\nhttps://seclists.org/oss-sec/2025/q4/23\n\n[pjw@kernel.org: clean up checkpatch issues]","Type":"Description","Title":"riscv: stacktrace: Disable KASAN checks for non-current tasks"}]}}}