CVE-2026-64397

ksmbd: serialize QUERY_DIRECTORY requests per file

9.8 critical EPSS 0.70%

Published 25 Jul 2026 Updated 17 Aug 2026 CNA: Linux

Check your servers for CVE-2026-64397

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-64397 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

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.

Severity (CVSS)

9.8 critical CVSS 3.1 from Linux (CNA)
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Attack vector
network: an attacker can reach the vulnerable part over the network, often from the internet
Attack complexity
low: an attack works without special conditions
Privileges required
none: the attacker does not need an account
User interaction
none: nobody has to click or open anything
Scope
unchanged: the damage stays inside the vulnerable component
Impact
confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)

Exploitation

EPSS 0.70%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 48.8% of all scored CVEs. Scores of 30 Nov 2026.

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, before 1426fd79102539bc0ab5c8fced047ad4313b9908
affected from e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, before 2a64dbf9c739ddf7a25a066507597bf89f8f73d2
affected from e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, before 64dac2d486ec1eb18dc00968b16a230b6b75ec24
affected from e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, before a1d5d31cad593ea5e1b637f2f39c9ef6d09d1199
affected from e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, before fd22b039a5a05bc1d6818e9dcd1001fb432a829d
affected from e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9, before be6d26bf27499977c746abc163659915082348d8
Other versions: unaffected
Linux
affected 5.15
unaffected before 5.15
unaffected from 6.1.178 up to and including 6.1.*
unaffected from 6.6.145 up to and including 6.6.*
unaffected from 6.12.96 up to and including 6.12.*
unaffected from 6.18.39 up to and including 6.18.*
unaffected from 7.1.4 up to and including 7.1.*
unaffected 7.2 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2026-64397 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2026-64397

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2026-64397
trivy image --scanners vuln IMAGE | grep CVE-2026-64397

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2026-64397 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.