CVE-2025-38325 (GCVE-0-2025-38325)
Vulnerability from cvelistv5
Published
2025-07-10 08:14
Modified
2026-08-05 12:01
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: ksmbd: add free_transport ops in ksmbd connection free_transport function for tcp connection can be called from smbdirect. It will cause kernel oops. This patch add free_transport ops in ksmbd connection, and add each free_transports for tcp and smbdirect.
Impacted products
Vendor Product Version
Linux Linux Version: 1da8bd9a10ecd718692732294d15fd801c0eabb5
Version: 1aec4d14cf81b7b3e7b69eb1cfa94144eed7138e
Version: 21a4e47578d44c6b37c4fc4aba8ed7cc8dbb13de
Version: 21a4e47578d44c6b37c4fc4aba8ed7cc8dbb13de
Version: e59796fc80603bcd8569d4d2e10b213c1918edb4
Version: 6.12.26   
Version: 6.14.4   
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/smb/server/connection.c",
            "fs/smb/server/connection.h",
            "fs/smb/server/transport_rdma.c",
            "fs/smb/server/transport_tcp.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "52f5a52dc17a4a7b4363ac03fe2c4ef26f020dc6",
              "status": "affected",
              "version": "1da8bd9a10ecd718692732294d15fd801c0eabb5",
              "versionType": "git"
            },
            {
              "lessThan": "3890da762a66191c440b0bd6e3ee45501edbb0c1",
              "status": "affected",
              "version": "1aec4d14cf81b7b3e7b69eb1cfa94144eed7138e",
              "versionType": "git"
            },
            {
              "lessThan": "3f3aae77280aad9f5acc6709c596148966f765c7",
              "status": "affected",
              "version": "21a4e47578d44c6b37c4fc4aba8ed7cc8dbb13de",
              "versionType": "git"
            },
            {
              "lessThan": "a89f5fae998bdc4d0505306f93844c9ae059d50c",
              "status": "affected",
              "version": "21a4e47578d44c6b37c4fc4aba8ed7cc8dbb13de",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "e59796fc80603bcd8569d4d2e10b213c1918edb4",
              "versionType": "git"
            },
            {
              "lessThan": "6.12.35",
              "status": "affected",
              "version": "6.12.26",
              "versionType": "semver"
            },
            {
              "lessThan": "6.15",
              "status": "affected",
              "version": "6.14.4",
              "versionType": "semver"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/smb/server/connection.c",
            "fs/smb/server/connection.h",
            "fs/smb/server/transport_rdma.c",
            "fs/smb/server/transport_tcp.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.15"
            },
            {
              "lessThan": "6.15",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.35",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.15.*",
              "status": "unaffected",
              "version": "6.15.4",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.16",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.35",
                  "versionStartIncluding": "6.12.26",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.15.4",
                  "versionStartIncluding": "6.15",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.16",
                  "versionStartIncluding": "6.15",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionStartIncluding": "6.14.4",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: add free_transport ops in ksmbd connection\n\nfree_transport function for tcp connection can be called from smbdirect.\nIt will cause kernel oops. This patch add free_transport ops in ksmbd\nconnection, and add each free_transports for tcp and smbdirect."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 9.8,
            "baseSeverity": "CRITICAL",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:N - The vulnerable teardown path belongs to ksmbd\u0027s in-kernel SMB Direct transport, whose RDMA CM listener accepts connections from remote peers on port 445 (InfiniBand) / 5445 (iWARP), and is reachable over routable IP via iWARP/RoCEv2 or software providers (siw/rxe). No local access is needed \u2014 a remote peer triggers it by establishing and dropping an SMB Direct connection.\nAC:L - The type confusion is deterministic \u2014 every SMB Direct connection teardown funnels through ksmbd_conn_free() \u2192 ksmbd_free_transport() and fabricates a socket pointer from the status/full_packet_received bytes, with no race or memory-layout precondition. The premature-free variant simply requires holding an oplock/lease at disconnect time, which the attacker fully controls.\nPR:N - Connection setup and teardown happen entirely before SMB2 SESSION_SETUP: the error path in smb_direct_handle_connect_request() and the normal ksmbd_conn_handler_loop() exit both call free_transport() with no credentials verified. An unauthenticated peer that connects and disconnects triggers the confused free.\nUI:N - The attacker drives the entire sequence by opening and closing an SMB Direct connection; no action by any local user or administrator is required beyond ksmbd already serving SMB Direct.\nS:U - The corruption is confined to kernel memory managed by the ksmbd server within the same security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - The type confusion plus the unconditional kfree(t) in the RDMA free_transport() leave conn-\u003etransport dangling and double-free the slab object, giving a use-after-free on a large kmalloc allocation that an attacker can reclaim and read back through ksmbd_conn_write()/rdma_read paths, which is leverageable for arbitrary kernel memory disclosure.\nI:H - This is a genuine type confusion combined with a double free and a use-after-free whose reuse ends in an indirect call through freed memory (conn-\u003etransport-\u003eops-\u003ewritev in __smb2_lease_break_noti()), a direct control-flow hijack primitive once the freed object is groomed.\nA:H - Every SMB Direct teardown calls sock_release() on a fabricated pointer built from the status enum, producing a guaranteed kernel oops that kills the ksmbd kthread and leaks its RDMA resources, and panics outright on panic_on_oops configurations common in appliances and embedded deployments."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T12:01:09.621Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/52f5a52dc17a4a7b4363ac03fe2c4ef26f020dc6"
        },
        {
          "url": "https://git.kernel.org/stable/c/3890da762a66191c440b0bd6e3ee45501edbb0c1"
        },
        {
          "url": "https://git.kernel.org/stable/c/3f3aae77280aad9f5acc6709c596148966f765c7"
        },
        {
          "url": "https://git.kernel.org/stable/c/a89f5fae998bdc4d0505306f93844c9ae059d50c"
        }
      ],
      "title": "ksmbd: add free_transport ops in ksmbd connection",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-38325",
    "datePublished": "2025-07-10T08:14:59.544Z",
    "dateReserved": "2025-04-16T04:51:24.004Z",
    "dateUpdated": "2026-08-05T12:01:09.621Z",
    "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…