Description
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: fix use-after-free in __ksmbd_close_fd() via durable scavenger
When a durable file handle survives session disconnect (TCP close without
SMB2_LOGOFF), session_fd_check() sets fp->conn = NULL to preserve the
handle for later reconnection. However, it did not clean up the byte-range
locks on fp->lock_list.
Later, when the durable scavenger thread times out and calls
__ksmbd_close_fd(NULL, fp), the lock cleanup loop did:
spin_lock(&fp->conn->llist_lock);
This caused a slab use-after-free because fp->conn was NULL and the
original connection object had already been freed by
ksmbd_tcp_disconnect().
The root cause is asymmetric cleanup: lock entries (smb_lock->clist) were
left dangling on the freed conn->lock_list while fp->conn was nulled out.
To fix this issue properly, we need to handle the lifetime of
smb_lock->clist across three paths:
- Safely skip clist deletion when list is empty and fp->conn is NULL.
- Remove the lock from the old connection's lock_list in
session_fd_check()
- Re-add the lock to the new connection's lock_list in
ksmbd_reopen_durable_fd().
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Linux | Linux | 6.6.32 – < 6.6.140, 6.9 | 6.6.140 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | linux | 7.0.3-1 | — |
| Debian 13 | linux | 6.12.85-1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.04 LTS | linux | 7.0.0-27.27 | USN-8488-1 |
| Ubuntu 26.04 LTS | linux-aws | 7.0.0-1008.8 | USN-8488-1 |
| Ubuntu 26.04 LTS | linux-azure | 7.0.0-1010.10 | USN-8603-1 |
| Ubuntu 26.04 LTS | linux-gcp +1 | 7.0.0-1007.7 | USN-8488-1 |
| Ubuntu 26.04 LTS | linux-ibm +1 | 7.0.0-1009.9 | USN-8603-1, USN-8488-1 |
| Ubuntu 26.04 LTS | linux-nvidia | 7.0.0-1013.13 | USN-8507-1 |
| Ubuntu 26.04 LTS | linux-raspi | 7.0.0-1014.14 | USN-8488-2 |
| Ubuntu 26.04 LTS | linux-riscv +1 | 7.0.0-27.27.1 | USN-8488-1 |
| Ubuntu 25.10 | linux | 6.17.0-40.40 | USN-8490-1 |
| Ubuntu 25.10 | linux-aws | 6.17.0-1019.19 | USN-8490-1 |
| Ubuntu 25.10 | linux-azure +1 | No fix yet | — |
| Ubuntu 25.10 | linux-gcp | 6.17.0-1020.22 | USN-8490-1 |
| Ubuntu 25.10 | linux-oracle | 6.17.0-1018.18 | USN-8490-1 |
| Ubuntu 25.10 | linux-raspi | 6.17.0-1021.21 | USN-8546-1 |
| Ubuntu 25.10 | linux-realtime | 6.17.0-1017.19 | USN-8490-2 |
| Ubuntu 25.10 | linux-riscv | 6.17.0-40.40.1 | — |
| Ubuntu 24.04 LTS | linux-aws-6.17 | 6.17.0-1019.19~24.04.1 | USN-8490-1 |
| Ubuntu 24.04 LTS | linux-azure-6.17 | 6.17.0-1021.21~24.04.1 | USN-8604-1 |
| Ubuntu 24.04 LTS | linux-gcp-6.17 | 6.17.0-1020.22~24.04.1 | USN-8490-1 |
| Ubuntu 24.04 LTS | linux-hwe-6.17 | 6.17.0-40.40~24.04.1 | USN-8545-1 |
| Ubuntu 24.04 LTS | linux-hwe-7.0 | 7.0.0-28.28~24.04.1 | USN-8569-1 |
| Ubuntu 24.04 LTS | linux-nvidia-6.17 | 6.17.0-1026.26 | USN-8508-1 |
| Ubuntu 24.04 LTS | linux-oem-6.17 | 6.17.0-1028.28 | USN-8491-1 |
| Ubuntu 24.04 LTS | linux-oracle-6.17 +1 | 6.17.0-1018.18~24.04.1 | USN-8605-1, USN-8490-1 |
| Ubuntu 24.04 LTS | linux-riscv +19 | No fix yet | — |
| Ubuntu 22.04 LTS | linux-riscv +32 | No fix yet | — |
| Ubuntu 20.04 LTS | linux-gke +28 | No fix yet | — |
Show 3 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 18.04 LTS | linux-gcp +14 | No fix yet | — |
| Ubuntu 16.04 LTS | linux-hwe-edge | No fix yet | — |
| Ubuntu Pro Realtime 24.04 LTS | linux-realtime-6.14 | No fix yet | — |
| Ubuntu Pro Realtime 24.04 LTS | linux-realtime-6.17 | 6.17.0-1017.19~24.04.1 | USN-8490-2 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | kernel-source | 7.0.7-1.1 | openSUSE-SU-2026:10793-1 |
Advisories 15
- USN-8603-1 linux-azure, linux-azure-fde vulnerabilities Ubuntu Security Notices (USN) · Nov 13, 2026
- WID-SEC-2026-1346 Linux Kernel: Mehrere Schwachstellen BSI CERT-Bund (WID) · Nov 12, 2026
- USN-8488-1 linux, linux-aws, linux-gcp, linux-ibm, linux-oracle, linux-realtime vulnerabilities Ubuntu Security Notices (USN) · Nov 7, 2026
- USN-8569-1 linux-hwe-7.0 vulnerabilities Ubuntu Security Notices (USN) · Nov 7, 2026
- USN-8604-1 linux-azure-6.17 vulnerabilities Ubuntu Security Notices (USN) · Nov 7, 2026
- USN-8488-2 linux-raspi vulnerabilities Ubuntu Security Notices (USN) · Nov 7, 2026
- USN-8507-1 linux-nvidia vulnerabilities Ubuntu Security Notices (USN) · Nov 7, 2026
- USN-8508-1 linux-nvidia-6.17 vulnerabilities Ubuntu Security Notices (USN) · Nov 7, 2026
- USN-8546-1 linux-raspi vulnerabilities Ubuntu Security Notices (USN) · Nov 7, 2026
- USN-8490-2 linux-realtime, linux-realtime-6.17 vulnerabilities Ubuntu Security Notices (USN) · Nov 7, 2026
- USN-8545-1 linux-hwe-6.17 vulnerabilities Ubuntu Security Notices (USN) · Nov 7, 2026
- USN-8491-1 linux-oem-6.17 vulnerabilities Ubuntu Security Notices (USN) · Nov 7, 2026
- USN-8490-1 linux, linux-aws, linux-aws-6.17, linux-gcp, linux-gcp-6.17, linux-oracle, linux-oracle-6.17 vulnerabilities Ubuntu Security Notices (USN) · Nov 7, 2026
- USN-8605-1 linux-azure-fde-6.17 vulnerabilities Ubuntu Security Notices (USN) · Oct 17, 2026
- openSUSE-SU-2026:10793-1 kernel-devel-7.0.7-1.1 on GA media SUSE / openSUSE Security Updates · May 17, 2026
References
- https://git.kernel.org/stable/c/0000a7780e0e446a28a273572f6ea8f7f582f694
- https://git.kernel.org/stable/c/e33c65f011980b4ad4abfd93585ec2079856368f
- https://git.kernel.org/stable/c/3d6682726c2d3a46d31dae88b8166786b09b03ad
- https://git.kernel.org/stable/c/b34fc42cfe922e551f7a27d3ac3bb016e41d7dd9
- https://git.kernel.org/stable/c/235e32320a470fcd3998fb3774f2290a0eb302a1