CVE-2025-37947 is an out-of-bounds memory write vulnerability in the Linux kernel's ksmbd SMB server. The ksmbd_vfs_stream_write() function failed to validate the write offset (*pos) against the existing stream data length (v_len). An offset greater than or equal to v_len could consequently cause a write outside the stream buffer, corrupting kernel memory. The fix rejects such offsets with -EINVAL before proceeding with the write.
Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.
What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
If you can’t patch tonight, do this now.
Patch, then assume compromise.
1 valid exploit after Mallory filtered fakes, detection scripts, and README-only repos.
This repository contains a working exploit and proof-of-concept (PoC) for CVE-2025-37947, a vulnerability in the Linux ksmbd SMB server. The main exploit file (CVE-2025-37947.c) implements a complex kernel heap manipulation and ROP chain to achieve local privilege escalation via a vulnerability in SMB2 write handling. The PoC (proof-of-concept.c) demonstrates the minimal trigger for the vulnerability, crafting and sending a specially crafted SMB2 packet to the ksmbd server. The repository also includes a BPF tracing script (bpf-tracer.sh) for kernel debugging, a sample ksmbd configuration (ksmbd.conf), a Makefile for building the exploit, and a QEMU launch script (run-qemu.sh) for setting up a test environment. The exploit requires access to an SMB share (default: 127.0.0.1, share name 'share', user 'smbuser', password 'smbpassword') and is intended for use in a controlled VM environment. The attack vector is network-based, targeting the SMB service on TCP port 445. The payload is a kernel ROP chain that results in privilege escalation to root.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.
30 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.
An out-of-bounds memory write vulnerability in the Linux kernel's ksmbd component caused by insufficient validation of stream write offsets. The reference rates it high severity, with a CVSS v3 score of 7.8 and potentially high confidentiality, integrity, and availability impacts. The patch validates that the offset is less than the stream data length and returns -EINVAL otherwise.
An out-of-bounds stream write vulnerability in ksmbd significant enough that the article states the next part will focus on exploiting it.
An out-of-bounds memory write vulnerability in the Linux kernel's ksmbd component caused by improper validation of the write offset in ksmbd_vfs_stream_write().
Query your assets running an affected version, and investigate the blast radius.
Every observed campaign linking this CVE to a named adversary.
Malware families riding this exploit, with evidence and IOCs.
YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Cross-references every affected SKU, including bundled OEM variants.
Community discussion across Reddit, Mastodon, and other social sources.