GCVE Workshop - 22 September 2026 (14:00-18:00), Luxembourg Before The Vulnopticon Conference - Registration

CVE-2026-89635 (GCVE-0-2026-89635)

Vulnerability from cvelistv5 – Published: 2026-09-11 19:45 – Updated: 2026-09-13 06:32
VLAI
Title
ksmbd: only rebind the reopened file's own oplock on durable reconnect
Summary
In the Linux kernel, the following vulnerability has been resolved: ksmbd: only rebind the reopened file's own oplock on durable reconnect ksmbd_reopen_durable_fd() walks the inode's m_op_list and rebinds every detached oplock to the reconnecting session: list_for_each_entry_rcu(op, &ci->m_op_list, op_entry, lockdep_is_held(&ci->m_lock)) { if (op->conn) continue; op->conn = ksmbd_conn_get(fp->conn); op->sess = work->sess; } The only key is op->conn == NULL, which every detached durable handle on that inode matches, not just the one owned by fp. When two sessions hold durable handles on the same file and both disconnect, reconnecting one of them adopts the other session's oplock: op->sess is overwritten with the reconnecting session without taking a reference on it, while op->conn pins the connection. The sibling teardown path, session_fd_check(), keys on the identity of the connection being torn down (op->conn == conn) rather than on shared state, and so does not have this problem. Once the adopting session is destroyed, ksmbd_session_destroy() frees it while the foreign oplock still points at it. The reader in ksmbd_close_fd_app_instance_id() validates only opinfo->conn, which is still live thanks to the reference taken above, and then dereferences the stale session: if (!opinfo->conn) { up_read(&fp->f_ci->m_lock); goto out; } ft = &opinfo->sess->file_table; write_lock(&ft->lock); BUG: KASAN: slab-use-after-free in _raw_write_lock+0x74/0xd0 Write of size 4 at addr ffff88810a970528 by task kworker/0:0/9 Workqueue: ksmbd-io handle_ksmbd_work Call Trace: _raw_write_lock+0x74/0xd0 ksmbd_close_fd_app_instance_id+0x183/0x410 smb2_open+0x1346/0x4430 handle_ksmbd_work+0x2bb/0x7b0 Reached from an authenticated session against a share with the default durable-handle and oplock configuration: two sessions open the same file with a durable-v2 handle and an RH lease under distinct AppInstanceIds, both log off, one reconnects with DH2C, and a later durable-v2 create carrying the other AppInstanceId walks into the freed session. Constrain the loop to the oplock owned by the file being reopened.
Impacted products
Vendor Product Version CPE status
Linux Linux Affected: f363a0fb134a3eb9e47368b1edbd251fd76be84b , < 74e3ef4630f004c0de40c0540648a5a4033c6c9d (git)
Affected: f363a0fb134a3eb9e47368b1edbd251fd76be84b , < 3f220a0a62e6b9b391c9d1f0e6580b05173cc7f7 (git)
guessed Create a notification for this product.
Linux Linux Affected: 7.2
Unaffected: 0 , < 7.2 (semver)
Unaffected: 7.2.4 , ≤ 7.2.* (semver)
Unaffected: 7.3-rc1 , ≤ * (original_commit_for_fix)
guessed Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/smb/server/vfs_cache.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "74e3ef4630f004c0de40c0540648a5a4033c6c9d",
              "status": "affected",
              "version": "f363a0fb134a3eb9e47368b1edbd251fd76be84b",
              "versionType": "git"
            },
            {
              "lessThan": "3f220a0a62e6b9b391c9d1f0e6580b05173cc7f7",
              "status": "affected",
              "version": "f363a0fb134a3eb9e47368b1edbd251fd76be84b",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/smb/server/vfs_cache.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "7.2"
            },
            {
              "lessThan": "7.2",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "7.2.*",
              "status": "unaffected",
              "version": "7.2.4",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "7.3-rc1",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.2.4",
                  "versionStartIncluding": "7.2",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.3-rc1",
                  "versionStartIncluding": "7.2",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: only rebind the reopened file\u0027s own oplock on durable reconnect\n\nksmbd_reopen_durable_fd() walks the inode\u0027s m_op_list and rebinds every\ndetached oplock to the reconnecting session:\n\n\tlist_for_each_entry_rcu(op, \u0026ci-\u003em_op_list, op_entry,\n\t\t\t\tlockdep_is_held(\u0026ci-\u003em_lock)) {\n\t\tif (op-\u003econn)\n\t\t\tcontinue;\n\t\top-\u003econn = ksmbd_conn_get(fp-\u003econn);\n\t\top-\u003esess = work-\u003esess;\n\t}\n\nThe only key is op-\u003econn == NULL, which every detached durable handle on\nthat inode matches, not just the one owned by fp.  When two sessions hold\ndurable handles on the same file and both disconnect, reconnecting one of\nthem adopts the other session\u0027s oplock: op-\u003esess is overwritten with the\nreconnecting session without taking a reference on it, while op-\u003econn\npins the connection.\n\nThe sibling teardown path, session_fd_check(), keys on the identity of\nthe connection being torn down (op-\u003econn == conn) rather than on shared\nstate, and so does not have this problem.\n\nOnce the adopting session is destroyed, ksmbd_session_destroy() frees it\nwhile the foreign oplock still points at it.  The reader in\nksmbd_close_fd_app_instance_id() validates only opinfo-\u003econn, which is\nstill live thanks to the reference taken above, and then dereferences the\nstale session:\n\n\tif (!opinfo-\u003econn) {\n\t\tup_read(\u0026fp-\u003ef_ci-\u003em_lock);\n\t\tgoto out;\n\t}\n\n\tft = \u0026opinfo-\u003esess-\u003efile_table;\n\twrite_lock(\u0026ft-\u003elock);\n\n  BUG: KASAN: slab-use-after-free in _raw_write_lock+0x74/0xd0\n  Write of size 4 at addr ffff88810a970528 by task kworker/0:0/9\n  Workqueue: ksmbd-io handle_ksmbd_work\n  Call Trace:\n   _raw_write_lock+0x74/0xd0\n   ksmbd_close_fd_app_instance_id+0x183/0x410\n   smb2_open+0x1346/0x4430\n   handle_ksmbd_work+0x2bb/0x7b0\n\nReached from an authenticated session against a share with the default\ndurable-handle and oplock configuration: two sessions open the same file\nwith a durable-v2 handle and an RH lease under distinct AppInstanceIds,\nboth log off, one reconnects with DH2C, and a later durable-v2 create\ncarrying the other AppInstanceId walks into the freed session.\n\nConstrain the loop to the oplock owned by the file being reopened."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 9.8,
            "baseSeverity": "CRITICAL",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:N - ksmbd is the in-kernel SMB server on TCP/445; the UAF is reached from remote SMB2 CREATE (DH2C durable reconnect, then a later AppInstanceId create) via ksmbd_conn_handler_loop() through handle_ksmbd_work(), smb2_open(), ksmbd_reopen_durable_fd(), and ksmbd_close_fd_app_instance_id().\nAC:L - The attacker fully drives both sessions: open the same file with durable-v2 RH leases and distinct AppInstanceIds, log off both, reconnect one with DH2C (misbinding the sibling oplock), destroy that session, then CREATE with the other AppInstanceId. No victim-dependent race, heap layout, or rare kernel config is required.\nPR:N - SMB2 CREATE needs a session and tree connect, but ksmbd supports guest/anonymous users and guest shares; guest session setup skips NTLMSSP password verification, so a reasonable NAS/IoT deployment lets an unauthenticated network client reach this path without a named account.\nUI:N - No victim action is required; the attacker programmatically issues SESSION_SETUP, TREE_CONNECT, CREATE, LOGOFF, DH2C reconnect, and the follow-up AppInstanceId CREATE on their own SMB connections.\nS:U - The UAF corrupts ksmbd/kernel heap on the SMB server host and can escalate privileges within that kernel; it does not cross a VM, guest-to-host, container, or IOMMU/DMA security boundary.\nC:H - Use-after-free of a ksmbd_session object: after the adopted session is kfree\u0027d in ksmbd_session_destroy(), ksmbd_close_fd_app_instance_id() still sees a live opinfo-\u003econn and dereferences the stale opinfo-\u003esess, enabling arbitrary kernel disclosure via heap reuse.\nI:H - The UAF takes write_lock on the freed session\u0027s file_table.lock (KASAN 4-byte write) and may idr_remove through the stale table; with heap spray this yields arbitrary kernel writes and control-flow hijacking, matching High integrity for session-object UAF.\nA:H - KASAN reports slab-use-after-free in _raw_write_lock from ksmbd_close_fd_app_instance_id during smb2_open on ksmbd-io; the dangling session pointer causes kernel oops or panic on worker threads and is repeatable by resending the CREATE sequence."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-09-13T06:32:14.676Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/74e3ef4630f004c0de40c0540648a5a4033c6c9d"
        },
        {
          "url": "https://git.kernel.org/stable/c/3f220a0a62e6b9b391c9d1f0e6580b05173cc7f7"
        }
      ],
      "title": "ksmbd: only rebind the reopened file\u0027s own oplock on durable reconnect",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2026-89635",
    "datePublished": "2026-09-11T19:45:29.551Z",
    "dateReserved": "2026-09-11T19:38:34.739Z",
    "dateUpdated": "2026-09-13T06:32:14.676Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2026-89635",
      "date": "2026-09-15",
      "epss": "0.00553",
      "percentile": "0.44619"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2026-89635\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2026-09-11T20:19:49.120\",\"lastModified\":\"2026-09-13T07:17:28.657\",\"vulnStatus\":\"Received\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nksmbd: only rebind the reopened file\u0027s own oplock on durable reconnect\\n\\nksmbd_reopen_durable_fd() walks the inode\u0027s m_op_list and rebinds every\\ndetached oplock to the reconnecting session:\\n\\n\\tlist_for_each_entry_rcu(op, \u0026ci-\u003em_op_list, op_entry,\\n\\t\\t\\t\\tlockdep_is_held(\u0026ci-\u003em_lock)) {\\n\\t\\tif (op-\u003econn)\\n\\t\\t\\tcontinue;\\n\\t\\top-\u003econn = ksmbd_conn_get(fp-\u003econn);\\n\\t\\top-\u003esess = work-\u003esess;\\n\\t}\\n\\nThe only key is op-\u003econn == NULL, which every detached durable handle on\\nthat inode matches, not just the one owned by fp.  When two sessions hold\\ndurable handles on the same file and both disconnect, reconnecting one of\\nthem adopts the other session\u0027s oplock: op-\u003esess is overwritten with the\\nreconnecting session without taking a reference on it, while op-\u003econn\\npins the connection.\\n\\nThe sibling teardown path, session_fd_check(), keys on the identity of\\nthe connection being torn down (op-\u003econn == conn) rather than on shared\\nstate, and so does not have this problem.\\n\\nOnce the adopting session is destroyed, ksmbd_session_destroy() frees it\\nwhile the foreign oplock still points at it.  The reader in\\nksmbd_close_fd_app_instance_id() validates only opinfo-\u003econn, which is\\nstill live thanks to the reference taken above, and then dereferences the\\nstale session:\\n\\n\\tif (!opinfo-\u003econn) {\\n\\t\\tup_read(\u0026fp-\u003ef_ci-\u003em_lock);\\n\\t\\tgoto out;\\n\\t}\\n\\n\\tft = \u0026opinfo-\u003esess-\u003efile_table;\\n\\twrite_lock(\u0026ft-\u003elock);\\n\\n  BUG: KASAN: slab-use-after-free in _raw_write_lock+0x74/0xd0\\n  Write of size 4 at addr ffff88810a970528 by task kworker/0:0/9\\n  Workqueue: ksmbd-io handle_ksmbd_work\\n  Call Trace:\\n   _raw_write_lock+0x74/0xd0\\n   ksmbd_close_fd_app_instance_id+0x183/0x410\\n   smb2_open+0x1346/0x4430\\n   handle_ksmbd_work+0x2bb/0x7b0\\n\\nReached from an authenticated session against a share with the default\\ndurable-handle and oplock configuration: two sessions open the same file\\nwith a durable-v2 handle and an RH lease under distinct AppInstanceIds,\\nboth log off, one reconnects with DH2C, and a later durable-v2 create\\ncarrying the other AppInstanceId walks into the freed session.\\n\\nConstrain the loop to the oplock owned by the file being reopened.\"}],\"affected\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"affectedData\":[{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"unaffected\",\"programFiles\":[\"fs/smb/server/vfs_cache.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"f363a0fb134a3eb9e47368b1edbd251fd76be84b\",\"lessThan\":\"74e3ef4630f004c0de40c0540648a5a4033c6c9d\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"f363a0fb134a3eb9e47368b1edbd251fd76be84b\",\"lessThan\":\"3f220a0a62e6b9b391c9d1f0e6580b05173cc7f7\",\"versionType\":\"git\",\"status\":\"affected\"}]},{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"affected\",\"programFiles\":[\"fs/smb/server/vfs_cache.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"7.2\",\"status\":\"affected\"},{\"version\":\"0\",\"lessThan\":\"7.2\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"7.2.4\",\"lessThanOrEqual\":\"7.2.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"7.3-rc1\",\"lessThanOrEqual\":\"*\",\"versionType\":\"original_commit_for_fix\",\"status\":\"unaffected\"}]}]}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"type\":\"Secondary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H\",\"baseScore\":9.8,\"baseSeverity\":\"CRITICAL\",\"attackVector\":\"NETWORK\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"NONE\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"HIGH\",\"integrityImpact\":\"HIGH\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":3.9,\"impactScore\":5.9}]},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/3f220a0a62e6b9b391c9d1f0e6580b05173cc7f7\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/74e3ef4630f004c0de40c0540648a5a4033c6c9d\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}",
    "redhat_vex": {
      "aggregate_severity": "Moderate",
      "current_release_date": "2026-09-15T06:18:57+00:00",
      "cve": "CVE-2026-89635",
      "id": "CVE-2026-89635",
      "initial_release_date": "2026-09-11T00:00:00+00:00",
      "product_status:known_not_affected": "276",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: ksmbd: only rebind the reopened file\u0027s own oplock on durable reconnect",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-89635.json",
      "version": "3"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Loading…