CVE-2026-64397·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: ksmbd: serialize QUERY_DIRECTORY requests per file smb2_query_dir() stores a pointer to its stack-allocated private data in the ksmbd_file readdir_data. Concurrent QUERY_DIRECTORY requests using the same file handle can overwrite this pointer while an iterate_dir() callback is still using it, resulting in a stack use-after-free. Add a per-file mutex and hold it while accessing the shared directory enumeration state. The lock covers scan restart, dot entry state, readdir_data setup and iteration, and response construction. This prevents another request from replacing readdir_data.private before the current request has finished using it and also serializes the shared file position.
- Severity
- critical
- Software
- Kernel
- Fixed in
- 7.1.4
- Published
How likely is exploitation
FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at 0.70% — higher than 52% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.
Read the two together. CVE-2026-64397 scores 9.8 on CVSS, so a successful attack would be serious — but at 0.70%, almost nobody is currently attempting it. That is a different situation from a flaw under mass exploitation, and it is usually the difference between patching on your next maintenance window and patching tonight.
Affected versions
From: 6.19
Until: 7.1.4
Fixed in: 7.1.4
How to fix this CVE
Update your Linux kernel to version 7.1.4 or later to patch the stack use-after-free vulnerability in ksmbd's QUERY_DIRECTORY handling. This vulnerability allows concurrent directory enumeration requests on the same file handle to corrupt shared state, potentially leading to kernel crashes or code execution. Apply the update immediately across all affected systems running kernel versions 6.19 through 7.1.3.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check installed kernel version with `uname -r` and verify if it falls in the 6.19 to 7.1.3 range
- Step 2: Verify ksmbd is enabled by checking `cat /proc/modules | grep ksmbd` or `lsmod | grep ksmbd`
- Step 3: Search kernel logs for stack traces containing 'ksmbd', 'smb2_query_dir', or 'iterate_dir' using `sudo dmesg | grep -i ksmbd` or `sudo journalctl -u kernel | grep -i ksmbd`
- Step 4: After patching, confirm kernel version with `uname -r` returns 7.1.4 or later, then reboot and verify with `uname -r` again
FAQ
What is CVE-2026-64397?
This is a critical stack use-after-free vulnerability in the Linux kernel's ksmbd SMB server implementation. When multiple QUERY_DIRECTORY requests target the same file handle concurrently, one request's stack memory can be overwritten while another request is still using it, potentially causing kernel panic or arbitrary code execution.
Is CVE-2026-64397 being actively exploited?
No, CVE-2026-64397 is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog and no public exploit code is currently available. However, the critical CVSS score of 9.8 warrants immediate patching as proof-of-concept exploits could emerge.
What versions of Kernel are affected by CVE-2026-64397?
Linux kernel versions 6.19 through 7.1.3 are vulnerable. The vulnerability was resolved in kernel 7.1.4 and later.
How do I check if my server is vulnerable to CVE-2026-64397?
Run `uname -r` to check your kernel version. If it returns a version between 6.19 and 7.1.3 (inclusive) and ksmbd is enabled (verify with `lsmod | grep ksmbd`), your system is vulnerable.
Does Defensia detect CVE-2026-64397?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Linux kernel is installed on a monitored server, CVE-2026-64397 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/1426fd79102539bc0ab5c8fced047ad4313b9908
- https://git.kernel.org/stable/c/2a64dbf9c739ddf7a25a066507597bf89f8f73d2
- https://git.kernel.org/stable/c/64dac2d486ec1eb18dc00968b16a230b6b75ec24
- https://git.kernel.org/stable/c/a1d5d31cad593ea5e1b637f2f39c9ef6d09d1199
- https://git.kernel.org/stable/c/be6d26bf27499977c746abc163659915082348d8
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-64397. Free for 1 server.
Get started free