{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-64397","id":"CVE-2026-64397","title":"ksmbd: serialize QUERY_DIRECTORY requests per file","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: serialize QUERY_DIRECTORY requests per file\n\nsmb2_query_dir() stores a pointer to its stack-allocated private data in\nthe ksmbd_file readdir_data. Concurrent QUERY_DIRECTORY requests using the\nsame file handle can overwrite this pointer while an iterate_dir() callback\nis still using it, resulting in a stack use-after-free.","descriptionLong":"In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: serialize QUERY_DIRECTORY requests per file\n\nsmb2_query_dir() stores a pointer to its stack-allocated private data in\nthe ksmbd_file readdir_data. Concurrent QUERY_DIRECTORY requests using the\nsame file handle can overwrite this pointer while an iterate_dir() callback\nis still using it, resulting in a stack use-after-free.\n\nAdd a per-file mutex and hold it while accessing the shared directory\nenumeration state. The lock covers scan restart, dot entry state,\nreaddir_data setup and iteration, and response construction. This prevents\nanother request from replacing readdir_data.private before the current\nrequest has finished using it and also serializes the shared file position.","published":"2026-07-25T08:50:41.620Z","updated":"2026-10-28T02:30:43.785476989Z","reserved":"2026-07-19T15:36:31.785Z","status":"Analyzed","rejected":false,"assigner":"Linux","metric":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"Linux"},"metrics":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"Linux"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"OSV"}],"rating":"critical","products":["Linux"],"affectedProducts":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9","lessThan":"1426fd79102539bc0ab5c8fced047ad4313b9908","status":"affected","versionType":"git"},{"version":"e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9","lessThan":"2a64dbf9c739ddf7a25a066507597bf89f8f73d2","status":"affected","versionType":"git"},{"version":"e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9","lessThan":"64dac2d486ec1eb18dc00968b16a230b6b75ec24","status":"affected","versionType":"git"},{"version":"e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9","lessThan":"a1d5d31cad593ea5e1b637f2f39c9ef6d09d1199","status":"affected","versionType":"git"},{"version":"e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9","lessThan":"fd22b039a5a05bc1d6818e9dcd1001fb432a829d","status":"affected","versionType":"git"},{"version":"e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9","lessThan":"be6d26bf27499977c746abc163659915082348d8","status":"affected","versionType":"git"}],"platforms":[]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.15","status":"affected"},{"version":"0","lessThan":"5.15","status":"unaffected","versionType":"semver"},{"version":"6.1.178","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.6.145","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.12.96","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.18.39","lessThanOrEqual":"6.18.*","status":"unaffected","versionType":"semver"},{"version":"7.1.4","lessThanOrEqual":"7.1.*","status":"unaffected","versionType":"semver"},{"version":"7.2","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"platforms":[]}],"packages":[],"cwes":["CWE-416"],"aliases":[],"references":[{"url":"https://git.kernel.org/stable/c/1426fd79102539bc0ab5c8fced047ad4313b9908","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/2a64dbf9c739ddf7a25a066507597bf89f8f73d2","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/64dac2d486ec1eb18dc00968b16a230b6b75ec24","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/a1d5d31cad593ea5e1b637f2f39c9ef6d09d1199","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/fd22b039a5a05bc1d6818e9dcd1001fb432a829d","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/be6d26bf27499977c746abc163659915082348d8","tags":["Patch","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/64xxx/CVE-2026-64397.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-64397","tags":["advisory"]},{"url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.00477,"epssPercentile":0.41907,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-64397","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-64397","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-64397","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-64397","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}