Skip to content
Heist/ feed
Back to feed
Unrated

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

Type: advisorySources: Official CVE List

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.

Products
Linux
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-98897
Confirmed fixed CVEs
Not specified
Updated in this feed
29 Oct 2026, 18:03 UTC · Revision 2

Source evidence

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

core-cve · Original source

Published 23 Oct 2026, 11:54 UTC

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.

cve:CVE-2026-98897

Linux

Fixed versions: Not specified

Linux

Fixed versions: Not specified

Complete source record
{
  "id": "b5e8c52e0087f45ce1bc352d17b55ebca1bc7dabe8a56e6caec1ac83dced3b01",
  "url": "https://www.cve.org/CVERecord?id=CVE-2026-98897",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "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: 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.",
    "evidence": "cve:CVE-2026-98897",
    "products": [
      {
        "name": {
          "value": "Linux",
          "evidence": "/containers/cna/affected/0/product"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": []
      },
      {
        "name": {
          "value": "Linux",
          "evidence": "/containers/cna/affected/1/product"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2026-98897",
      "aliases": [
        "CVE-2026-98897"
      ],
      "metrics": [],
      "affected": [
        {
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "product": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "d1c189c6cb8b0fb7b5ee549237d27889c40c2f8b",
              "lessThan": "868c9038ffd4af39766d087f68c8f543a3f66635",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "d1c189c6cb8b0fb7b5ee549237d27889c40c2f8b",
              "lessThan": "27a9bc968d4ae809a3f5ca2f2b136856ee613cb4",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "16ece7c5645a68efca22a0a69a7718c8e50c3232",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "6.6.35",
              "lessThan": "6.7",
              "versionType": "semver"
            }
          ],
          "programFiles": [
            "fs/smb/server/oplock.c"
          ],
          "defaultStatus": "unaffected"
        },
        {
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "product": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.9"
            },
            {
              "status": "unaffected",
              "version": "0",
              "lessThan": "6.9",
              "versionType": "semver"
            },
            {
              "status": "unaffected",
              "version": "6.18.53",
              "versionType": "semver",
              "lessThanOrEqual": "6.18.*"
            },
            {
              "status": "unaffected",
              "version": "7.2",
              "versionType": "original_commit_for_fix",
              "lessThanOrEqual": "*"
            }
          ],
          "programFiles": [
            "fs/smb/server/oplock.c"
          ],
          "defaultStatus": "affected"
        }
      ],
      "modified": "2026-10-26T06:56:24.210Z",
      "provider": "cve",
      "references": [
        "https://git.kernel.org/stable/c/868c9038ffd4af39766d087f68c8f543a3f66635",
        "https://git.kernel.org/stable/c/27a9bc968d4ae809a3f5ca2f2b136856ee613cb4"
      ],
      "provider_metadata": {
        "cna": {
          "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
          "shortName": "Linux",
          "dateUpdated": "2026-10-26T06:56:24.210Z"
        }
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-98897",
        "evidence": "/cveMetadata/cveId"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-cve",
  "document_id": 263355,
  "published_at": "2026-10-23T11:54:05.872+00:00"
}