CVE-2025-39942 (GCVE-0-2025-39942)

Vulnerability from cvelistv5 – Published: 2025-10-04 07:31 – Updated: 2026-08-05 12:06
VLAI
Title
ksmbd: smbdirect: verify remaining_data_length respects max_fragmented_recv_size
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.
Assigner
Impacted products
Vendor Product Version
Linux Linux Affected: 2ea086e35c3d726a3bacd0a971c1f02a50e98206 , < 196a3a7676d726ee67621ea2bf3b7815ac2685b4 (git)
Affected: 2ea086e35c3d726a3bacd0a971c1f02a50e98206 , < d3cb3f209d35c44b7ee74f77ed27ebb28995b9ce (git)
Affected: 2ea086e35c3d726a3bacd0a971c1f02a50e98206 , < 9644798294c7287e65a7b26e35aa6d2ce3345bcc (git)
Affected: 2ea086e35c3d726a3bacd0a971c1f02a50e98206 , < c64b915bb3d9339adcae5db4be2c35ffbef5e615 (git)
Affected: 2ea086e35c3d726a3bacd0a971c1f02a50e98206 , < e1868ba37fd27c6a68e31565402b154beaa65df0 (git)
Create a notification for this product.
Linux Linux Affected: 5.15
Unaffected: 0 , < 5.15 (semver)
Unaffected: 6.1.154 , ≤ 6.1.* (semver)
Unaffected: 6.6.108 , ≤ 6.6.* (semver)
Unaffected: 6.12.49 , ≤ 6.12.* (semver)
Unaffected: 6.16.9 , ≤ 6.16.* (semver)
Unaffected: 6.17 , ≤ * (original_commit_for_fix)
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",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2025-39942",
      "date": "2026-08-06",
      "epss": "0.00263",
      "percentile": "0.17951"
    },
    "microsoft_vex": {
      "current_release_date": "2025-10-05T01:02:17.000Z",
      "cve": "CVE-2025-39942",
      "id": "msrc_CVE-2025-39942",
      "initial_release_date": "2025-10-02T00:00:00.000Z",
      "product_status:fixed": "1",
      "product_status:known_affected": "2",
      "source": "Microsoft CSAF VEX",
      "status": "final",
      "title": "ksmbd: smbdirect: verify remaining_data_length respects max_fragmented_recv_size",
      "url": "https://msrc.microsoft.com/csaf/vex/2025/msrc_cve-2025-39942.json",
      "version": "1"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2025-39942\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-10-04T08:15:47.230\",\"lastModified\":\"2026-07-30T06:23:59.173\",\"vulnStatus\":\"Modified\",\"cveTags\":[],\"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.\"}],\"affected\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"affectedData\":[{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"unaffected\",\"programFiles\":[\"fs/smb/server/transport_rdma.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"2ea086e35c3d726a3bacd0a971c1f02a50e98206\",\"lessThan\":\"196a3a7676d726ee67621ea2bf3b7815ac2685b4\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"2ea086e35c3d726a3bacd0a971c1f02a50e98206\",\"lessThan\":\"d3cb3f209d35c44b7ee74f77ed27ebb28995b9ce\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"2ea086e35c3d726a3bacd0a971c1f02a50e98206\",\"lessThan\":\"9644798294c7287e65a7b26e35aa6d2ce3345bcc\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"2ea086e35c3d726a3bacd0a971c1f02a50e98206\",\"lessThan\":\"c64b915bb3d9339adcae5db4be2c35ffbef5e615\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"2ea086e35c3d726a3bacd0a971c1f02a50e98206\",\"lessThan\":\"e1868ba37fd27c6a68e31565402b154beaa65df0\",\"versionType\":\"git\",\"status\":\"affected\"}]},{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"affected\",\"programFiles\":[\"fs/smb/server/transport_rdma.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"5.15\",\"status\":\"affected\"},{\"version\":\"0\",\"lessThan\":\"5.15\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.1.154\",\"lessThanOrEqual\":\"6.1.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.6.108\",\"lessThanOrEqual\":\"6.6.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.12.49\",\"lessThanOrEqual\":\"6.12.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.16.9\",\"lessThanOrEqual\":\"6.16.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.17\",\"lessThanOrEqual\":\"*\",\"versionType\":\"original_commit_for_fix\",\"status\":\"unaffected\"}]}]}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"type\":\"Secondary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H\",\"baseScore\":7.5,\"baseSeverity\":\"HIGH\",\"attackVector\":\"NETWORK\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"NONE\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"NONE\",\"integrityImpact\":\"NONE\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":3.9,\"impactScore\":3.6},{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H\",\"baseScore\":5.5,\"baseSeverity\":\"MEDIUM\",\"attackVector\":\"LOCAL\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"NONE\",\"integrityImpact\":\"NONE\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":1.8,\"impactScore\":3.6}]},\"weaknesses\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"description\":[{\"lang\":\"en\",\"value\":\"NVD-CWE-noinfo\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.15.1\",\"versionEndExcluding\":\"6.1.154\",\"matchCriteriaId\":\"EA7B2923-61F5-47B1-A3A1-2721B0938725\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.2\",\"versionEndExcluding\":\"6.6.108\",\"matchCriteriaId\":\"A7E8EAEE-7731-4996-9578-696255D61EA2\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.7\",\"versionEndExcluding\":\"6.12.49\",\"matchCriteriaId\":\"CAA033E9-A2C5-4976-A83E-9804D8FB827F\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.13\",\"versionEndExcluding\":\"6.16.9\",\"matchCriteriaId\":\"638DD910-1189-4F5E-98BF-2D436B695112\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:5.15:-:*:*:*:*:*:*\",\"matchCriteriaId\":\"40D9C0D1-0F32-4A2B-9840-1072F5497540\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:5.15:rc7:*:*:*:*:*:*\",\"matchCriteriaId\":\"948A6B8D-1B72-4945-8680-354E53BE1C80\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.17:rc1:*:*:*:*:*:*\",\"matchCriteriaId\":\"327D22EF-390B-454C-BD31-2ED23C998A1C\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.17:rc2:*:*:*:*:*:*\",\"matchCriteriaId\":\"C730CD9A-D969-4A8E-9522-162AAF7C0EE9\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.17:rc3:*:*:*:*:*:*\",\"matchCriteriaId\":\"39982C4B-716E-4B2F-8196-FA301F47807D\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.17:rc4:*:*:*:*:*:*\",\"matchCriteriaId\":\"340BEEA9-D70D-4290-B502-FBB1032353B1\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.17:rc5:*:*:*:*:*:*\",\"matchCriteriaId\":\"47E4C5C0-079F-4838-971B-8C503D48FCC2\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.17:rc6:*:*:*:*:*:*\",\"matchCriteriaId\":\"5A4516A6-C12E-42A4-8C0E-68AEF3264504\"}]}]}],\"references\":[{\"url\":\"https://git.kernel.org/stable/c/196a3a7676d726ee67621ea2bf3b7815ac2685b4\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/9644798294c7287e65a7b26e35aa6d2ce3345bcc\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/c64b915bb3d9339adcae5db4be2c35ffbef5e615\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/d3cb3f209d35c44b7ee74f77ed27ebb28995b9ce\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/e1868ba37fd27c6a68e31565402b154beaa65df0\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]}]}}",
    "redhat_vex": {
      "aggregate_severity": "None",
      "current_release_date": "2026-06-30T10:24:56+00:00",
      "cve": "CVE-2025-39942",
      "id": "CVE-2025-39942",
      "initial_release_date": "2025-10-04T00:00:00+00:00",
      "product_status:known_not_affected": "274",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: ksmbd: smbdirect: verify remaining_data_length respects max_fragmented_recv_size",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-39942.json",
      "version": "3"
    },
    "suse_vex": {
      "aggregate_severity": "moderate",
      "current_release_date": "2026-07-31T01:05:07Z",
      "cve": "CVE-2025-39942",
      "id": "CVE-2025-39942",
      "initial_release_date": "2025-10-06T23:27:04Z",
      "product_status:known_not_affected": "416",
      "source": "SUSE CSAF VEX",
      "status": "interim",
      "title": "SUSE CVE CVE-2025-39942",
      "url": "https://ftp.suse.com/pub/projects/security/csaf-vex/cve-2025-39942.json",
      "version": "7"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Loading…