CVE-2025-37947: CVE-2025-37947: In the Linux kernel, the following vulnerability has been resolved: ksmbd: prevent out-of…
linux · linux kernel · NVD published 2025-05-20 · posted 2025-10-03 · last modified 2026-07-30
What it is
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.
| Weakness | CWE-787 |
|---|---|
| CVSS vector | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H (source: [email protected]) |
| ATT&CK tactics | Execution |
Exploitation evidence
First exploit evidence seen: 2025-10-03 (earliest date across the sources below).
Exploited in the wild
No source on this site lists in-the-wild exploitation yet (CISA KEV, VulnCheck KEV).
Public exploit code
GitHub proof-of-concept repositories
1 public repositories from 1 accounts, first seen 2025-10-03. Most starred: doyensec/KSMBD-CVE-2025-37947 (20 stars), view repository.
Verify before running: public PoCs can be malicious. Read the code and only run it in an isolated lab. A PoC means exploit code is public, not that this CVE is exploited in the wild.
Sources: nomi-sec/PoC-in-GitHub.
How to fix it
Fixed versions
- linux linux kernel: upgrade to 6.1.139 or later (affected from 5.15)
- linux linux kernel: upgrade to 6.6.91 or later (affected from 6.2)
- linux linux kernel: upgrade to 6.12.29 or later (affected from 6.7)
- linux linux kernel: upgrade to 6.14.7 or later (affected from 6.13)
Derived from the NVD CPE configuration (versionEndExcluding / versionEndIncluding). Always confirm with the vendor advisory.
Vendor advisories and patches
- https://git.kernel.org/stable/c/04c8a38c60346bb5a7c49b276de7233f703ce9cb (Patch)
- https://git.kernel.org/stable/c/0ca6df4f40cf4c32487944aaf48319cb6c25accc (Patch)
- https://git.kernel.org/stable/c/7f61da79df86fd140c7768e668ad846bfa7ec8e1 (Patch)
- https://git.kernel.org/stable/c/d62ba16563a86aae052f96d270b3b6f78fca154c (Patch)
- https://git.kernel.org/stable/c/e6356499fd216ed6343ae0363f4c9303f02c5034 (Patch)
MITRE ATT&CK mitigations for this chain
- M1050 Exploit Protection (for T1203) : Security applications that look for behavior used during exploitation such as Windows Defender Exploit Guard (WDEG) and the Enhanced Mitigation Experience Toolkit (EMET) can be used to mitigate some exploitation behavior. Control flow integrity checking is another way to potentially identify and stop a software exploi
- M1051 Update Software (for T1203) : Perform regular software updates to mitigate exploitation risk. Keeping software up-to-date with the latest security patches helps prevent adversaries from exploiting known vulnerabilities in client software, reducing the risk of successful attacks.
- M1048 Application Isolation and Sandboxing (for T1203) : Browser sandboxes can be used to mitigate some of the impact of exploitation, but sandbox escapes may still exist. Other types of virtualization and application microsegmentation may also mitigate the impact of client-side exploitation. Risks of additional exploits and weaknesses in those systems may still exist.
Detection Generic guidance
- Execution: Watch for the service process spawning shells or script interpreters (cmd.exe, powershell, sh, bash, python) via EDR process-tree rules.
Response checklist Generic guidance
- Inventory: find every instance of the affected product and version (include internet-facing and forgotten ones).
- Patch or mitigate per the vendor advisory; if you cannot patch, remove internet exposure or apply the vendor workaround.
- Assume compromise if the system was exposed before patching: hunt for the indicators in the advisory and review logs back to the disclosure date.
- Rotate credentials and secrets stored on or used by the affected system if compromise cannot be ruled out.
Sources
- NVD: CVE-2025-37947
- CVE.org record
- FIRST EPSS (2026-10-24)
- https://lists.debian.org/debian-lts-announce/2025/08/msg00010.html (Mailing List, Third Party Advisory)
- https://github.com/doyensec/KSMBD-CVE-2025-37947/blob/main/CVE-2025-37947.c (Mailing List, Third Party Advisory)