ksmbd: detach blocked lock requests before freeing
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 6.6.160, 6.12.114, 6.18.57, 7.2.6
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
In the Linux kernel, the following vulnerability has been resolved: ksmbd: detach blocked lock requests before freeing A file_lock retained by ksmbd for byte-range lock bookkeeping can still be part of the VFS blocked-request graph. In particular, the VFS can chain a new waiter below an already blocked request through flc_blocked_requests. The ksmbd_file reference count does not cover that graph. Both __ksmbd_close_fd() and the cross-request unlock path free these retained file_lock objects directly. If a dependent waiter is still attached, locks_release_private() hits BUG_ON(!list_empty(&flc->flc_blocked_requests)). The same lifetime mismatch can leave a freed ksmbd_lock reachable through its request-local llist. Detach the file_lock from the blocked-request graph before freeing it in the close, cross-request unlock, and rollback paths. locks_delete_block() also wakes requests chained below the object. Remove llist when a completed lock is published so a globally visible ksmbd_lock no longer points into the submitting worker's stack.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From d63528eb0d43c4796c42aad56889dec12cf4e122 · fixed in d20d3f6ad8b0b6f4e1bb32cdf7eca251962e8f04; From d63528eb0d43c4796c42aad56889dec12cf4e122 · fixed in d31db79cfaa9fce6649772ad279779473ba8aef9; From d63528eb0d43c4796c42aad56889dec12cf4e122 · fixed in f77d2accafca529e0ea3f979eb6e6cf1dac05c90; From d63528eb0d43c4796c42aad56889dec12cf4e122 · fixed in 514a0b2bc949963497e66cacd433f65dc768a71d; From d63528eb0d43c4796c42aad56889dec12cf4e122 · fixed in 215e8816b1ac25176d911abb8704390413ccee4b
- Linux Linux
5.15
- KernelLinux
From 5.15.0 · fixed in 6.6.160; From 6.7.0 · fixed in 6.12.114; From 6.13.0 · fixed in 6.18.57; From 6.19.0 · fixed in 7.2.6