{"id":"CVE-2026-64397","aliases":["CVE-2026-64397"],"related":[],"kind":"vulnerability","state":"published","title":"ksmbd: serialize QUERY_DIRECTORY requests per file","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"}],"published":"2026-07-25T08:50:41.620Z","modified":"2026-09-04T14:47:10.993Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"}],"cwes":["CWE-416"],"affected":[{"ranges":[{"type":"git","introduced":"e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9","fixed":"1426fd79102539bc0ab5c8fced047ad4313b9908","status":"affected"},{"type":"git","introduced":"e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9","fixed":"2a64dbf9c739ddf7a25a066507597bf89f8f73d2","status":"affected"},{"type":"git","introduced":"e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9","fixed":"64dac2d486ec1eb18dc00968b16a230b6b75ec24","status":"affected"},{"type":"git","introduced":"e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9","fixed":"a1d5d31cad593ea5e1b637f2f39c9ef6d09d1199","status":"affected"},{"type":"git","introduced":"e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9","fixed":"fd22b039a5a05bc1d6818e9dcd1001fb432a829d","status":"affected"},{"type":"git","introduced":"e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9","fixed":"be6d26bf27499977c746abc163659915082348d8","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.15","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.15","status":"unaffected"},{"type":"semver","introduced":"6.1.178","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.145","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.96","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.39","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.1.4","lastAffected":"7.1.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.2","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"5.15","fixed":"6.1.178"},{"status":"affected","introduced":"6.2","fixed":"6.6.145"},{"status":"affected","introduced":"6.7","fixed":"6.12.96"},{"status":"affected","introduced":"6.13","fixed":"6.18.39"},{"status":"affected","introduced":"6.19","fixed":"7.1.4"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/1426fd79102539bc0ab5c8fced047ad4313b9908","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/2a64dbf9c739ddf7a25a066507597bf89f8f73d2","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/64dac2d486ec1eb18dc00968b16a230b6b75ec24","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/a1d5d31cad593ea5e1b637f2f39c9ef6d09d1199","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/fd22b039a5a05bc1d6818e9dcd1001fb432a829d","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/be6d26bf27499977c746abc163659915082348d8","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-64397","url":"https://www.cve.org/CVERecord?id=CVE-2026-64397","licence":"CVE Terms of Use","modified":"2026-08-17T04:54:51.854Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-64397","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-64397","licence":"Public domain","modified":"2026-09-04T14:47:10.993Z"}],"updatedAt":"2026-11-25T22:59:30.100Z","epss":{"score":0.00477,"percentile":0.42848,"date":"2026-12-01T12:00:22.000Z"}}