Kernel memory corruption via unchecked stream offset
Published May 20, 2025 · Updated Aug 5, 2026
Out-of-bounds write in Linux kernel ksmbd allows remote authenticated users to corrupt kernel memory via crafted SMB stream writes. ksmbd_vfs_stream_write truncates the allocation to XATTR_SIZE_MAX but memcpy uses the attacker-controlled offset and adjusted count without validating the existing stream length. Reachability requires an authenticated account, a writable share, and streams_xattr; the published exploit achieves local root, while remote code execution also needs an information leak.
Summary
What happened
Out-of-bounds write in Linux kernel ksmbd allows remote authenticated users to corrupt kernel memory via crafted SMB stream writes. ksmbd_vfs_stream_write truncates the allocation to XATTR_SIZE_MAX but memcpy uses the attacker-controlled offset and adjusted count without validating the existing stream length. Reachability requires an authenticated account, a writable share, and streams_xattr; the published exploit achieves local root, while remote code execution also needs an information leak.
The record
- CVE
- CVE-2025-37947
- Published
- May 20, 2025
- Updated
- Aug 5, 2026
- Vendor
- The Linux Kernel Organization
- Product
- Linux
- Classifications
- CWE-787, T1068
- Attack vector
- network
- Privileges
- authenticated
Timeline
How it unfolded
- May 20, 2025CVE publishedPublication date reported by the CVE source.
- Aug 5, 2026Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=0626e6641f6b467447c81dd7678a69c66f7746cf <04c8a38c60346bb5a7c49b276de7233f703ce9cb
- Affected versionversion=0626e6641f6b467447c81dd7678a69c66f7746cf <0ca6df4f40cf4c32487944aaf48319cb6c25accc
- Affected versionversion=0626e6641f6b467447c81dd7678a69c66f7746cf <7f61da79df86fd140c7768e668ad846bfa7ec8e1
- Affected versionversion=0626e6641f6b467447c81dd7678a69c66f7746cf <d62ba16563a86aae052f96d270b3b6f78fca154c
- Affected versionversion=0626e6641f6b467447c81dd7678a69c66f7746cf <e6356499fd216ed6343ae0363f4c9303f02c5034
- Affected versionversion=5.15
What conditions does exploitation require?
What is affected?
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Public exploit references
- Doyensec KSMBD CVE-2025-37947 exploitfunctional · validated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo