CVE-2025-21947: ksmbd: fix type confusion via race condition when using ipc_msg_send_request
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: fix type confusion via race condition when using ipc_msg_send_request
req->handle is allocated using ksmbd_acquire_id(&ipc_ida), based on
ida_alloc. req->handle from ksmbd_ipc_login_request and
FSCTL_PIPE_TRANSCEIVE ioctl can be same and it could lead to type confusion
between messages, resulting in access to unexpected parts of memory after
an incorrect delivery. ksmbd check type of ipc response but missing add
continue to check next ipc reponse.
Security readout for executives and security teams
Plain-English summary
A race in Linux’s in-kernel SMB server, ksmbd, can mix up two kinds of internal messages and access unintended memory. A network attacker may be able to affect data confidentiality, integrity, or system availability, although exploitation requires winning a difficult timing condition.
Executive priority
Treat externally or broadly reachable ksmbd servers as high priority and expedite supported kernel updates. Prioritize systems handling sensitive SMB data. The absence of documented active exploitation lowers immediate crisis urgency, but it does not remove the potential for severe impact.
Technical view
Reused request handles can collide between ksmbd login requests and FSCTL_PIPE_TRANSCEIVE operations. Although ksmbd checks the IPC response type, a missing continuation permits an incorrectly typed response to be delivered, causing type confusion and unexpected memory access. CVSS 3.1 rates it 8.1: network-accessible, unauthenticated, no user interaction, but high complexity.
Likely exposure
Exposure is most likely on Linux systems actively using ksmbd and reachable by untrusted SMB clients. Systems not using the in-kernel ksmbd server are unlikely to expose this path. The supplied affected-version data is ambiguous, so confirm applicability through the Linux distributor.
Exploitation context
The supplied record does not identify public exploitation, and the CVE is not listed as KEV. The high-complexity race condition may reduce reliability, but unauthenticated network reachability and potentially severe memory effects make exposed ksmbd servers important to address.
Researcher notes
This is a CWE-362 race condition involving ID allocation and IPC response matching. Confirm remediation through commit ancestry or documented distribution backports rather than version strings alone. The supplied sources establish unexpected memory access, but do not establish reliable code execution, a public proof of concept, or exploitation in the wild.
Mitigation direction
Apply a vendor-supported kernel update containing the applicable upstream stable fix.
Check the Linux distributor’s advisory and package changelog for this CVE or a referenced fix commit.
If updating is delayed, consult vendor guidance for supported mitigations; none are specified in the supplied sources.
Validation and detection
Inventory Linux hosts and determine whether the in-kernel ksmbd SMB server is enabled or loaded.
Record kernel packages and versions; compare them with distributor guidance for CVE-2025-21947.
Confirm the installed kernel includes the relevant stable fix or a documented vendor backport.
After updating, verify the corrected kernel is running and repeat ksmbd exposure checks.
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-362: 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.
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.
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.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-362 · source CWE mapping
Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.