CVE-2026-64397: ksmbd: serialize QUERY_DIRECTORY requests per file

Published Jul 25, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

ksmbd: serialize QUERYDIRECTORY requests per file

smb2querydir() stores a pointer to its stack-allocated private data in the ksmbdfile readdirdata. Concurrent QUERYDIRECTORY requests using the same file handle can overwrite this pointer while an iteratedir() 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, readdirdata setup and iteration, and response construction. This prevents another request from replacing readdirdata.private before the current request has finished using it and also serializes the shared file position.

Affected Software

6 affected components
Linux Linux kernel
Linux Linux kernel>=5.15<6.1.178
Linux Linux kernel>=6.2<6.6.145
Linux Linux kernel>=6.7<6.12.96
Linux Linux kernel>=6.13<6.18.39
Linux Linux kernel>=6.19<7.1.4

Event History

Jul 25, 2026
CVE Published
via MITRE·08:50 AM
Data Sourced
via MITRE·08:50 AM
DescriptionSeverity
Data Sourced
via NVD·10:17 AM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-64397?

CVE-2026-64397 has a critical severity score of 9.8.

2

How do I fix CVE-2026-64397?

To mitigate CVE-2026-64397, update your Linux kernel to the latest version where this vulnerability has been resolved.

3

What type of vulnerability is CVE-2026-64397?

CVE-2026-64397 is classified as a Use After Free vulnerability in the Linux kernel.

4

What impact does CVE-2026-64397 have on systems?

CVE-2026-64397 could allow concurrent QUERY_DIRECTORY requests to affect file operations, leading to potential information disclosure or system instability.

5

When was CVE-2026-64397 published?

CVE-2026-64397 was published on July 25, 2026.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203