Vulnerability · Published Jul 19, 2026 · Assigned by Linux
CVE-2026-64142ksmbd: close durable scavenger races against m_fp_list lookups
Critical 9.8
In plain English
A critical-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.7% (higher than 54% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In the Linux kernel, the following vulnerability has been resolved: ksmbd: close durable scavenger races against m_fp_list lookups ksmbd_durable_scavenger() has two related races against any walker that iterates f_ci->m_fp_list, including ksmbd_lookup_fd_inode() (used by ksmbd_vfs_rename) and the share-mode checks in fs/smb/server/smb_common.c. (1) fp->node list-head reuse. Durable-preserved handles can remain linked on f_ci->m_fp_list after session teardown so share-mode checks still see them while the handle is reconnectable. The scavenger collected expired handles by adding fp->node to a local scavenger_list after removing them from the global durable idr. Because fp->node is the same list_head used by m_fp_list, list_add(&fp->node, &scavenger_list) overwrites the m_fp_list links and corrupts both lists. CONFIG_DEBUG_LIST can report this on the share-mode walk path. (2) Refcount race against m_fp_list walkers. The scavenger qualifies an expired durable handle with atomic_read(&fp->refcount) > 1 and fp->conn under global_ft.lock, removes fp from global_ft, then drops global_ft.lock before unlinking fp from m_fp_list and freeing it. During that gap fp is still linked on m_fp_list with f_state == FP_INITED. ksmbd_lookup_fd_inode() under m_lock read calls ksmbd_fp_get() (atomic_inc_not_zero on refcount that is still 1) and takes a live reference; the scavenger then unlinks and frees fp while the holder owns a reference, leading to UAF on the holder's subsequent ksmbd_fd_put() and on any field reads performed by a concurrent share-mode walker that iterates m_fp_list without taking ksmbd_fp_get() (smb_check_perm_dleases-like paths). Fix both: * Stop reusing fp->node as a scavenger-private list node. Remove one expired handle from global_ft under global_ft.lock, take an explicit transient reference, drop the lock, unlink fp->node from m_fp_list under f_ci->m_lock, then drop both the durable lifetime and transient references with atomic_sub_and_test(2, &fp->refcount). If the scavenger is the last putter the close runs there; otherwise an in-flight holder that already raced through the m_fp_list lookup owns the final close via its ksmbd_fd_put() path. The one-at-a-time disposal can rescan the durable idr when multiple handles expire in the same pass, but durable scavenging is a background expiration path and the final full scan recomputes min_timeout before the next wait. * Clear fp->persistent_id inside __ksmbd_remove_durable_fd() right after idr_remove(), so a delayed final close from a holder that snatched fp does not re-issue idr_remove() on a persistent id that idr_alloc_cyclic() in ksmbd_open_durable_fd() may have already handed out to a brand-new durable handle. * Bypass the per-conn open_files_count decrement in __put_fd_final() when fp is detached from any session table (fp->conn cleared by session_fd_check() at durable preserve -- paired with the volatile_id clear at unpublish, so checking fp->conn alone is sufficient). The walker that owns the final close runs from an unrelated work->conn whose stats.open_files_count never tracked this durable fp; without this guard the holder would underflow that unrelated counter. The two races are folded into one patch because patch (1) alone cleans up the corrupted list but leaves a deterministic UAF window for m_fp_list walkers that the transient-reference and persistent_id discipline in (2) close; bisecting onto an intermediate state would land on a UAF that pre-patch chaos merely made less reproducible. Validation: * CONFIG_DEBUG_LIST coverage for the list_head reuse path. * KASAN-enabled direct SMB2 durable-handle coverage that exercised ksmbd_durable_scavenger() and non-NULL ksmbd_lookup_fd_inode() returns while durable handles expired under concurrent rename lookups, with no KASAN, UAF, list-corruption, ODEBUG, or WARNING reports. ---truncated---
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:13 | linux | 6.12.94-1 | DEBIAN-CVE-2026-64142 |
| Debian:14 | linux | 7.0.12-1 | DEBIAN-CVE-2026-64142 |
| Ubuntu:26.04:LTS | linux | 7.0.0-28.28 | UBUNTU-CVE-2026-64142 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:26.04:LTS | linux-aws | 7.0.0-1009.9 | UBUNTU-CVE-2026-64142 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:24.04:LTS | linux-aws-6.14 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:24.04:LTS | linux-aws-6.17 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:26.04:LTS | linux-azure | 7.0.0-1010.10 | UBUNTU-CVE-2026-64142 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:24.04:LTS | linux-azure-6.11 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:24.04:LTS | linux-azure-6.14 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:24.04:LTS | linux-azure-6.17 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:24.04:LTS | linux-azure-7.0 | 7.0.0-1014.14~24.04.1 | UBUNTU-CVE-2026-64142 |
| Ubuntu:26.04:LTS | linux-azure-fde | 7.0.0-1009.9 | UBUNTU-CVE-2026-64142 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:24.04:LTS | linux-azure-fde-6.14 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:24.04:LTS | linux-azure-fde-7.0 | 7.0.0-1013.13~24.04.1 | UBUNTU-CVE-2026-64142 |
| Ubuntu:24.04:LTS | linux-azure-nvidia-6.14 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:26.04:LTS | linux-gcp | 7.0.0-1008.8 | UBUNTU-CVE-2026-64142 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:24.04:LTS | linux-gcp-6.11 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:24.04:LTS | linux-gcp-6.14 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:24.04:LTS | linux-gcp-6.17 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:24.04:LTS | linux-gcp-7.0 | 7.0.0-1011.11~24.04.1 | UBUNTU-CVE-2026-64142 |
| Ubuntu:26.04:LTS | linux-gke | 7.0.0-1003.4 | UBUNTU-CVE-2026-64142 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:24.04:LTS | linux-hwe-6.11 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:24.04:LTS | linux-hwe-6.14 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:24.04:LTS | linux-hwe-6.17 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:24.04:LTS | linux-hwe-7.0 | 7.0.0-28.28~24.04.1 | UBUNTU-CVE-2026-64142 |
| Ubuntu:26.04:LTS | linux-ibm | 7.0.0-1010.10 | UBUNTU-CVE-2026-64142 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:24.04:LTS | linux-lowlatency-hwe-6.11 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:26.04:LTS | linux-nvidia | 7.0.0-1016.16 | UBUNTU-CVE-2026-64142 |
| Ubuntu:24.04:LTS | linux-nvidia-6.11 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:24.04:LTS | linux-nvidia-6.17 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:24.04:LTS | linux-nvidia-7.0 | 7.0.0-1016.16~24.04.1 | UBUNTU-CVE-2026-64142 |
| Ubuntu:26.04:LTS | linux-nvidia-bos | 7.0.0-2016.16 | UBUNTU-CVE-2026-64142 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:24.04:LTS | linux-oem-6.11 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:24.04:LTS | linux-oem-6.14 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:24.04:LTS | linux-oem-6.17 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:26.04:LTS | linux-oem-7.0 | 7.0.0-1009.9 | UBUNTU-CVE-2026-64142 |
| Ubuntu:26.04:LTS | linux-oracle | 7.0.0-1008.8 | UBUNTU-CVE-2026-64142 |
| Ubuntu:24.04:LTS | linux-oracle-6.14 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:24.04:LTS | linux-oracle-6.17 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:24.04:LTS | linux-oracle-7.0 | 7.0.0-1011.11~24.04.1 | UBUNTU-CVE-2026-64142 |
| Ubuntu:26.04:LTS | linux-raspi | 7.0.0-1015.15 | UBUNTU-CVE-2026-64142 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:24.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:26.04:LTS | linux-realtime | 7.0.0-28.28.1 | UBUNTU-CVE-2026-64142 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:24.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:26.04:LTS | linux-riscv | 7.0.0-28.28.1 | UBUNTU-CVE-2026-64142 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:24.04:LTS | linux-riscv-6.14 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:24.04:LTS | linux-riscv-6.17 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:24.04:LTS | linux-riscv-7.0 | 7.0.0-28.28.1~24.04.3 | UBUNTU-CVE-2026-64142 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2026-64142 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2026-64142 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 7f0cb478703cbeaddfe5c9101c5c73cd975d1073 – before 3a436932eb397e909d0607d76a8325abd9d85a35d484d621d40f4a8b8959008802d79bef3609641b – before 95f072ef934ca00711d510676b8792cbf59a5aaed484d621d40f4a8b8959008802d79bef3609641b – before 5da69a65b282d2276de22e5194ba0f88c836170cd484d621d40f4a8b8959008802d79bef3609641b – before 1f8f3246d55f89350a1a67bdf3744b7241048e4ed484d621d40f4a8b8959008802d79bef3609641b – before bf736184d063da1a552ffeff0481813599a182cc |
| Linux | Linux | 6.11 |
References
- https://git.kernel.org/stable/c/3a436932eb397e909d0607d76a8325abd9d85a35
- https://git.kernel.org/stable/c/95f072ef934ca00711d510676b8792cbf59a5aae
- https://git.kernel.org/stable/c/5da69a65b282d2276de22e5194ba0f88c836170c
- https://git.kernel.org/stable/c/1f8f3246d55f89350a1a67bdf3744b7241048e4e
- https://git.kernel.org/stable/c/bf736184d063da1a552ffeff0481813599a182cc