{"id":"CVE-2026-98897","title":"ksmbd: don't hold ci->m_lock while waiting for a lease break ack","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: don't hold ci->m_lock while waiting for a lease break ack\n\nWhen a cifs.ko client caches a read-handle (RH) lease via deferred close\nand a conflicting open arrive…","severity":"none","vendor":"Linux","product":"Linux","affected":["Linux >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 < 868c9038ffd4af39766d087f68c8f543a3f66635","Linux >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 < 27a9bc968d4ae809a3f5ca2f2b136856ee613cb4","Linux < 6.18.53","Linux (all versions)"],"published":"2026-10-23","updated":"2026-10-23","sourceUpdated":"2026-10-23T11:54:05.872Z","source":"CVEORG","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-98897","references":[{"url":"https://git.kernel.org/stable/c/868c9038ffd4af39766d087f68c8f543a3f66635"},{"url":"https://git.kernel.org/stable/c/27a9bc968d4ae809a3f5ca2f2b136856ee613cb4"}],"tags":["cve.org"],"ingestedAt":"2026-10-23T13:24:55.576Z","slug":"CVE-2026-98897","body":"## Overview\n\nIn the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: don't hold ci->m_lock while waiting for a lease break ack\n\nWhen a cifs.ko client caches a read-handle (RH) lease via deferred close\nand a conflicting open arrives, ksmbd breaks the lease and waits for the\nacknowledgment in wait_for_break_ack() for up to OPLOCK_WAIT_TIME (35s).\n__smb_break_all_levII_oplock() runs that wait while holding ci->m_lock\nfor read.\n\ncifs.ko reacts to a handle-lease break by closing the deferred handle\nrather than sending a lease break acknowledgment. That close path\n(close_id_del_oplock() -> opinfo_del()) takes ci->m_lock for write and\nis exactly what would wake the waiter, but it blocks on the read lock\nheld by the waiting thread. The break is then resolved only by the 35s\ntimeout, so xfstests generic/001 takes ~78s with leases enabled versus\n~4s with oplocks only.\n\nCollect the target opinfos (each pinned with a reference) while holding\nci->m_lock, then break them after releasing it, matching how\nsmb_grant_oplock() already breaks a conflicting lease using only a\nreference.  The reference keeps the opinfo (and its conn and lease)\nalive across the unlocked window, and a close racing the break is\nhandled by the existing OPLOCK_CLOSING state check. Apply the same fix\nto the parent lease break paths.\n\n## Affected\n\n- `Linux >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 < 868c9038ffd4af39766d087f68c8f543a3f66635`\n- `Linux >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 < 27a9bc968d4ae809a3f5ca2f2b136856ee613cb4`\n- `Linux < 6.18.53`\n- `Linux (all versions)`\n\n## Remediation\n\nRefer to the linked advisories for vendor-supplied fixes and affected version ranges.","depth":"sunlit","depthScore":3,"depthScoreParts":{"impact":2.8,"likelihood":0,"exploitation":0,"ransomware":0},"changes":[]}