GCVE Workshop - 22 September 2026 (14:00-18:00), Luxembourg Before The Vulnopticon Conference - Registration

CVE-2025-40358 (GCVE-0-2025-40358)

Vulnerability from cvelistv5 – Published: 2025-12-16 13:39 – Updated: 2026-08-05 12:09
VLAI
Title
riscv: stacktrace: Disable KASAN checks for non-current tasks
Summary
In the Linux kernel, the following vulnerability has been resolved: riscv: stacktrace: Disable KASAN checks for non-current tasks Unwinding the stack of a task other than current, KASAN would report "BUG: KASAN: out-of-bounds in walk_stackframe+0x41c/0x460" There is a same issue on x86 and has been resolved by the commit 84936118bdf3 ("x86/unwind: Disable KASAN checks for non-current tasks") The solution could be applied to RISC-V too. This patch also can solve the issue: https://seclists.org/oss-sec/2025/q4/23 [pjw@kernel.org: clean up checkpatch issues]
Impacted products
Vendor Product Version CPE status
Linux Linux Affected: 5d8544e2d0075a5f3c9a2cf27152354d54360da1 , < ef4d626ac59a56f8ec5cc09c1fef26f2923eec6f (git)
Affected: 5d8544e2d0075a5f3c9a2cf27152354d54360da1 , < f34ba22989da61186f30a40b6a82e0b3337b96fc (git)
Affected: 5d8544e2d0075a5f3c9a2cf27152354d54360da1 , < 27379fcc15a10d3e3780fe79ba3fc7ed1ccd78e2 (git)
Affected: 5d8544e2d0075a5f3c9a2cf27152354d54360da1 , < 2c8d2b53866fb229b438296526ef0fa5a990e5e5 (git)
Affected: 5d8544e2d0075a5f3c9a2cf27152354d54360da1 , < 060ea84a484e852b52b938f234bf9b5503a6c910 (git)
guessed Create a notification for this product.
Linux Linux Affected: 4.15
Unaffected: 0 , < 4.15 (semver)
Unaffected: 6.1.167 , ≤ 6.1.* (semver)
Unaffected: 6.6.117 , ≤ 6.6.* (semver)
Unaffected: 6.12.58 , ≤ 6.12.* (semver)
Unaffected: 6.17.8 , ≤ 6.17.* (semver)
Unaffected: 6.18 , ≤ * (original_commit_for_fix)
guessed Create a notification for this product.
Show details on NVD website

{
  "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 \u2014 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\u0027s 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 \u2014 hung_task\u0027s 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\u0027s own security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - The unwinder performs an out-of-bounds read of another task\u0027s 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",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2025-40358",
      "date": "2026-09-16",
      "epss": "0.0015",
      "percentile": "0.04546"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2025-40358\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-12-16T14:15:47.753\",\"lastModified\":\"2026-07-30T06:24:31.217\",\"vulnStatus\":\"Deferred\",\"cveTags\":[],\"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]\"}],\"affected\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"affectedData\":[{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"unaffected\",\"programFiles\":[\"arch/riscv/kernel/stacktrace.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"5d8544e2d0075a5f3c9a2cf27152354d54360da1\",\"lessThan\":\"ef4d626ac59a56f8ec5cc09c1fef26f2923eec6f\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"5d8544e2d0075a5f3c9a2cf27152354d54360da1\",\"lessThan\":\"f34ba22989da61186f30a40b6a82e0b3337b96fc\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"5d8544e2d0075a5f3c9a2cf27152354d54360da1\",\"lessThan\":\"27379fcc15a10d3e3780fe79ba3fc7ed1ccd78e2\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"5d8544e2d0075a5f3c9a2cf27152354d54360da1\",\"lessThan\":\"2c8d2b53866fb229b438296526ef0fa5a990e5e5\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"5d8544e2d0075a5f3c9a2cf27152354d54360da1\",\"lessThan\":\"060ea84a484e852b52b938f234bf9b5503a6c910\",\"versionType\":\"git\",\"status\":\"affected\"}]},{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"affected\",\"programFiles\":[\"arch/riscv/kernel/stacktrace.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"4.15\",\"status\":\"affected\"},{\"version\":\"0\",\"lessThan\":\"4.15\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.1.167\",\"lessThanOrEqual\":\"6.1.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.6.117\",\"lessThanOrEqual\":\"6.6.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.12.58\",\"lessThanOrEqual\":\"6.12.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.17.8\",\"lessThanOrEqual\":\"6.17.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.18\",\"lessThanOrEqual\":\"*\",\"versionType\":\"original_commit_for_fix\",\"status\":\"unaffected\"}]}]}],\"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}]},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/060ea84a484e852b52b938f234bf9b5503a6c910\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/27379fcc15a10d3e3780fe79ba3fc7ed1ccd78e2\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/2c8d2b53866fb229b438296526ef0fa5a990e5e5\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/ef4d626ac59a56f8ec5cc09c1fef26f2923eec6f\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/f34ba22989da61186f30a40b6a82e0b3337b96fc\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}",
    "redhat_vex": {
      "aggregate_severity": "Moderate",
      "current_release_date": "2026-08-13T17:59:54+00:00",
      "cve": "CVE-2025-40358",
      "id": "CVE-2025-40358",
      "initial_release_date": "2025-12-16T00:00:00+00:00",
      "product_status:known_not_affected": "274",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: Linux kernel (RISC-V): Information disclosure and denial of service in stacktrace",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-40358.json",
      "version": "3"
    },
    "suse_vex": {
      "aggregate_severity": "moderate",
      "current_release_date": "2026-08-31T00:17:16Z",
      "cve": "CVE-2025-40358",
      "id": "CVE-2025-40358",
      "initial_release_date": "2025-12-17T00:30:22Z",
      "product_status:known_not_affected": "560",
      "source": "SUSE CSAF VEX",
      "status": "interim",
      "title": "SUSE CVE CVE-2025-40358",
      "url": "https://ftp.suse.com/pub/projects/security/csaf-vex/cve-2025-40358.json",
      "version": "17"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…