Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2026-99556

published high CVSS 3.1 · 8.8

ksmbd: serialize directory emptiness checks with readdir

Published
19 Nov 2026, 14:45:27 UTC
Updated
23 Nov 2026, 08:04:21 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
Linux — Linuxe2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 to < 67683a6cfbab82bb022d7d89390216c855fa6786 · e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 to < 068c3a2a70c2c342bb84b882bb1f45f5a8c5a42c · e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 to < 5ad61a34963f32fc1637d26e88cf6e02a3b99d08 · e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 to < 818a9fd779443b931b05c025d85f29680efb26c2 · e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 to < 2a4b6ae380a9f5175f002c1921cf9cbc7ca536ba · e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 to < 7220980b2423d06a0604516129bfa4cec8a697ae · Other versions: unaffected Affected Not stated Linux
Linux — Linux5.15 (affected) · 0 to < 5.15 (unaffected · semver) · 6.1.193 through 6.1.* (unaffected · semver) · 6.6.163 through 6.6.* (unaffected · semver) · 6.12.117 through 6.12.* (unaffected · semver) · 6.18.61 through 6.18.* (unaffected · semver) · 7.3.2 through 7.3.* (unaffected · semver) · 7.4-rc1 and later (unaffected · original_commit_for_fix) · Other versions: affected Version-specific Not stated Linux
Amazon Linux AL2 Release evaluation Not Affected Not required Amazon Linux assessment
Amazon Linux AL2023 Release evaluation Not Affected Not required Amazon Linux assessment
Debian bookworm linux-6.12 Advisory build 6.12.117-1~deb12u1 DLA-4927-1

Description

In the Linux kernel, the following vulnerability has been resolved: ksmbd: serialize directory emptiness checks with readdir SMB2 QUERY_DIRECTORY holds fp->readdir_lock while it calls iterate_dir() on fp->filp. An SMB2 SET_INFO request with FILE_DISPOSITION_INFORMATION can resolve the same FileId and call ksmbd_vfs_empty_dir() on the same filp without that lock. iterate_dir()'s inode read lock permits concurrent readers and does not serialize per-file iterator state. ext4 stores its dx readdir cursor and fname RB tree in file->private_data. Concurrent reset or refill can therefore free a fname node while the other worker still traverses it or retains its RB-tree link, resulting in use-after-free accesses. An authenticated SMB client with list and delete rights on a directory in a writable KSMBD share backed by ext4 can trigger this when the directory takes the dx readdir path. The client overlaps an SMB2 QUERY_DIRECTORY request with an SMB2 SET_INFO request carrying FILE_DISPOSITION_INFORMATION on one live FileId. In one x86_64 SMP KASAN multi-shot guest using ksmbd-for-next at 171df27077fb, the unmodified kernel reported a cross-worker use-after-free before a panic. The first report's access and free stacks show the two request paths directly (trimmed): BUG: KASAN: slab-use-after-free in ext4_htree_store_dirent+0x488/0x550 Read of size 8 by task kworker/2:0/29 Workqueue: ksmbd-io handle_ksmbd_work Call Trace: ext4_htree_store_dirent+0x488/0x550 htree_dirblock_to_tree+0x535/0x990 ext4_htree_fill_tree+0x319/0xba0 ext4_readdir+0x175a/0x2f40 iterate_dir+0x1b6/0x630 smb2_query_dir+0x1003/0x1cc0 Freed by task 279: free_rb_tree_fname+0x67/0xc0 ext4_readdir+0x13a9/0x2f40 iterate_dir+0x1b6/0x630 ksmbd_vfs_empty_dir+0xa2/0x100 smb2_set_info+0x2ffa/0x45d0 Take fp->readdir_lock across the entire emptiness check. This places both iterators over that handle's filp in the same lock domain while preserving the disposition status handling. The exact code change completed a warning-free x86_64 KASAN bzImage build. Tracing three request pairs showed that the two iterate_dir() calls no longer overlapped and the expected statuses were preserved. A further 1,600 reproducer iterations completed with expected statuses and no KASAN report, Oops, or panic. The reproducer and complete guest configuration are available privately to maintainers on request.

en · Linux · cna

Vendor advisories explicitly linked to this CVE.

1

Assessment

CVSS risk assessment and additional context for this vulnerability.

CVSS version
3.1
Base score
8.8 / 10
Severity
high
Provider
Linux · cna
Vector string
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Scenarios
en: AV:N - SMB2 SET_INFO with FileInfoClass FILE_DISPOSITION_INFORMATION and DeletePending is the request that reaches set_file_disposition_info: ksmbd_tcp_read feeds ksmbd_conn_handler_loop, which queues handle_ksmbd_work and dispatches smb2_set_info. The overlapping SMB2 QUERY_DIRECTORY on that same VolatileFileId is the other half of the race. AC:L - The client opens one directory FileId and sends both SMB2 requests; ksmbd_conn_handler_loop queues each PDU to a separate ksmbd-io worker while credits remain, so both sides of the race are the client's. Creating a one-block directory on the ext4 share makes is_dx_dir true and selects ext4_dx_readdir, which is the state the client needs. PR:L - smb2_check_user_session runs before the command table and accepts SMB2 QUERY_DIRECTORY and SMB2 SET_INFO only for a SMB2_SESSION_VALID SessionId. set_file_disposition_info additionally requires fp->daccess FILE_DELETE_LE, smb2_query_dir requires FILE_LIST_DIRECTORY_LE, and smb2_set_info requires KSMBD_TREE_CONN_FLAG_WRITABLE. UI:N - The authenticated client issues SMB2 CREATE for the directory and then the overlapping QUERY_DIRECTORY and SET_INFO on the returned FileId. Exploitation uses only that client's own requests. S:U - set_file_disposition_info and ext4_dx_readdir both run in the host kernel's ksmbd-io worker, and the corrupted fname slab objects are host kernel memory. The impact remains inside that kernel security authority. C:H - free_rb_tree_fname, called from ext4_dx_readdir during ksmbd_vfs_empty_dir, kfree's the fname nodes in file->private_data while ext4_htree_store_dirent on the query-directory worker still reads fname->hash and the rb_left/rb_right links. Reclaiming that kmalloc slot with chosen filename-sized objects turns the walk into a kernel read. I:H - ext4_htree_store_dirent writes fname->next on a hash match and rb_link_node stores the new node through the parent's rb_left or rb_right. Those fields belong to the fname that free_rb_tree_fname already freed, so a reclaimed slab becomes a kernel write through the attacker's replacement bytes. A:H - The KASAN report is a slab use-after-free in ext4_htree_store_dirent on the ksmbd-io workqueue, with the free stack in ksmbd_vfs_empty_dir, and the unmodified kernel panicked. A fault on the freed rb node oopses the host from either worker.

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
Linux Linux e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 to < 67683a6cfbab82bb022d7d89390216c855fa6786 (affected · git)e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 to < 068c3a2a70c2c342bb84b882bb1f45f5a8c5a42c (affected · git)e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 to < 5ad61a34963f32fc1637d26e88cf6e02a3b99d08 (affected · git)e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 to < 818a9fd779443b931b05c025d85f29680efb26c2 (affected · git)e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 to < 2a4b6ae380a9f5175f002c1921cf9cbc7ca536ba (affected · git)e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 to < 7220980b2423d06a0604516129bfa4cec8a697ae (affected · git)Default: unaffected Linux · cna
Linux Linux 5.15 (affected)0 to < 5.15 (unaffected · semver)6.1.193 through 6.1.* (unaffected · semver)6.6.163 through 6.6.* (unaffected · semver)6.12.117 through 6.12.* (unaffected · semver)6.18.61 through 6.18.* (unaffected · semver)7.3.2 through 7.3.* (unaffected · semver)7.4-rc1 and later (unaffected · original_commit_for_fix)Default: affected Linux · cna

Weaknesses

0

No weakness assertions.

References

6

Provider assertions

1

Linux · cna

ksmbd: serialize directory emptiness checks with readdir

Provenance

Schema
5.2
Searchable
yes
Content hash
2dd0f4d032b294d3e8fa4186c85eb0e38891db58e5d99e8fda8e99041830c1c9
Ingested
23 Nov 2026, 14:37:12 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected