CVE-2026-98897

ksmbd: don't hold ci->m_lock while waiting for a lease break ack

Published Oct 23, 2026 CVSS 3.1 · 4.3 Medium EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

The Linux kernel’s CIFS implementation holds a read lock while waiting for a lease break acknowledgement, causing a 35‑second timeout when a conflicting open arrives. This race condition prevents the lease break from being acknowledged promptly, resulting in prolonged blocking for client operations and no direct code execution is possible. The kernel code uses the lock to protect shared structures, but the waiting thread blocks other threads from completing the lease break, producing a denial‑of‑service effect for SMB clients that rely on fast lease management. The flaw also manifests as uncontrolled use of wait‑for‑acknowledgement leading to a potential deadlock and resource handling errors (CWE‑833).

Affected Systems

This issue affects the Linux kernel on all vendor distributions that ship the CIFS SMB client (cifs.ko). No specific kernel version is listed in the data, so any system that uses the default CIFS driver before the applied patch may be impacted.

Risk and Exploitability

The CVSS score of 4.3 indicates a low to moderate severity. The EPSS score is < 1%, showing a very low probability of exploitation, and the vulnerability is not listed in CISA KEV. Nevertheless, the 35‑second wait can be triggered by normal SMB traffic if a lease conflict occurs, leading to performance degradation or temporary denial of service. The issue is a race condition that could be aggravated by high load or scripted lease break requests, but it does not grant remote code execution or privilege escalation.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Deploy a kernel update that incorporates the ksmbd patch; this is the vendor‑issued remedy for the race condition.
  • If you cannot apply a kernel update immediately, configure your SMB clients to avoid leasing and deferred close – for example, mount CIFS shares with oplocks disabled or with lease support turned off using the appropriate mount options.
  • Enable kernel debugging or log monitoring to detect prolonged lease break waits, and if the timeout is still excessive, consider reducing OPLOCK_WAIT_TIME via sysctl or kernel parameters, keeping in mind that this may affect other operations.

Generated by OpenCVE AI on October 27, 2026 at 10:38 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Ubuntu USN Ubuntu USN USN-9019-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-9020-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9160-1 Linux kernel (Azure) vulnerabilities
History
Type Values Removed Values Added
Weaknesses CWE-362
CWE-635
Type Values Removed Values Added
Weaknesses CWE-833
References
Metrics threat_severity

None

cvssV3_1

{'score': 4.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L'}

threat_severity

Moderate

Type Values Removed Values Added
First Time appeared Linux linux
Vendors & Products Linux linux
Type Values Removed Values Added
Weaknesses CWE-362
CWE-635
Type Values Removed Values Added
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.
Title ksmbd: don't hold ci->m_lock while waiting for a lease break ack
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Oct 26, 2026, 6:56 AM
Reserved
Sep 25, 2026, 10:25 AM
Status
Received
Published
Oct 23, 2026, 12:18 PM
Modified
Oct 26, 2026, 7:17 AM
Severity
Moderate
Public date
Oct 23, 2026, 12:00 AM