ksmbd: don't hold ci->m_lock while waiting for a lease break ack
- 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.7, 6.18.53
- 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
The ksmbd SMB server in the Linux kernel can stall for up to 35 seconds when a client's lease break is pending, because it holds a lock while waiting for the client's acknowledgment. This causes significant delays in file operations on shares with leases enabled.
Summarized by anthropic/claude-haiku-5.5. Verify details against the original sources.
Read the original description
In the Linux kernel, the following vulnerability has been resolved: ksmbd: don't hold ci->m_lock while waiting for a lease break ack When a cifs.ko client caches a read-handle (RH) lease via deferred close and a conflicting open arrives, ksmbd breaks the lease and waits for the acknowledgment in wait_for_break_ack() for up to OPLOCK_WAIT_TIME (35s). __smb_break_all_levII_oplock() runs that wait while holding ci->m_lock for read. cifs.ko reacts to a handle-lease break by closing the deferred handle rather than sending a lease break acknowledgment. That close path (close_id_del_oplock() -> opinfo_del()) takes ci->m_lock for write and is exactly what would wake the waiter, but it blocks on the read lock held by the waiting thread. The break is then resolved only by the 35s timeout, so xfstests generic/001 takes ~78s with leases enabled versus ~4s with oplocks only. Collect the target opinfos (each pinned with a reference) while holding ci->m_lock, then break them after releasing it, matching how smb_grant_oplock() already breaks a conflicting lease using only a reference. The reference keeps the opinfo (and its conn and lease) alive across the unlocked window, and a close racing the break is handled by the existing OPLOCK_CLOSING state check. Apply the same fix to the parent lease break paths.
Timeline
- CVE published
- First seen by cve.now
- Record last updated
Affected versions
- Linux Linux
From d1c189c6cb8b0fb7b5ee549237d27889c40c2f8b · fixed in 868c9038ffd4af39766d087f68c8f543a3f66635; From d1c189c6cb8b0fb7b5ee549237d27889c40c2f8b · fixed in 27a9bc968d4ae809a3f5ca2f2b136856ee613cb4; From 6.6.35 · fixed in 6.7
- Linux Linux
6.9
- KernelLinux
fixed in 6.18.53