{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2025-39933",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2025-39933"
  ],
  "published": "2025-10-04T07:33:57Z",
  "summary": "smb: client: let recv_done verify data_offset, data_length and remaining_data_length",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: client: let recv_done verify data_offset, data_length and remaining_data_length\n\nThis is inspired by the related server fixes.",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:H"
    }
  ],
  "affected": [
    {
      "package": {
        "ecosystem": "Raspberry Pi OS:12",
        "name": "linux"
      },
      "versions": [
        "1:6.1.47-1+rpt4"
      ],
      "ecosystem_specific": {
        "binaries": [
          {
            "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+rpt4": {
            "linux_commit": "655fc658a15ae7a6f37103754adb39ba52a9a14e",
            "upstream_version": "6.1.47",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": null,
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2025-39933"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/581fb78e0388b78911b0c920e4073737090c8b5f"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/f57e53ea252363234f86674db475839e5b87102e"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-08-05T12:19:11Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 9.4,
      "cvss_v3_severity": "Critical",
      "scenario": "AV:N - The vulnerable code parses `smbdirect_data_transfer` headers received directly from a remote SMB server over RDMA, and iWARP/RoCEv2 are routable over ordinary IP networks (soft-iWARP/soft-RoCE need no special hardware). A malicious, compromised, or spoofed SMB Direct peer reaches `recv_done()` purely over the network.\nAC:L - The attacker writes `data_offset`/`data_length` as plain header fields in a single crafted data-transfer message; there is no race, no memory-layout precondition, and the out-of-bounds read is deterministic and repeatable at an offset of the attacker's choosing.\nPR:N - `recv_done()` switches to `SMBDIRECT_EXPECT_DATA_TRANSFER` as soon as the unauthenticated transport-level SMBD negotiate completes, so the malformed packet is processed before SMB2 NEGOTIATE/SESSION_SETUP and before any signing or encryption is established \u2014 the peer needs no credentials on the client.\nUI:N - Once an SMB Direct mount exists (including automounts, fstab, DFS referrals, and automatic reconnects), a hostile or compromised server can send the crafted frame at any time and the client processes it automatically in its receive-completion and demultiplex paths. No administrator or user action is required at the moment of attack.\nS:U - The out-of-bounds access, the disclosed data, and the resulting fault are all confined to the client kernel's own security authority; no hypervisor, IOMMU, or sandbox boundary is crossed.\nC:H - The unvalidated 32-bit `data_offset` makes `copy_to_iter()` read from an attacker-chosen address up to 4 GiB past a ~2 KB receive-buffer slab object, and the inflated `data_length` keeps that buffer at the queue head so `offset` advances on each call \u2014 allowing a remote peer to stream out large amounts of kernel memory, which is then delivered to userspace as SMB response/file content.\nI:L - There is no out-of-bounds write, but the client assembles and parses SMB2 responses built from out-of-bounds kernel memory, so connection state, file metadata, and page-cache contents returned to applications are driven by data the attacker caused the kernel to read from outside the intended buffer.\nA:H - A large `data_offset` faults on unmapped memory or a vmalloc guard page in the demultiplex/softirq path, and an inflated `data_length` desynchronizes `reassembly.data_length` so `_get_first_reassembly()` returns NULL and is immediately dereferenced \u2014 either way an oops (full panic with `panic_on_oops`) that tears down the mount."
    }
  }
}
