CVE-2025-37947: ksmbd: prevent out-of-bounds stream writes by validating *pos
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: prevent out-of-bounds stream writes by validating *pos
ksmbd_vfs_stream_write() did not validate whether the write offset
(*pos) was within the bounds of the existing stream data length (v_len).
If *pos was greater than or equal to v_len, this could lead to an
out-of-bounds memory write.
This patch adds a check to ensure *pos is less than v_len before
proceeding. If the condition fails, -EINVAL is returned.
Security readout for executives and security teams
Plain-English summary
A flaw in Linux's ksmbd SMB server can let an authenticated network user corrupt kernel memory through an invalid stream-write offset. Successful exploitation could compromise confidentiality, integrity, or availability. Risk is concentrated on systems running affected kernels with ksmbd enabled and reachable; it does not apply equally to every Linux host.
Executive priority
Prioritize affected, reachable ksmbd servers for prompt patching, especially internet-facing systems or those serving untrusted users. Confirm service use before treating the entire Linux fleet as exposed. Apply compensating network restrictions where immediate kernel maintenance is operationally difficult.
Technical view
ksmbd_vfs_stream_write() failed to confirm that the supplied write position was below the existing stream-data length. An offset at or beyond that boundary could cause a kernel out-of-bounds write. The published CVSS 3.1 score is 8.8, reflecting network reachability, low complexity, required low privileges, no user interaction, and potentially high impact.
Likely exposure
Exposure requires an affected Linux kernel, active ksmbd service, network access to SMB, and low-privileged authentication. Internet-facing or broadly reachable ksmbd servers deserve priority. The supplied version data is not sufficiently clear for reliable range-based conclusions; confirm status using distribution advisories and the referenced stable-kernel fixes.
Exploitation context
Public proof-of-concept code is referenced, demonstrating researcher-level exploit interest. However, the source bundle reports that CVE-2025-37947 is not in CISA KEV and provides no evidence of active exploitation. Public code increases practical risk but does not establish reliable compromise or exploitation in the wild.
Researcher notes
The primitive is a kernel out-of-bounds write in ksmbd stream handling when *pos is greater than or equal to v_len. The patch rejects that condition with -EINVAL. The bundle does not establish deterministic code execution, affected configuration defaults, or complete version boundaries. Assess vendor backports rather than relying only on upstream version numbers.
Mitigation direction
Install a vendor-supported kernel update containing the referenced ksmbd fix.
Consult the Linux distribution advisory for exact fixed package versions.
Disable ksmbd where SMB server functionality is unnecessary.
Restrict SMB network access to trusted clients and segments.
Limit SMB accounts and permissions until patching is complete.
Validation and detection
Confirm whether ksmbd is enabled and serving SMB connections.
Record the running kernel and installed kernel package versions.
Compare packages against distribution advisories and referenced stable-kernel fixes.
Identify whether SMB is internet-facing or broadly reachable internally.
Verify the remediated kernel is active after updating and rebooting.
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-787: 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.
2CVSS vectors
3Timeline events
2ADP providers
8Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: pocAutomatable: 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.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-787 · source CWE mapping
Out-of-bounds Write
Out-of-bounds Write represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.