{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2023-52441",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2023-52441"
  ],
  "published": "2024-02-21T07:27:21Z",
  "summary": "ksmbd: fix out of bounds in init_smb2_rsp_hdr()",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: fix out of bounds in init_smb2_rsp_hdr()\n\nIf client send smb2 negotiate request and then send smb1 negotiate\nrequest, init_smb2_rsp_hdr is called for smb1 negotiate request since\nneed_neg is set to false. This patch ignore smb1 packets after ->need_neg\nis set to false.",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H"
    }
  ],
  "affected": [
    {
      "package": {
        "ecosystem": "Raspberry Pi OS:12",
        "name": "linux"
      },
      "versions": [
        "1:6.1.47-1+rpt2",
        "1:6.1.47-1+rpt4"
      ],
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "linux-image-6.1.0-rpi2-rpi-v6",
            "binary_version": "1:6.1.47-1+rpt2"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi2-rpi-v7",
            "binary_version": "1:6.1.47-1+rpt2"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi2-rpi-v7l",
            "binary_version": "1:6.1.47-1+rpt2"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi2-rpi-v8",
            "binary_version": "1:6.1.47-1+rpt2"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-2712",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v6",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7l",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v8",
            "binary_version": "1:6.1.47-1+rpt4"
          }
        ]
      },
      "database_specific": {
        "per_version": {
          "1:6.1.47-1+rpt2": {
            "linux_commit": "655fc658a15ae7a6f37103754adb39ba52a9a14e",
            "upstream_version": "6.1.47",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.1.53"
          },
          "1:6.1.47-1+rpt4": {
            "linux_commit": "655fc658a15ae7a6f37103754adb39ba52a9a14e",
            "upstream_version": "6.1.47",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.1.53",
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2023-52441"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/5c0df9d30c289d6b9d7d44e2a450de2f8e3cf40b"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/330d900620dfc9893011d725b3620cd2ee0bc2bc"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/aa669ef229ae8dd779da9caa24e254964545895f"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/536bb492d39bb6c080c92f31e8a55fe9934f452b"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-08-15T12:24:41Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 9.1,
      "cvss_v3_severity": "Critical",
      "scenario": "AV:N - The bug is in ksmbd (fs/smb/server/), the in-kernel SMB server on TCP/445; init_smb2_rsp_hdr() runs while processing PDUs received from a remote peer via ksmbd_conn_handler_loop(), with no local access required.\nAC:L - The attacker reliably triggers the defect by sending an SMB2 negotiate (clearing need_neg) then an SMB1 negotiate on the same connection; both sides of the sequence and the small pdu_size that sizes the request slab object are fully attacker-controlled, with no race or external precondition.\nPR:N - The OOB occurs in init_rsp_hdr() during/after negotiate, before SESSION_SETUP and any credential check; smb2_check_user_session() does not require a session for negotiate, matching ZDI\u2019s unauthenticated assessment (ZDI-CAN-21541).\nUI:N - Exploitation needs only attacker-sent SMB negotiate PDUs to an already-running ksmbd listener; no local user or administrator action is required.\nS:U - The out-of-bounds read and leaked response data stay within the host kernel/ksmbd security authority; this is not a VM escape, IOMMU bypass, or sandbox boundary cross.\nC:H - init_smb2_rsp_hdr() memcpy\u2019s 16 bytes of Signature (and copies SessionId/TreeId) from past the end of the attacker-sized SMB1 request buffer into the response, which ksmbd_conn_write() returns to the unauthenticated peer\u2014a groomable remote kernel-heap disclosure.\nI:N - The defect is a read past the request buffer; response writes stay inside the correctly allocated response buffer, so there is no out-of-bounds write or integrity/control-flow primitive from this bug alone.\nA:H - The overread past a tiny kmalloc request object can fault under KFENCE/DEBUG_PAGEALLOC or panic under KASAN/panic_on_warn (as in related KASAN reports), and the attacker can retrigger it pre-authentication at will."
    }
  }
}
