LiveActive security incident?Get immediate response
CVE Record

CVE-2026-31718: ksmbd: fix use-after-free in __ksmbd_close_fd() via durable scavenger

In the Linux kernel, the following vulnerability has been resolved: ksmbd: fix use-after-free in __ksmbd_close_fd() via durable scavenger When a durable file handle survives session disconnect (TCP close without SMB2_LOGOFF), session_fd_check() sets fp->conn = NULL to preserve the handle for later reconnection. However, it did not clean up the byte-range locks on fp->lock_list. Later, when the durable scavenger thread times out and calls __ksmbd_close_fd(NULL, fp), the lock cleanup loop did: spin_lock(&fp->conn->llist_lock); This caused a slab use-after-free because fp->conn was NULL and the original connection object had already been freed by ksmbd_tcp_disconnect(). The root cause is asymmetric cleanup: lock entries (smb_lock->clist) were left dangling on the freed conn->lock_list while fp->conn was nulled out. To fix this issue properly, we need to handle the lifetime of smb_lock->clist across three paths: - Safely skip clist deletion when list is empty and fp->conn is NULL. - Remove the lock from the old connection's lock_list in session_fd_check() - Re-add the lock to the new connection's lock_list in ksmbd_reopen_durable_fd().

CriticalCVSS 9.8Not KEV-listedUpdated
Glexia's TakeAutomated analysiscritical

Security readout for executives and security teams

Plain-English summary

A flaw in Linux’s in-kernel SMB server, ksmbd, can access invalid memory after a durable file handle survives an abrupt connection loss. The supplied CVSS rating is 9.8 because network access without authentication may expose confidentiality, integrity, and availability. The sources do not demonstrate those impacts or successful code execution.

Executive priority

Prioritize immediate inventory and expedited patching of reachable ksmbd servers. The critical rating and unauthenticated network vector justify urgency, although active exploitation is not established. Systems not running ksmbd are unlikely to expose this code path; confirm service usage before escalating broad Linux fleet remediation.

Technical view

An SMB connection can be freed while durable-handle byte-range locks still reference its lock list. When the scavenger later closes the timed-out handle, cleanup dereferences the cleared or freed connection, causing a use-after-free. The upstream fix makes lock-list cleanup safe and transfers lock entries correctly during durable-handle preservation and reconnection.

Likely exposure

Exposure concerns Linux systems running the ksmbd SMB server, particularly when reachable clients can create durable handles and disconnect without SMB2_LOGOFF. The bundle lists several affected kernel identifiers, but does not provide reliable distribution-specific boundaries. Backported fixes mean kernel version strings alone may not establish vulnerability.

Exploitation context

The supplied record assigns network reachability, low complexity, no privileges, and no user interaction. However, it is not in KEV, and none of the supplied sources reports active exploitation or a public working exploit. Treat the CVSS impact as assessed potential, not evidence that every impact has been demonstrated.

Researcher notes

The failure requires durable-handle preservation, retained byte-range locks, connection teardown, and later scavenger cleanup. Review all three corrected lifetime paths: safe deletion with no connection, removal from the old connection during session cleanup, and reattachment after durable reconnection. Supplied data is insufficient to determine exploit reliability or exact distribution package ranges.

Mitigation direction

  • Follow Linux distributor guidance and install a stable kernel containing the applicable upstream fix.
  • Until patched, disable ksmbd where it is unnecessary or restrict SMB access to trusted networks.
  • Treat network restrictions as compensating controls, not confirmed prevention of exploitation.
  • Prioritize internet-reachable or broadly accessible ksmbd servers for remediation.

Validation and detection

  • Identify systems where ksmbd is active and record their running kernel builds.
  • Compare each build with distributor advisories and the applicable upstream stable fix commit.
  • Confirm SMB exposure is limited to intended networks while remediation remains pending.
  • After updating, verify the installed kernel contains the applicable fix or documented backport.
  • Monitor kernel logs and crash telemetry for ksmbd memory faults after abrupt SMB disconnections.
Prepared
Confidence
medium
Sources
7

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.

cve · low confidence lookup

CVE-2026-31718 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
Critical
CVSS
9.8 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

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.

1CVSS vectors
3Timeline events
0ADP providers
6Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
9.8CVSS 3.1CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H3.95.9Linux

Vulnerability scoring details

Base CVSS 3.1 score

9.8Critical
CVSS 3.1 vector shape for CVE-2026-31718Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

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
LinuxLinux8df4bcdb0a4232192b2445256c39b787d58ef14d, c8efcc786146a951091588e5fa7e3c754850cb3c, c8efcc786146a951091588e5fa7e3c754850cb3c, c8efcc786146a951091588e5fa7e3c754850cb3c, c8efcc786146a951091588e5fa7e3c754850cb3c, 6.6.32unaffected
LinuxLinux6.9, 0, 6.6.140, 6.12.84, 6.18.25, 7.0.2, 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.