CVE-2025-39942 (GCVE-0-2025-39942)
Vulnerability from cvelistv5
Published
2025-10-04 07:31
Modified
2026-08-05 12:06
Summary
In the Linux kernel, the following vulnerability has been resolved: ksmbd: smbdirect: verify remaining_data_length respects max_fragmented_recv_size This is inspired by the check for data_offset + data_length.
Impacted products
Vendor Product Version
Linux Linux Version: 2ea086e35c3d726a3bacd0a971c1f02a50e98206
Version: 2ea086e35c3d726a3bacd0a971c1f02a50e98206
Version: 2ea086e35c3d726a3bacd0a971c1f02a50e98206
Version: 2ea086e35c3d726a3bacd0a971c1f02a50e98206
Version: 2ea086e35c3d726a3bacd0a971c1f02a50e98206
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/smb/server/transport_rdma.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "196a3a7676d726ee67621ea2bf3b7815ac2685b4",
              "status": "affected",
              "version": "2ea086e35c3d726a3bacd0a971c1f02a50e98206",
              "versionType": "git"
            },
            {
              "lessThan": "d3cb3f209d35c44b7ee74f77ed27ebb28995b9ce",
              "status": "affected",
              "version": "2ea086e35c3d726a3bacd0a971c1f02a50e98206",
              "versionType": "git"
            },
            {
              "lessThan": "9644798294c7287e65a7b26e35aa6d2ce3345bcc",
              "status": "affected",
              "version": "2ea086e35c3d726a3bacd0a971c1f02a50e98206",
              "versionType": "git"
            },
            {
              "lessThan": "c64b915bb3d9339adcae5db4be2c35ffbef5e615",
              "status": "affected",
              "version": "2ea086e35c3d726a3bacd0a971c1f02a50e98206",
              "versionType": "git"
            },
            {
              "lessThan": "e1868ba37fd27c6a68e31565402b154beaa65df0",
              "status": "affected",
              "version": "2ea086e35c3d726a3bacd0a971c1f02a50e98206",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/smb/server/transport_rdma.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.15"
            },
            {
              "lessThan": "5.15",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.154",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.108",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.49",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.16.*",
              "status": "unaffected",
              "version": "6.16.9",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.17",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.154",
                  "versionStartIncluding": "5.15",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6.108",
                  "versionStartIncluding": "5.15",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.49",
                  "versionStartIncluding": "5.15",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.16.9",
                  "versionStartIncluding": "5.15",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.17",
                  "versionStartIncluding": "5.15",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: smbdirect: verify remaining_data_length respects max_fragmented_recv_size\n\nThis is inspired by the check for data_offset + data_length."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.5,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:N - The flaw is in ksmbd\u0027s in-kernel SMB Direct (RDMA) transport receive completion handler, which parses `smb_direct_data_transfer` headers straight off the wire from a remote SMB client on the SMB Direct port (5445/445 over iWARP or RoCEv2, both routable). No local access is needed \u2014 a single crafted RDMA send from a remote peer reaches the vulnerable code.\nAC:L - `remaining_data_length` is a plain header field the attacker writes directly, and the attacker also controls `preferred_send_size` in the SMB Direct negotiate request that determines `max_fragmented_recv_size`, so the unsatisfiable-reassembly condition is set up deterministically with two packets. No race, no memory-layout grooming, no timing dependency.\nPR:N - `recv_done()` is transport-level code that runs on every data transfer message before any SMB2 session setup or credential verification, and ksmbd never validates the negotiate request\u0027s `preferred_send_size`, letting an unauthenticated peer shrink the reassembly capacity below the pre-auth `SMB3_MAX_MSGSIZE` PDU limit and wedge the connection thread with no credentials at all.\nUI:N - The server processes the malformed data transfer message automatically as part of normal SMB Direct receive completion handling. No administrator or user action on the target is involved.\nS:U - The impact is confined to the ksmbd server\u0027s own kernel context \u2014 the stalled connection thread and pinned kernel allocations \u2014 with no crossing into a different security authority such as a hypervisor or IOMMU boundary.\nC:N - With the parent commit\u0027s `data_offset`/`data_length` validation in place, every `memcpy()` source in `smb_direct_read()` stays within the DMA\u0027d `wc-\u003ebyte_len` region, so no out-of-bounds or stale buffer contents are read and nothing is disclosed to the attacker beyond data they supplied themselves.\nI:N - The unsigned overflow of `data_length + remaining_data_length` only desynchronizes RFC1002 PDU framing on a byte stream the attacker already fully controls, and `get_rfc1002_len()`\u0027s `0xFFFFFF` mask plus the `max_allowed_pdu_size` check prevent any under-allocation or out-of-bounds write, so no kernel data or control flow is modified.\nA:H - A remote peer can request reassembly of a message larger than the transport can ever hold (bounded by 255 recvmsg buffers), permanently blocking the ksmbd connection kthread in `wait_event_interruptible()` while it pins a multi-megabyte `kvmalloc` buffer and the entire receive buffer pool; repeating this across connections exhausts kernel memory and server threads, denying SMB service."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T12:06:17.026Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/196a3a7676d726ee67621ea2bf3b7815ac2685b4"
        },
        {
          "url": "https://git.kernel.org/stable/c/d3cb3f209d35c44b7ee74f77ed27ebb28995b9ce"
        },
        {
          "url": "https://git.kernel.org/stable/c/9644798294c7287e65a7b26e35aa6d2ce3345bcc"
        },
        {
          "url": "https://git.kernel.org/stable/c/c64b915bb3d9339adcae5db4be2c35ffbef5e615"
        },
        {
          "url": "https://git.kernel.org/stable/c/e1868ba37fd27c6a68e31565402b154beaa65df0"
        }
      ],
      "title": "ksmbd: smbdirect: verify remaining_data_length respects max_fragmented_recv_size",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-39942",
    "datePublished": "2025-10-04T07:31:04.810Z",
    "dateReserved": "2025-04-16T07:20:57.148Z",
    "dateUpdated": "2026-08-05T12:06:17.026Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…