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

CVE-2024-58087 (GCVE-0-2024-58087)

Vulnerability from cvelistv5 – Published: 2025-03-12 07:28 – Updated: 2026-08-05 11:47
VLAI
Title
ksmbd: fix racy issue from session lookup and expire
Summary
In the Linux kernel, the following vulnerability has been resolved: ksmbd: fix racy issue from session lookup and expire Increment the session reference count within the lock for lookup to avoid racy issue with session expire.
SSVC
Exploitation: none Automatable: no Technical Impact: total
CISA Coordinator · CISA-ADP (v2.0.3)
Decision recorded 2025-10-01 19:26 UTC
CWE
Impacted products
Vendor Product Version CPE status
Linux Linux Affected: 0626e6641f6b467447c81dd7678a69c66f7746cf , < 2107ab40629aeabbec369cf34b8cf0f288c3eb1b (git)
Affected: 0626e6641f6b467447c81dd7678a69c66f7746cf , < 37a0e2b362b3150317fb6e2139de67b1e29ae5ff (git)
Affected: 0626e6641f6b467447c81dd7678a69c66f7746cf , < 450a844c045ff0895d41b05a1cbe8febd1acfcfd (git)
Affected: 0626e6641f6b467447c81dd7678a69c66f7746cf , < a39e31e22a535d47b14656a7d6a893c7f6cf758c (git)
Affected: 0626e6641f6b467447c81dd7678a69c66f7746cf , < b95629435b84b9ecc0c765995204a4d8a913ed52 (git)
guessed Create a notification for this product.
Linux Linux Affected: 5.15
Unaffected: 0 , < 5.15 (semver)
Unaffected: 5.15.176 , ≤ 5.15.* (semver)
Unaffected: 6.1.121 , ≤ 6.1.* (semver)
Unaffected: 6.6.67 , ≤ 6.6.* (semver)
Unaffected: 6.12.6 , ≤ 6.12.* (semver)
Unaffected: 6.13 , ≤ * (original_commit_for_fix)
guessed Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "cvssV3_1": {
              "attackComplexity": "HIGH",
              "attackVector": "NETWORK",
              "availabilityImpact": "HIGH",
              "baseScore": 8.1,
              "baseSeverity": "HIGH",
              "confidentialityImpact": "HIGH",
              "integrityImpact": "HIGH",
              "privilegesRequired": "NONE",
              "scope": "UNCHANGED",
              "userInteraction": "NONE",
              "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H",
              "version": "3.1"
            }
          },
          {
            "other": {
              "content": {
                "id": "CVE-2024-58087",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "total"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2025-10-01T19:26:55.319254Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "problemTypes": [
          {
            "descriptions": [
              {
                "cweId": "CWE-667",
                "description": "CWE-667 Improper Locking",
                "lang": "en",
                "type": "CWE"
              }
            ]
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2025-10-01T19:36:35.134Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/smb/server/auth.c",
            "fs/smb/server/mgmt/user_session.c",
            "fs/smb/server/server.c",
            "fs/smb/server/smb2pdu.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "2107ab40629aeabbec369cf34b8cf0f288c3eb1b",
              "status": "affected",
              "version": "0626e6641f6b467447c81dd7678a69c66f7746cf",
              "versionType": "git"
            },
            {
              "lessThan": "37a0e2b362b3150317fb6e2139de67b1e29ae5ff",
              "status": "affected",
              "version": "0626e6641f6b467447c81dd7678a69c66f7746cf",
              "versionType": "git"
            },
            {
              "lessThan": "450a844c045ff0895d41b05a1cbe8febd1acfcfd",
              "status": "affected",
              "version": "0626e6641f6b467447c81dd7678a69c66f7746cf",
              "versionType": "git"
            },
            {
              "lessThan": "a39e31e22a535d47b14656a7d6a893c7f6cf758c",
              "status": "affected",
              "version": "0626e6641f6b467447c81dd7678a69c66f7746cf",
              "versionType": "git"
            },
            {
              "lessThan": "b95629435b84b9ecc0c765995204a4d8a913ed52",
              "status": "affected",
              "version": "0626e6641f6b467447c81dd7678a69c66f7746cf",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/smb/server/auth.c",
            "fs/smb/server/mgmt/user_session.c",
            "fs/smb/server/server.c",
            "fs/smb/server/smb2pdu.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.15"
            },
            {
              "lessThan": "5.15",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.176",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.121",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.67",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.6",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.13",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.176",
                  "versionStartIncluding": "5.15",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.121",
                  "versionStartIncluding": "5.15",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6.67",
                  "versionStartIncluding": "5.15",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.6",
                  "versionStartIncluding": "5.15",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.13",
                  "versionStartIncluding": "5.15",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: fix racy issue from session lookup and expire\n\nIncrement the session reference count within the lock for lookup to avoid\nracy issue with session expire."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 9.8,
            "baseSeverity": "CRITICAL",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:N - ksmbd is the in-kernel SMB server processing requests received on TCP port 445; every affected path (`smb2_sess_setup`, `smb2_check_user_session`, `smb3_decrypt_req`, `__handle_ksmbd_work`) is driven directly by attacker-supplied SMB2 PDUs from a remote peer.\nAC:L - The attacker controls both sides of the race \u2014 it pipelines up to 8192 concurrent requests per connection (each handled by a separate ksmbd-io kworker), drives sessions into EXPIRED/IN_PROGRESS state so `ksmbd_expire_session()` frees them with no timeout, and the `__handle_ksmbd_work` window spans an entire AES-GCM response encryption. A lost race yields only a benign SMB error, so it can be retried indefinitely.\nPR:N - Two of the three unreferenced lookups live inside `smb2_sess_setup()` \u2014 the authentication handshake itself \u2014 and operate on attacker-supplied, sequentially-allocated (trivially enumerable) session IDs before any credential is verified, including `ksmbd_session_lookup_slowpath()` against the global session table. Additionally, `ntlm_authenticate()` skips password verification entirely for guest/anonymous users, so under the common \"map to guest\" configuration an unauthenticated peer obtains a VALID session and reaches all remaining paths.\nUI:N - Exploitation requires only that the attacker send SMB2 requests to the listening ksmbd service; no action by any local user or administrator is involved.\nS:U - The use-after-free corrupts kernel heap memory within the kernel\u0027s own security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - The freed `struct ksmbd_session` is read after free, including `smb3encryptionkey`/`smb3decryptionkey`/`smb3signingkey` \u2014 `encrypt_resp()` encrypts responses using whatever now occupies that slab, leaking freed kernel memory to the wire; controlling the reallocated `sess-\u003euser` and `file_table` pointers escalates this to arbitrary kernel read.\nI:H - The bug yields multiple write primitives on freed memory \u2014 `atomic_inc/dec` on `sess-\u003erefcnt`, `sess-\u003estate = SMB2_SESSION_EXPIRED`, `sess-\u003euser = NULL`, and `kfree(sess-\u003ePreauth_HashValue)` plus xarray-walking frees in `ksmbd_session_destroy()` \u2014 giving arbitrary-free and controlled-pointer corruption suitable for control-flow hijack, and `sess-\u003euser` directly governs SMB access-control decisions.\nA:H - Any lost race dereferences freed slab memory, reliably producing a kernel oops or panic in the ksmbd worker, and the attacker can trigger it repeatedly from the network to take down the file server."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T11:47:38.424Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/2107ab40629aeabbec369cf34b8cf0f288c3eb1b"
        },
        {
          "url": "https://git.kernel.org/stable/c/37a0e2b362b3150317fb6e2139de67b1e29ae5ff"
        },
        {
          "url": "https://git.kernel.org/stable/c/450a844c045ff0895d41b05a1cbe8febd1acfcfd"
        },
        {
          "url": "https://git.kernel.org/stable/c/a39e31e22a535d47b14656a7d6a893c7f6cf758c"
        },
        {
          "url": "https://git.kernel.org/stable/c/b95629435b84b9ecc0c765995204a4d8a913ed52"
        },
        {
          "url": "https://www.zerodayinitiative.com/advisories/ZDI-25-100/"
        }
      ],
      "title": "ksmbd: fix racy issue from session lookup and expire",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-58087",
    "datePublished": "2025-03-12T07:28:09.114Z",
    "dateReserved": "2025-03-06T15:52:09.185Z",
    "dateUpdated": "2026-08-05T11:47:38.424Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2024-58087",
      "date": "2026-09-16",
      "epss": "0.00498",
      "percentile": "0.41466"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2024-58087\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-03-12T08:15:11.810\",\"lastModified\":\"2026-08-04T11:22:38.603\",\"vulnStatus\":\"Modified\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nksmbd: fix racy issue from session lookup and expire\\n\\nIncrement the session reference count within the lock for lookup to avoid\\nracy issue with session expire.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: ksmbd: corrige problema de rapidez en la b\u00fasqueda y expiraci\u00f3n de la sesi\u00f3n Incrementa el recuento de referencia de sesi\u00f3n dentro del bloqueo para la b\u00fasqueda para evitar problemas de rapidez con la expiraci\u00f3n de la sesi\u00f3n.\"}],\"affected\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"affectedData\":[{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"unaffected\",\"programFiles\":[\"fs/smb/server/auth.c\",\"fs/smb/server/mgmt/user_session.c\",\"fs/smb/server/server.c\",\"fs/smb/server/smb2pdu.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"0626e6641f6b467447c81dd7678a69c66f7746cf\",\"lessThan\":\"2107ab40629aeabbec369cf34b8cf0f288c3eb1b\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"0626e6641f6b467447c81dd7678a69c66f7746cf\",\"lessThan\":\"37a0e2b362b3150317fb6e2139de67b1e29ae5ff\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"0626e6641f6b467447c81dd7678a69c66f7746cf\",\"lessThan\":\"450a844c045ff0895d41b05a1cbe8febd1acfcfd\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"0626e6641f6b467447c81dd7678a69c66f7746cf\",\"lessThan\":\"a39e31e22a535d47b14656a7d6a893c7f6cf758c\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"0626e6641f6b467447c81dd7678a69c66f7746cf\",\"lessThan\":\"b95629435b84b9ecc0c765995204a4d8a913ed52\",\"versionType\":\"git\",\"status\":\"affected\"}]},{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"affected\",\"programFiles\":[\"fs/smb/server/auth.c\",\"fs/smb/server/mgmt/user_session.c\",\"fs/smb/server/server.c\",\"fs/smb/server/smb2pdu.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"5.15\",\"status\":\"affected\"},{\"version\":\"0\",\"lessThan\":\"5.15\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"5.15.176\",\"lessThanOrEqual\":\"5.15.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.1.121\",\"lessThanOrEqual\":\"6.1.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.6.67\",\"lessThanOrEqual\":\"6.6.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.12.6\",\"lessThanOrEqual\":\"6.12.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.13\",\"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:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H\",\"baseScore\":9.8,\"baseSeverity\":\"CRITICAL\",\"attackVector\":\"NETWORK\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"NONE\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"HIGH\",\"integrityImpact\":\"HIGH\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":3.9,\"impactScore\":5.9},{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H\",\"baseScore\":8.1,\"baseSeverity\":\"HIGH\",\"attackVector\":\"NETWORK\",\"attackComplexity\":\"HIGH\",\"privilegesRequired\":\"NONE\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"HIGH\",\"integrityImpact\":\"HIGH\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":2.2,\"impactScore\":5.9},{\"source\":\"134c704f-9b21-4f2e-91b3-4a467353bcc0\",\"type\":\"Secondary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H\",\"baseScore\":8.1,\"baseSeverity\":\"HIGH\",\"attackVector\":\"NETWORK\",\"attackComplexity\":\"HIGH\",\"privilegesRequired\":\"NONE\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"HIGH\",\"integrityImpact\":\"HIGH\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":2.2,\"impactScore\":5.9}],\"ssvcV203\":[{\"source\":\"134c704f-9b21-4f2e-91b3-4a467353bcc0\",\"ssvcData\":{\"timestamp\":\"2025-10-01T19:26:55.319254Z\",\"id\":\"CVE-2024-58087\",\"options\":[{\"exploitation\":\"none\"},{\"automatable\":\"no\"},{\"technicalImpact\":\"total\"}],\"role\":\"CISA Coordinator\",\"version\":\"2.0.3\"}}]},\"weaknesses\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-667\"}]},{\"source\":\"134c704f-9b21-4f2e-91b3-4a467353bcc0\",\"type\":\"Secondary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-667\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.15.145\",\"versionEndExcluding\":\"5.15.176\",\"matchCriteriaId\":\"5258FF49-104E-4A25-8BF2-5FAC8A3CB92B\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.1.29\",\"versionEndExcluding\":\"6.1.121\",\"matchCriteriaId\":\"63AC31AB-1504-438D-ADB2-992A6B2314E9\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.2.16\",\"versionEndExcluding\":\"6.3\",\"matchCriteriaId\":\"16E4CFA4-3F36-4CF1-9C4C-B185D57ECE60\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.3.2\",\"versionEndExcluding\":\"6.4\",\"matchCriteriaId\":\"D34CEEAF-3FD7-4A5F-98C7-05AA7558CEF6\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.7\",\"versionEndExcluding\":\"6.12.6\",\"matchCriteriaId\":\"0CB1A9BB-F95E-43DD-A2FD-147912FD91E5\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.13:rc1:*:*:*:*:*:*\",\"matchCriteriaId\":\"62567B3C-6CEE-46D0-BC2E-B3717FBF7D13\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.13:rc2:*:*:*:*:*:*\",\"matchCriteriaId\":\"5A073481-106D-4B15-B4C7-FB0213B8E1D4\"}]}]}],\"references\":[{\"url\":\"https://git.kernel.org/stable/c/2107ab40629aeabbec369cf34b8cf0f288c3eb1b\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/37a0e2b362b3150317fb6e2139de67b1e29ae5ff\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/450a844c045ff0895d41b05a1cbe8febd1acfcfd\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/a39e31e22a535d47b14656a7d6a893c7f6cf758c\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/b95629435b84b9ecc0c765995204a4d8a913ed52\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://www.zerodayinitiative.com/advisories/ZDI-25-100/\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\",\"Third Party Advisory\"]}]}}",
    "redhat_vex": {
      "aggregate_severity": "Important",
      "current_release_date": "2026-09-13T07:36:03+00:00",
      "cve": "CVE-2024-58087",
      "id": "CVE-2024-58087",
      "initial_release_date": "2024-01-01T00:00:00+00:00",
      "product_status:known_not_affected": "274",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: ksmbd: fix racy issue from session lookup and expire",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2024/cve-2024-58087.json",
      "version": "3"
    },
    "suse_vex": {
      "aggregate_severity": "important",
      "current_release_date": "2026-08-29T01:34:25Z",
      "cve": "CVE-2024-58087",
      "id": "CVE-2024-58087",
      "initial_release_date": "2025-03-12T15:29:35Z",
      "product_status:known_not_affected": "574",
      "source": "SUSE CSAF VEX",
      "status": "interim",
      "title": "SUSE CVE CVE-2024-58087",
      "url": "https://ftp.suse.com/pub/projects/security/csaf-vex/cve-2024-58087.json",
      "version": "15"
    },
    "vulnrichment": {
      "containers": "{\"adp\": [{\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"cvssV3_1\": {\"scope\": \"UNCHANGED\", \"version\": \"3.1\", \"baseScore\": 8.1, \"attackVector\": \"NETWORK\", \"baseSeverity\": \"HIGH\", \"vectorString\": \"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H\", \"integrityImpact\": \"HIGH\", \"userInteraction\": \"NONE\", \"attackComplexity\": \"HIGH\", \"availabilityImpact\": \"HIGH\", \"privilegesRequired\": \"NONE\", \"confidentialityImpact\": \"HIGH\"}}, {\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2024-58087\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"total\"}], \"version\": \"2.0.3\", \"timestamp\": \"2025-10-01T19:26:55.319254Z\"}}}], \"problemTypes\": [{\"descriptions\": [{\"lang\": \"en\", \"type\": \"CWE\", \"cweId\": \"CWE-667\", \"description\": \"CWE-667 Improper Locking\"}]}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2025-10-01T16:57:53.976Z\"}}], \"cna\": {\"title\": \"ksmbd: fix racy issue from session lookup and expire\", \"metrics\": [{\"cvssV3_1\": {\"version\": \"3.1\", \"baseScore\": 9.8, \"baseSeverity\": \"CRITICAL\", \"vectorString\": \"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H\"}, \"scenarios\": [{\"lang\": \"en\", \"value\": \"AV:N - ksmbd is the in-kernel SMB server processing requests received on TCP port 445; every affected path (`smb2_sess_setup`, `smb2_check_user_session`, `smb3_decrypt_req`, `__handle_ksmbd_work`) is driven directly by attacker-supplied SMB2 PDUs from a remote peer.\\nAC:L - The attacker controls both sides of the race \\u2014 it pipelines up to 8192 concurrent requests per connection (each handled by a separate ksmbd-io kworker), drives sessions into EXPIRED/IN_PROGRESS state so `ksmbd_expire_session()` frees them with no timeout, and the `__handle_ksmbd_work` window spans an entire AES-GCM response encryption. A lost race yields only a benign SMB error, so it can be retried indefinitely.\\nPR:N - Two of the three unreferenced lookups live inside `smb2_sess_setup()` \\u2014 the authentication handshake itself \\u2014 and operate on attacker-supplied, sequentially-allocated (trivially enumerable) session IDs before any credential is verified, including `ksmbd_session_lookup_slowpath()` against the global session table. Additionally, `ntlm_authenticate()` skips password verification entirely for guest/anonymous users, so under the common \\\"map to guest\\\" configuration an unauthenticated peer obtains a VALID session and reaches all remaining paths.\\nUI:N - Exploitation requires only that the attacker send SMB2 requests to the listening ksmbd service; no action by any local user or administrator is involved.\\nS:U - The use-after-free corrupts kernel heap memory within the kernel\u0027s own security authority; no VM, IOMMU, or sandbox boundary is crossed.\\nC:H - The freed `struct ksmbd_session` is read after free, including `smb3encryptionkey`/`smb3decryptionkey`/`smb3signingkey` \\u2014 `encrypt_resp()` encrypts responses using whatever now occupies that slab, leaking freed kernel memory to the wire; controlling the reallocated `sess-\u003euser` and `file_table` pointers escalates this to arbitrary kernel read.\\nI:H - The bug yields multiple write primitives on freed memory \\u2014 `atomic_inc/dec` on `sess-\u003erefcnt`, `sess-\u003estate = SMB2_SESSION_EXPIRED`, `sess-\u003euser = NULL`, and `kfree(sess-\u003ePreauth_HashValue)` plus xarray-walking frees in `ksmbd_session_destroy()` \\u2014 giving arbitrary-free and controlled-pointer corruption suitable for control-flow hijack, and `sess-\u003euser` directly governs SMB access-control decisions.\\nA:H - Any lost race dereferences freed slab memory, reliably producing a kernel oops or panic in the ksmbd worker, and the attacker can trigger it repeatedly from the network to take down the file server.\"}]}], \"affected\": [{\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"0626e6641f6b467447c81dd7678a69c66f7746cf\", \"lessThan\": \"2107ab40629aeabbec369cf34b8cf0f288c3eb1b\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"0626e6641f6b467447c81dd7678a69c66f7746cf\", \"lessThan\": \"37a0e2b362b3150317fb6e2139de67b1e29ae5ff\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"0626e6641f6b467447c81dd7678a69c66f7746cf\", \"lessThan\": \"450a844c045ff0895d41b05a1cbe8febd1acfcfd\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"0626e6641f6b467447c81dd7678a69c66f7746cf\", \"lessThan\": \"a39e31e22a535d47b14656a7d6a893c7f6cf758c\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"0626e6641f6b467447c81dd7678a69c66f7746cf\", \"lessThan\": \"b95629435b84b9ecc0c765995204a4d8a913ed52\", \"versionType\": \"git\"}], \"programFiles\": [\"fs/smb/server/auth.c\", \"fs/smb/server/mgmt/user_session.c\", \"fs/smb/server/server.c\", \"fs/smb/server/smb2pdu.c\"], \"defaultStatus\": \"unaffected\"}, {\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"5.15\"}, {\"status\": \"unaffected\", \"version\": \"0\", \"lessThan\": \"5.15\", \"versionType\": \"semver\"}, {\"status\": \"unaffected\", \"version\": \"5.15.176\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"5.15.*\"}, {\"status\": \"unaffected\", \"version\": \"6.1.121\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.1.*\"}, {\"status\": \"unaffected\", \"version\": \"6.6.67\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.6.*\"}, {\"status\": \"unaffected\", \"version\": \"6.12.6\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.12.*\"}, {\"status\": \"unaffected\", \"version\": \"6.13\", \"versionType\": \"original_commit_for_fix\", \"lessThanOrEqual\": \"*\"}], \"programFiles\": [\"fs/smb/server/auth.c\", \"fs/smb/server/mgmt/user_session.c\", \"fs/smb/server/server.c\", \"fs/smb/server/smb2pdu.c\"], \"defaultStatus\": \"affected\"}], \"references\": [{\"url\": \"https://git.kernel.org/stable/c/2107ab40629aeabbec369cf34b8cf0f288c3eb1b\"}, {\"url\": \"https://git.kernel.org/stable/c/37a0e2b362b3150317fb6e2139de67b1e29ae5ff\"}, {\"url\": \"https://git.kernel.org/stable/c/450a844c045ff0895d41b05a1cbe8febd1acfcfd\"}, {\"url\": \"https://git.kernel.org/stable/c/a39e31e22a535d47b14656a7d6a893c7f6cf758c\"}, {\"url\": \"https://git.kernel.org/stable/c/b95629435b84b9ecc0c765995204a4d8a913ed52\"}, {\"url\": \"https://www.zerodayinitiative.com/advisories/ZDI-25-100/\"}], \"x_generator\": {\"engine\": \"bippy-1.2.0\"}, \"descriptions\": [{\"lang\": \"en\", \"value\": \"In the Linux kernel, the following vulnerability has been resolved:\\n\\nksmbd: fix racy issue from session lookup and expire\\n\\nIncrement the session reference count within the lock for lookup to avoid\\nracy issue with session expire.\"}], \"cpeApplicability\": [{\"nodes\": [{\"negate\": false, \"cpeMatch\": [{\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"5.15.176\", \"versionStartIncluding\": \"5.15\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.1.121\", \"versionStartIncluding\": \"5.15\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.6.67\", \"versionStartIncluding\": \"5.15\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.12.6\", \"versionStartIncluding\": \"5.15\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.13\", \"versionStartIncluding\": \"5.15\"}], \"operator\": \"OR\"}]}], \"providerMetadata\": {\"orgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"shortName\": \"Linux\", \"dateUpdated\": \"2026-08-05T11:47:38.424Z\"}}}",
      "cveMetadata": "{\"cveId\": \"CVE-2024-58087\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2026-08-05T11:47:38.424Z\", \"dateReserved\": \"2025-03-06T15:52:09.185Z\", \"assignerOrgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"datePublished\": \"2025-03-12T07:28:09.114Z\", \"assignerShortName\": \"Linux\"}",
      "dataType": "CVE_RECORD",
      "dataVersion": "5.2"
    }
  }
}



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…