Ad

CVE-2026-98897

NONE EPSS 0.19%
Обновлено 26 октября 2026
Linux
Параметр Значение
Поставщик Linux
Публичный эксплойт Нет

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. Этот близкий путь (close_id_del_oplock() -> opinfo_del()) принимает ci->m_lock за запись и является именно тем, что разбудит официанта, но блокирует блокировку чтения, удерживаемую ожидающим потоком. Перерыв затем решается только тайм-аутом 35s, поэтому xfstests generic/001 занимает 78 с включенными арендами по сравнению с 4s только с блокировками.

Соберите целевые опинфо (каждый из которых прикреплен к ссылке) при удержании ci->m_lock, затем разбейте их после его выпуска, сопоставив, как smb_grant_oplock () уже нарушает конфликтную аренду, используя только ссылку. Ссылка сохраняет opinfo (и его конн и аренда) живым через разблокированное окно, и близкий гоночный перерыв обрабатывается существующей проверкой состояния OPLOCK_CLOSING. Примените то же исправление к родительским путям брейка аренды.

Показать оригинальное описание (EN)

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.