Critical severity · published Jul 25, 2026
CVE-2026-64397
ksmbd: serialize QUERY_DIRECTORY requests per file
9.8
CVSS
0.5%
EPSS
No
On KEV
Description
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.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Confidentiality
High
Integrity
High
Availability
High
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.5% · higher than 41% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
KE
Kernel · Linux
5.15 before 6.1.178; 6.2 before 6.6.145; 6.7 before 6.12.96; 6.13 before 6.18.39; 6.19 before 7.1.4 · source: NVD
LI
Linux · Linux
e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 before 1426fd79102539bc0ab5c8fced047ad4313b9908; e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 before 2a64dbf9c739ddf7a25a066507597bf89f8f73d2; e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 before 64dac2d486ec1eb18dc00968b16a230b6b75ec24; e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 before a1d5d31cad593ea5e1b637f2f39c9ef6d09d1199; e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 before fd22b039a5a05bc1d6818e9dcd1001fb432a829d; e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 before be6d26bf27499977c746abc163659915082348d8; +1 more · source: vendor
In the news
VulnerabilityCritical
ZDI-26-684: Linux Kernel KSMBD Query Directory Request Race Condition Remote Code Execution Vulnerability
This vulnerability allows remote attackers to execute arbitrary code on affected installations of Linux Kernel KSMBD. Authentication is not required to exploit this vulnerability. Furthermore, only systems with KSMBD enabled are vulnerable. The ZDI has assigned a CVSS rating of 9.0. The following CVEs are assigned: CVE-2026-64397.
Sep 14, 2026·Zero Day Initiative
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2026-64397
CVE.org
https://www.cve.org/CVERecord?id=CVE-2026-64397
Patch
https://git.kernel.org/stable/c/1426fd79102539bc0ab5c8fced047ad4313b9908
Patch
https://git.kernel.org/stable/c/2a64dbf9c739ddf7a25a066507597bf89f8f73d2
Patch
https://git.kernel.org/stable/c/64dac2d486ec1eb18dc00968b16a230b6b75ec24
Patch
https://git.kernel.org/stable/c/a1d5d31cad593ea5e1b637f2f39c9ef6d09d1199
Patch
https://git.kernel.org/stable/c/be6d26bf27499977c746abc163659915082348d8
Patch
https://git.kernel.org/stable/c/fd22b039a5a05bc1d6818e9dcd1001fb432a829d
More from Kernel
9.8
CVE-2025-39682
tls: fix handling of zero-length records on the rx_list
8.8
CVE-2026-53266
netfilter: bridge: make ebt_snat ARP rewrite writable
8.8
CVE-2013-6282
Linux Kernel Improper Input Validation Vulnerability
8.4
CVE-2022-0185
Linux Kernel Heap-Based Buffer Overflow Vulnerability
8.4
CVE-2013-2094
Linux Kernel Privilege Escalation Vulnerability
