HIGH
ksmbd Channel List UAF
CVE-2026-23226
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
KernelScan AI8.8HIGH
01Description
In the Linux kernel, the following vulnerability has been resolved: ksmbd: add chann_lock to protect ksmbd_chann_list xarray ksmbd_chann_list xarray lacks synchronization, allowing use-after-free in multi-channel sessions (between lookup_chann_list() and ksmbd_chann_del). Adds rw_semaphore chann_lock to struct ksmbd_session and protects all xa_load/xa_store/xa_erase accesses.
02KernelScan AI Analysis
Risk summary
High-severity use-after-free vulnerability in the Linux kernel's SMB server (ksmbd) that can be triggered remotely through SMB multi-channel operations. Successful exploitation could lead to kernel memory corruption, system crashes, or potential privilege escalation.
Vulnerability analysis
Summary: Use-after-free vulnerability in ksmbd SMB server channel management due to missing synchronization on xarray operations
Root Cause: The ksmbd_chann_list xarray in struct ksmbd_session lacks proper synchronization protection. Multiple threads can concurrently access the xarray through xa_load() in lookup_chann_list() and xa_erase() in ksmbd_chann_del(), creating a race condition where one thread can free a channel object while another thread is still using it.
Attack Mechanism: An attacker can trigger concurrent multi-channel SMB session operations to exploit the race condition between channel lookup and deletion. This can lead to use-after-free conditions where freed channel objects are accessed, potentially allowing arbitrary code execution or system crashes.
Attack Surface: Network-accessible through SMB protocol, requires ability to establish SMB multi-channel sessions. The vulnerability is in the ksmbd kernel SMB server implementation.
Fix Mechanism: The patch adds a new rw_semaphore 'chann_lock' to struct ksmbd_session and protects all xarray operations (xa_load, xa_store, xa_erase) with appropriate read/write locks. Read locks are used for lookups (lookup_chann_list) while write locks protect modifications (channel addition/deletion).
03Fix Versions
| Branch | Fixed in | Patch commit |
|---|---|---|
| 5.16 | 5.16 | 4c2ca3160852 |
| 6.12 | 6.12.77 | 4f3a06cc5797 |
| 6.18 | 6.18.11 | — |
| 6.19 | 6.19.1 | — |
| 6.2 | 6.2 | e4a8a96a93d0 |
| 6.3 | 6.3 | 36ef605c0395 |
| mainline | 7.0 | — |