In the Linux kernel, the following vulnerability has been resolved:
ksmbd: fix use-after-free of a deferred file_lock on SMB2_CLOSE then SMB2_CANCEL
Commit f580d27e8928 ("ksmbd: fix use-after-free of a deferred file_lock on double SMB2_CANCEL") made smb2_cancel() skip a work whose state is KSMBD_WORK_CANCELLED, so its cancel_fn cannot be fired a second time. But KSMBD_WORK has three states (ACTIVE, CANCELLED, CLOSED), and the same freeing producer path is reached for CLOSED too:
SMB2_CLOSE on the locking handle -> set_close_state_blocked_works() sets the deferred work's state to KSMBD_WORK_CLOSED and wakes the smb2_lock() worker. The worker takes the non-ACTIVE early-exit, locks_free_lock()s the file_lock and, because the state is not KSMBD_WORK_CANCELLED, takes the STATUS_RANGE_NOT_LOCKED branch with "goto out2" -- which, like the cancelled branch, skips release_async_work(). The work stays on conn->async_requests with a live cancel_fn = smb2_remove_blocked_lock pointing at the freed file_lock.
A subsequent SMB2_CANCEL for the same AsyncId then passes the KSMBD_WORK_CANCELLED-only guard (its state is KSMBD_WORK_CLOSED), so smb2_cancel() fires cancel_fn again over the freed file_lock -- the same use-after-free fixed, via SMB2_CLOSE instead of a first SMB2_CANCEL:
BUG: KASAN: slab-use-after-free in __locks_delete_block __locks_delete_block locks_delete_block ksmbd_vfs_posix_lock_unblock smb2_remove_blocked_lock smb2_cancel <- 2nd SMB2_CANCEL fires cancel_fn handle_ksmbd_work Allocated by ...: locks_alloc_lock <- smb2_lock Freed by ...: locks_free_lock <- smb2_lock (non-ACTIVE early-exit) ... cache file_lock_cache of size 192
Reproduced on mainline 7.1-rc7 (which already contains f580d27e8928) with KASAN by an authenticated SMB client; the double-SMB2_CANCEL control is silent on that kernel, so the splat is attributable to the CLOSE trigger.
Only an ACTIVE deferred work may have its cancel_fn fired: both terminal states (CANCELLED and CLOSED) reach the smb2_lock() early-exit that frees the file_lock and skips release_async_work(). Guard on KSMBD_WORK_ACTIVE so any non-active work is skipped.
| Product | Vendor Advisory | Solution File | Added | Published |
|---|---|---|---|---|
| Debian | — | Upgrade linuxUpgrade linux-6.1Upgrade linux-6.12 | Jul 28, 2026 | Jul 28, 2026 |
| Echo Linux | — | Upgrade linux-6.12 | Nov 12, 2026 | Jul 25, 2026 |
| Ubuntu | — | Upgrade linux-image-6.8.0-1052-gkeopUpgrade linux-image-6.8.0-1064-oracleUpgrade linux-image-6.8.0-1064-oracle-64kUpgrade linux-image-6.8.0-1066-gkeUpgrade linux-image-6.8.0-1066-gke-64kUpgrade linux-image-6.8.0-1067-awsUpgrade linux-image-6.8.0-1067-aws-64kUpgrade linux-image-6.8.0-1067-aws-fipsUpgrade linux-image-6.8.0-1067-ibmUpgrade linux-image-6.8.0-1069-azure-fdeUpgrade linux-image-6.8.0-1071-azureUpgrade linux-image-6.8.0-1071-azure-fipsUpgrade linux-image-6.8.0-1071-gcpUpgrade linux-image-6.8.0-1071-gcp-64kUpgrade linux-image-6.8.0-1071-gcp-fipsUpgrade linux-image-6.8.0-147-fipsUpgrade linux-image-6.8.0-147-genericUpgrade linux-image-6.8.0-147-generic-64kUpgrade linux-image-6.8.0-147-lowlatencyUpgrade linux-image-6.8.0-147-lowlatency-64kUpgrade linux-image-6.8.1-1062-realtimeUpgrade linux-image-aws-6.8Upgrade linux-image-aws-64k-6.8Upgrade linux-image-aws-64k-lts-24.04Upgrade linux-image-aws-fipsUpgrade linux-image-aws-fips-6.8Upgrade linux-image-aws-lts-24.04Upgrade linux-image-azure-6.8Upgrade linux-image-azure-fde-6.8Upgrade linux-image-azure-fde-lts-24.04Upgrade linux-image-azure-fipsUpgrade linux-image-azure-fips-6.8Upgrade linux-image-azure-lts-24.04Upgrade linux-image-fipsUpgrade linux-image-fips-6.8Upgrade linux-image-gcp-6.8Upgrade linux-image-gcp-64k-6.8Upgrade linux-image-gcp-64k-lts-24.04Upgrade linux-image-gcp-fipsUpgrade linux-image-gcp-fips-6.8Upgrade linux-image-gcp-lts-24.04Upgrade linux-image-genericUpgrade linux-image-generic-6.8Upgrade linux-image-generic-64kUpgrade linux-image-generic-64k-6.8Upgrade linux-image-generic-lpaeUpgrade linux-image-gkeUpgrade linux-image-gke-6.8Upgrade linux-image-gke-64kUpgrade linux-image-gke-64k-6.8Upgrade linux-image-gkeopUpgrade linux-image-gkeop-6.8Upgrade linux-image-ibmUpgrade linux-image-ibm-6.8Upgrade linux-image-ibm-classicUpgrade linux-image-ibm-lts-24.04Upgrade linux-image-intel-iot-realtimeUpgrade linux-image-intel-iotgUpgrade linux-image-kvmUpgrade linux-image-laptop-23.10Upgrade linux-image-lowlatencyUpgrade linux-image-lowlatency-6.8Upgrade linux-image-lowlatency-64kUpgrade linux-image-lowlatency-64k-6.8Upgrade linux-image-oracle-6.8Upgrade linux-image-oracle-64k-6.8Upgrade linux-image-oracle-64k-lts-24.04Upgrade linux-image-oracle-lts-24.04Upgrade linux-image-realtimeUpgrade linux-image-realtime-6.8.1Upgrade linux-image-virtualUpgrade linux-image-virtual-6.8 | Oct 14, 2026 | Oct 13, 2026 |
| Vmware Photon_os | — | Use 'tdnf update' to upgrade all packages to the latest version. | Jul 31, 2026 | Jul 25, 2026 |
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub