{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2023-53358",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2023-53358"
  ],
  "published": "2025-09-17T14:57:20Z",
  "summary": "ksmbd: fix racy issue under cocurrent smb2 tree disconnect",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: fix racy issue under cocurrent smb2 tree disconnect\n\nThere is UAF issue under cocurrent smb2 tree disconnect.\nThis patch introduce TREE_CONN_EXPIRE flags for tcon to avoid cocurrent\naccess.",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
    }
  ],
  "affected": [
    {
      "package": {
        "ecosystem": "Raspberry Pi OS:12",
        "name": "linux"
      },
      "versions": [
        "1:6.1.21-1+rpt1"
      ],
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "linux-image-6.1.0-rpi1-rpi-v6",
            "binary_version": "1:6.1.21-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi1-rpi-v7",
            "binary_version": "1:6.1.21-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi1-rpi-v7l",
            "binary_version": "1:6.1.21-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi1-rpi-v8",
            "binary_version": "1:6.1.21-1+rpt1"
          }
        ]
      },
      "database_specific": {
        "per_version": {
          "1:6.1.21-1+rpt1": {
            "linux_commit": "0afb5e98488aed7017b9bf321b575d0177feb7ed",
            "upstream_version": "6.1.21",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.1.28"
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2023-53358"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/b36295c17fb97424406f0c3ab321b1ccaabb9be8"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/bd80d35725a0cf4df9307bfe2f1a3b2cb983d8e6"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/dc1c17716c099c90948ebb83e2170dd75a3be6b6"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/39366b47a59d46af15ac57beb0996268bf911f6a"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/30210947a343b6b3ca13adc9bfc88e1543e16dd5"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-08-05T11:24:39Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 8.8,
      "cvss_v3_severity": "High",
      "scenario": "AV:N - ksmbd is the in-kernel SMB server reached over TCP/445; smb2_tree_disconnect() is invoked from handle_ksmbd_work() solely on SMB2_TREE_DISCONNECT PDUs from a remote peer, with no local access required.\nAC:L - The attacker controls both sides of the race by issuing concurrent SMB2_TREE_DISCONNECT requests for the same TreeId (parallel ksmbd-io workqueue items via SMB credits) and can retry indefinitely until both paths observe the same tcon before TREE_CONN_EXPIRE exists.\nPR:L - smb2_check_user_session() and smb2_get_ksmbd_tcon() gate TREE_DISCONNECT behind an established session and tree connect, so a low-privileged SMB share user (including guest where mapped) is required; this is post-authentication, not a pre-auth path.\nUI:N - The attacker performs negotiate, session setup, tree connect, and concurrent tree disconnects entirely on its own connections; no victim or administrator action is needed.\nS:U - The use-after-free corrupts ksmbd kernel heap state within the same host kernel security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - Concurrent disconnect double-frees struct ksmbd_tree_connect (share_conf/user pointers), a sprayable slab UAF that yields arbitrary kernel read primitives once the object is reclaimed, consistent with ZDI-CAN-20592 RCE classification.\nI:H - The second disconnect path reads tree_conn fields from freed memory then kfree()s again, enabling heap spray to hijack control flow / arbitrary write; ZDI rates this as remote code execution in kernel context.\nA:H - Even without full exploitation, the double-free/UAF reliably oopses or panics ksmbd worker threads and can be triggered repeatedly over the network to deny service."
    }
  }
}
