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

- Priority: **Prioritise**
- Reason: Public exploit (GitHub, Date unknown)
- Next step: Check applicability and the vendor advisory: no fix release is recorded here
- Status: published
- Published: 2025-05-20 · Modified: 2026-08-05
- Aliases: UBUNTU-CVE-2025-37947, DEBIAN-CVE-2025-37947
- Record: https://cvemate.com/vulnerability/CVE-2025-37947 · JSON: https://cvemate.com/vulnerability/CVE-2025-37947/json

## Description

```text
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.
```

## Signals

- CVSS: 8.8 high (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- EPSS: 0.804%, percentile 58.045%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 1 (github)

## Affected (first 20 of 138)

- debian linux (Debian): \< 6.1.140-1 \| \< 6.12.29-1
- ubuntu linux (Ubuntu): All versions (No fix recorded) \| \< 6.8.0-100.100
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws (Ubuntu): All versions (No fix recorded) \| \< 6.8.0-1046.49
- ubuntu linux-aws-5.0 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.15 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.14 (Ubuntu): \< 6.14.0-1011.11~24.04.1
- ubuntu linux-aws-6.2 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.5 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.8 (Ubuntu): \< 6.8.0-1046.49~22.04.1
- ubuntu linux-aws-fips (Ubuntu): All versions (No fix recorded) \| \< 6.8.0-1046.49+fips1
- ubuntu linux-azure (Ubuntu): All versions (No fix recorded) \| \< 6.8.0-1046.52
- ubuntu linux-azure-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.15 (Ubuntu): All versions (No fix recorded)

## References (first 20 of 31)

- <https://git.kernel.org/stable/c/7f61da79df86fd140c7768e668ad846bfa7ec8e1>
- <https://git.kernel.org/stable/c/04c8a38c60346bb5a7c49b276de7233f703ce9cb>
- <https://git.kernel.org/stable/c/d62ba16563a86aae052f96d270b3b6f78fca154c>
- <https://git.kernel.org/stable/c/e6356499fd216ed6343ae0363f4c9303f02c5034>
- <https://git.kernel.org/stable/c/0ca6df4f40cf4c32487944aaf48319cb6c25accc>
- <https://github.com/doyensec/KSMBD-CVE-2025-37947/blob/main/CVE-2025-37947.c>
- <https://lists.debian.org/debian-lts-announce/2025/08/msg00010.html>
- <https://ubuntu.com/security/CVE-2025-37947>
- <https://www.cve.org/CVERecord?id=CVE-2025-37947>
- <https://git.kernel.org/linus/0ca6df4f40cf4c32487944aaf48319cb6c25accc>
- <https://ubuntu.com/security/notices/USN-7699-1>
- <https://ubuntu.com/security/notices/USN-7699-2>
- <https://ubuntu.com/security/notices/USN-7721-1>
- <https://ubuntu.com/security/notices/USN-8028-1>
- <https://ubuntu.com/security/notices/USN-8028-2>
- <https://ubuntu.com/security/notices/USN-8031-1>
- <https://ubuntu.com/security/notices/USN-8028-3>
- <https://ubuntu.com/security/notices/USN-8028-4>
- <https://ubuntu.com/security/notices/USN-8028-5>
- <https://ubuntu.com/security/notices/USN-8031-2>

---

Data as of 2026-12-05T05:11:15.528Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
