# CVE-2025-37947: ksmbd: prevent out-of-bounds stream writes by validating *pos

- Severity: High 8.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.80%, higher than 57% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2025-05-20T16:01:43.788Z
- Modified: 2026-08-05T11:58:33.808Z
- Weaknesses: CWE-787
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: Linux

## Description

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.

(As written by CVE List.)

## Affected

- Linux Linux: from 0626e6641f6b467447c81dd7678a69c66f7746cf before 7f61da79df86fd140c7768e668ad846bfa7ec8e1; from 0626e6641f6b467447c81dd7678a69c66f7746cf before 04c8a38c60346bb5a7c49b276de7233f703ce9cb; from 0626e6641f6b467447c81dd7678a69c66f7746cf before d62ba16563a86aae052f96d270b3b6f78fca154c; from 0626e6641f6b467447c81dd7678a69c66f7746cf before e6356499fd216ed6343ae0363f4c9303f02c5034; from 0626e6641f6b467447c81dd7678a69c66f7746cf before 0ca6df4f40cf4c32487944aaf48319cb6c25accc; 5.15 (not affected: before 5.15; from 6.1.139 up to 6.1.*; from 6.6.91 up to 6.6.*; from 6.12.29 up to 6.12.*; from 6.14.7 up to 6.14.*; from 6.15 up to *)
- linux linux_kernel: from 5.15 before 6.1.139; from 6.2 before 6.6.91; from 6.7 before 6.12.29; from 6.13 before 6.14.7; 6.15
- debian debian_linux: 11.0

## Every score

- Linux: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- CISA-ADP: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/doyensec/KSMBD-CVE-2025-37947/blob/main/CVE-2025-37947.c> (exploit, mailing-list, third-party-advisory)
- <https://git.kernel.org/stable/c/7f61da79df86fd140c7768e668ad846bfa7ec8e1> (patch)
- <https://git.kernel.org/stable/c/04c8a38c60346bb5a7c49b276de7233f703ce9cb> (patch)
- <https://git.kernel.org/stable/c/d62ba16563a86aae052f96d270b3b6f78fca154c> (patch)
- <https://git.kernel.org/stable/c/e6356499fd216ed6343ae0363f4c9303f02c5034> (patch)
- <https://git.kernel.org/stable/c/0ca6df4f40cf4c32487944aaf48319cb6c25accc> (patch)
- <https://lists.debian.org/debian-lts-announce/2025/08/msg00010.html> (mailing-list, third-party-advisory)

## Sources

- CVE List: [CVE-2025-37947](https://www.cve.org/CVERecord?id=CVE-2025-37947), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2025-37947](https://nvd.nist.gov/vuln/detail/CVE-2025-37947), Public domain, modified 2026-07-30

---

Page: https://cve.day/CVE-2025-37947 · Whole record: https://cve.day/CVE-2025-37947.json · Rebuilt by cve.day 2026-11-25T22:58:58.301Z
