{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2023-52440",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2023-52440"
  ],
  "published": "2024-02-21T07:27:21Z",
  "summary": "ksmbd: fix slub overflow in ksmbd_decode_ntlmssp_auth_blob()",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: fix slub overflow in ksmbd_decode_ntlmssp_auth_blob()\n\nIf authblob->SessionKey.Length is bigger than session key\nsize(CIFS_KEY_SIZE), slub overflow can happen in key exchange codes.\ncifs_arc4_crypt copy to session key array from SessionKey from client.",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/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.52"
          },
          "1:6.1.47-1+rpt4": {
            "linux_commit": "655fc658a15ae7a6f37103754adb39ba52a9a14e",
            "upstream_version": "6.1.47",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.1.52",
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2023-52440"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/bd554ed4fdc3d38404a1c43d428432577573e809"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/30fd6521b2fbd9b767e438e31945e5ea3e3a2fba"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/7f1d6cb0eb6af3a8088dc24b7ddee9a9711538c4"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/ecd7e1c562cb08e41957fcd4b0e404de5ab38e20"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/4b081ce0d830b684fdf967abc3696d1261387254"
    }
  ],
  "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.8,
      "cvss_v3_severity": "Critical",
      "scenario": "AV:N - The bug is in ksmbd's NTLMSSP SESSION_SETUP handling (fs/smb/server/), reached over TCP/445 via the in-kernel SMB server from a remote peer with no local access required.\nAC:L - An attacker who sets NTLMSSP_NEGOTIATE_KEY_XCH and supplies SessionKey.Length > CIFS_KEY_SIZE (40) reliably triggers cifs_arc4_crypt()'s unbounded write into sess->sess_key; no race or attacker-uncontrollable condition is required.\nPR:N - The overflow runs in the KEY_XCH path after ksmbd_auth_ntlmv2() regardless of whether authentication succeeds, so valid credentials are not required\u2014only a configured username during the pre-auth handshake, which ZDI also assessed as unauthenticated.\nUI:N - Exploitation requires only attacker-sent SMB SESSION_SETUP messages; no victim user action is needed.\nS:U - This is standard in-kernel heap corruption leading to privilege escalation within the host kernel's security authority, not a VM/IOMMU/sandbox boundary cross.\nC:H - The heap OOB write corrupts ksmbd_session fields and adjacent SLUB objects, which can be leveraged for arbitrary kernel memory disclosure under standard heap-exploitation techniques.\nI:H - Attacker-controlled-length write past the 40-byte sess_key into session pointers/keys and adjacent slab objects is an out-of-bounds write enabling control-flow hijacking and RCE, as assessed by ZDI (ZDI-24-229).\nA:H - The SLUB overflow corrupts kernel heap metadata and session structures, causing reliable kernel oops/panic and denial of service of the host."
    }
  }
}
