{"affected":[{"defaultStatus":"unaffected","product":"Linux","source":"CNA: Linux","vendor":"Linux","versions":[{"lessThan":"32934b13b1a63c86d2fa68df0bfb28c51ce38879","status":"affected","version":"e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9","versionType":"git"},{"lessThan":"93566781118cdff874023d5ca4e7b8054baaec31","status":"affected","version":"e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9","versionType":"git"},{"lessThan":"b62ef8cfec9351662e42cbf7da2d743068699bba","status":"affected","version":"e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9","versionType":"git"},{"lessThan":"171df27077fb49b4af2c53ad2cedcd0e39664fe8","status":"affected","version":"e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","source":"CNA: Linux","vendor":"Linux","versions":[{"status":"affected","version":"5.15"},{"lessThan":"5.15","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.117","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.61","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.2","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc1","versionType":"original_commit_for_fix"}]}],"cveId":"CVE-2026-99540","cwes":[],"description":"In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: fix parent dentry lifetime in directory enumeration\n\nksmbd_populate_dot_dotdot_entries() builds the \"..\" entry from\nthe open directory's d_parent and passes that pointer to\nksmbd_vfs_fill_dentry_attrs() without taking a reference. That pointer\nis only valid while the directory stays under this parent. If a\nconcurrent rename moves the directory elsewhere, the old parent loses\nits last reference; a following rmdir then turns it into a negative\ndentry with d_inode cleared, and after the RCU grace period the dentry\nitself is freed. The worker still holds the raw pointer and\ndereferences d_inode through vfs_getattr() and vfs_getxattr().\n\nA remote SMB client, authenticated or guest, triggers this by listing\na directory while that directory is moved under a new parent and the\nold parent is deleted. It can be done by the client itself with write\naccess or by other concurrent writers, triggering null-ptr-deref and\nslab-use-after-free on a KASAN build.\n\n  KASAN: null-ptr-deref in range\n      [0x0000000000000000-0x0000000000000007]\n  Workqueue: ksmbd-io handle_ksmbd_work\n  RIP: 0010:xattr_permission+0x9d/0x160\n  Call Trace:\n   vfs_getxattr+0x9c/0x1b0\n   ksmbd_vfs_getxattr+0x82/0x100\n   ksmbd_vfs_get_dos_attrib_xattr+0x7f/0x130\n   ksmbd_vfs_fill_dentry_attrs+0x435/0x650\n   ksmbd_populate_dot_dotdot_entries+0x25e/0x630\n   smb2_query_dir+0xcf9/0x1a20\n   handle_ksmbd_work+0x5f1/0x1c80\n   process_one_work+0x90b/0x19d0\n\nFix by using the dentry reference counting APIs: take the parent with\ndget_parent(), take a matching dget() on \".\", and dput() the dentry\nonce ksmbd_vfs_fill_dentry_attrs() has returned or the pattern does\nnot match.","epss":{"date":"2026-11-21","percentile":0.0619,"score":0.00168},"exploits":[],"kev":null,"metrics":[{"score":8.8,"severity":"high","source":"CNA: Linux","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},{"score":8.8,"severity":"high","source":"NVD: 416baaa9-dc9f-4396-8d5f-8c081fb06d67","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"}],"modifiedAt":1795346215553,"publishedAt":1795099495292,"references":[{"source":"CNA: Linux","tags":[],"url":"https://git.kernel.org/stable/c/32934b13b1a63c86d2fa68df0bfb28c51ce38879"},{"source":"CNA: Linux","tags":[],"url":"https://git.kernel.org/stable/c/93566781118cdff874023d5ca4e7b8054baaec31"},{"source":"CNA: Linux","tags":[],"url":"https://git.kernel.org/stable/c/b62ef8cfec9351662e42cbf7da2d743068699bba"},{"source":"CNA: Linux","tags":[],"url":"https://git.kernel.org/stable/c/171df27077fb49b4af2c53ad2cedcd0e39664fe8"},{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"url":"https://git.kernel.org/stable/c/171df27077fb49b4af2c53ad2cedcd0e39664fe8"},{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"url":"https://git.kernel.org/stable/c/32934b13b1a63c86d2fa68df0bfb28c51ce38879"},{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"url":"https://git.kernel.org/stable/c/93566781118cdff874023d5ca4e7b8054baaec31"},{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"url":"https://git.kernel.org/stable/c/b62ef8cfec9351662e42cbf7da2d743068699bba"}],"remediation":[],"revision":"50a5367cc3cddfec8157edd3538770f884fdf745169f90eff9a375e8a30400f2","sources":[{"modifiedAt":1795345729639,"name":"CNA: Linux","retrievedAt":1795349377752,"url":"https://www.cve.org/CVERecord?id=CVE-2026-99540"},{"modifiedAt":1795346215553,"name":"NVD","retrievedAt":1795349751332,"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99540"},{"modifiedAt":null,"name":"FIRST EPSS","retrievedAt":1795330725513,"url":"https://api.first.org/data/v1/epss?cve=CVE-2026-99540"}],"ssvc":null,"status":"published","title":"ksmbd: fix parent dentry lifetime in directory enumeration","updatedAt":1795349751332}