LiveActive security incident?Get immediate response
CVE Record

CVE-2025-22040: ksmbd: fix session use-after-free in multichannel connection

In the Linux kernel, the following vulnerability has been resolved: ksmbd: fix session use-after-free in multichannel connection There is a race condition between session setup and ksmbd_sessions_deregister. The session can be freed before the connection is added to channel list of session. This patch check reference count of session before freeing it.

HighCVSS 8.8Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

A race in Linux’s ksmbd SMB server can free a session while another connection is still attaching to it. The resulting use-after-free may crash the system or corrupt kernel memory, potentially affecting confidentiality, integrity, and availability. Risk is concentrated on systems that run ksmbd and accept reachable SMB connections.

Executive priority

Treat as a high-priority patching issue for reachable ksmbd servers, especially systems serving less-trusted clients. Systems not using ksmbd are unlikely to be directly exposed. Because active exploitation is not established, prioritize through normal emergency-risk processes rather than declaring an active incident solely from this CVE.

Technical view

CVE-2025-22040 is a CWE-416 use-after-free caused by a race between session setup and ksmbd_sessions_deregister during multichannel connection handling. A session may be freed before the connection joins its channel list. The kernel fix checks the session reference count before freeing it. CVSS 3.1 is 8.8: network-accessible, low complexity, low privileges, and no user interaction.

Likely exposure

Likely exposure is limited to Linux systems using the in-kernel ksmbd SMB server, particularly where SMB multichannel connections are possible and the service is network-reachable. The supplied affected-version metadata includes 5.15 and several 6.x entries, but does not clearly express branch-specific boundaries. Confirm exposure against distribution advisories and package changelogs.

Exploitation context

The CVSS vector indicates a network attacker with low privileges could potentially trigger the flaw without user interaction. However, the supplied bundle reports that CVE-2025-22040 is not in KEV and provides no evidence of active exploitation or a public exploit. Practical reliability and impact beyond the described kernel-memory race remain unconfirmed.

Researcher notes

The central primitive is a session lifetime race across setup, deregistration, and multichannel list insertion. The patch description identifies reference-count validation as the correction. The bundle lists several stable-tree commits but does not map each commit to precise vulnerable and fixed release ranges. Validate using the exact distribution kernel build, not upstream version strings alone.

Mitigation direction

  • Install a vendor-supported kernel update that includes the applicable stable fix.
  • Check distribution guidance because fixed versions vary across maintained kernel branches.
  • Prioritize systems exposing ksmbd to untrusted or broadly reachable networks.
  • If immediate updating is impossible, request vendor-approved temporary mitigations for ksmbd exposure.

Validation and detection

  • Identify systems loading or configuring ksmbd and determine whether SMB is network-reachable.
  • Record each running kernel version, distribution package release, and active booted kernel.
  • Match package changelogs or vendor advisories to CVE-2025-22040 and the cited stable commits.
  • After updating, reboot if required and verify the fixed kernel is running.
  • Review kernel logs for ksmbd crashes or memory-safety faults, without treating absence as proof of safety.
Prepared
Confidence
high
Sources
9

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.

cwe · low confidence lookup

CWE-416: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2025-22040 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
High
CVSS
8.8 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:L/PR:L/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.

2CVSS vectors
3Timeline events
2ADP providers
8Source links

SSVC decision data

CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: total

CVSS vector scores

2 official scores

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
8.8CVSS 3.1HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H2.85.9Linux
7.8CVSS 3.1HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H1.85.9CISA-ADP

Vulnerability scoring details

Base CVSS 3.1 score

8.8High
CVSS 3.1 vector shape for CVE-2025-22040Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:L/PR:L/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.

ADP provider summaries

CISA-ADPCISA ADP Vulnrichment
cvssV3_1other:ssvc
CVECVE Program Container
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
LinuxLinux0626e6641f6b467447c81dd7678a69c66f7746cf, 0626e6641f6b467447c81dd7678a69c66f7746cf, 0626e6641f6b467447c81dd7678a69c66f7746cf, 0626e6641f6b467447c81dd7678a69c66f7746cf, 0626e6641f6b467447c81dd7678a69c66f7746cf, 0626e6641f6b467447c81dd7678a69c66f7746cfunaffected
LinuxLinux5.15, 0, 6.1.134, 6.6.87, 6.12.23, 6.13.11, 6.14.2, 6.15affected
Weakness

CWE details

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

CWE-416 · source CWE mapping

Use After Free

Use After Free represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.