LiveActive security incident?Get immediate response
CVE Record

CVE-2026-31610: ksmbd: fix mechToken leak when SPNEGO decode fails after token alloc

In the Linux kernel, the following vulnerability has been resolved: ksmbd: fix mechToken leak when SPNEGO decode fails after token alloc The kernel ASN.1 BER decoder calls action callbacks incrementally as it walks the input. When ksmbd_decode_negTokenInit() reaches the mechToken [2] OCTET STRING element, ksmbd_neg_token_alloc() allocates conn->mechToken immediately via kmemdup_nul(). If a later element in the same blob is malformed, then the decoder will return nonzero after the allocation is already live. This could happen if mechListMIC [3] overrunse the enclosing SEQUENCE. decode_negotiation_token() then sets conn->use_spnego = false because both the negTokenInit and negTokenTarg grammars failed. The cleanup at the bottom of smb2_sess_setup() is gated on use_spnego: if (conn->use_spnego && conn->mechToken) { kfree(conn->mechToken); conn->mechToken = NULL; } so the kfree is skipped, causing the mechToken to never be freed. This codepath is reachable pre-authentication, so untrusted clients can cause slow memory leaks on a server without even being properly authenticated. Fix this up by not checking check for use_spnego, as it's not required, so the memory will always be properly freed. At the same time, always free the memory in ksmbd_conn_free() incase some other failure path forgot to free it.

UnknownCVSS not scoredNot KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

A malformed SMB authentication message can make the Linux ksmbd server retain allocated memory before authentication succeeds. Repeated requests could gradually consume kernel memory and reduce service availability. The supplied record does not establish severity, CVSS, or exploitation in the wild.

Executive priority

Treat this as a prompt availability-hardening issue for internet-facing or broadly reachable ksmbd servers. Prioritize exposure discovery and vendor-supported kernel updates. Lower urgency is reasonable where ksmbd is unused or SMB access is tightly restricted, pending exact vendor assessment.

Technical view

During SPNEGO ASN.1 decoding, ksmbd allocates conn->mechToken when processing negTokenInit. If a later element is malformed, decoding fails and use_spnego becomes false, causing conditional cleanup to skip freeing the token. The cited kernel changes remove that condition and add defensive cleanup when freeing the connection.

Likely exposure

Exposure requires a Linux system running ksmbd and accepting SMB connections from untrusted clients. The path is reachable before authentication. The source lists affected releases spanning several kernel branches, but exact distribution package status must be confirmed with each vendor.

Exploitation context

The flaw supports unauthenticated, repeated memory leakage and therefore a potential availability attack. The supplied bundle marks it absent from KEV and provides no evidence of active exploitation, public exploit availability, or demonstrated system exhaustion rates.

Researcher notes

The described trigger is malformed trailing SPNEGO data after mechToken allocation, including an enclosing-sequence overrun involving mechListMIC. Impact is characterized only as a slow pre-authentication leak. No CVSS, CWE, leak rate, crash threshold, or exploitation telemetry is supplied.

Mitigation direction

  • Update to a vendor-supported kernel containing the applicable cited ksmbd fix.
  • Check distribution security advisories for the exact fixed package version.
  • Until updated, restrict SMB access to trusted networks where operationally feasible.
  • Disable ksmbd where SMB service is unnecessary and vendor procedures permit.

Validation and detection

  • Confirm whether ksmbd is enabled, loaded, or configured to provide SMB shares.
  • Identify the running kernel and distribution package version.
  • Verify the vendor package includes the applicable cited stable-kernel change.
  • Confirm SMB exposure is limited to intended clients and network segments.
  • Monitor kernel memory trends and ksmbd stability for unexplained growth.
Prepared
Confidence
high
Sources
10

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

description · low confidence lookup

Credential and access behavior lookup

The CVE wording references authentication or credential exposure, so valid-account and credential-access review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2026-31610 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Unknown
CVSS
Not scored
Known Exploited
No
Published
Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

0CVSS vectors
3Timeline events
0ADP providers
9Source links

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. CVE publishedCVE Program

    The CVE record was published.

  3. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
LinuxLinuxfad4161b5cd01a24202234976ebbb133f7adc0b5, fad4161b5cd01a24202234976ebbb133f7adc0b5, fad4161b5cd01a24202234976ebbb133f7adc0b5, fad4161b5cd01a24202234976ebbb133f7adc0b5, fad4161b5cd01a24202234976ebbb133f7adc0b5, fad4161b5cd01a24202234976ebbb133f7adc0b5, fad4161b5cd01a24202234976ebbb133f7adc0b5, fad4161b5cd01a24202234976ebbb133f7adc0b5unaffected
LinuxLinux5.15, 0, 5.15.212, 6.1.178, 6.6.136, 6.12.83, 6.18.24, 6.19.14, 7.0.1, 7.1affected
Weakness

CWE details

No CWE listed

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.