GCVE Workshop - 22 September 2026 (14:00-18:00), Luxembourg Before The Vulnopticon Conference - Registration

CVE-2025-40084 (GCVE-0-2025-40084)

Vulnerability from cvelistv5 – Published: 2025-10-29 13:37 – Updated: 2026-08-05 12:07
VLAI
Title
ksmbd: transport_ipc: validate payload size before reading handle
Summary
In the Linux kernel, the following vulnerability has been resolved: ksmbd: transport_ipc: validate payload size before reading handle handle_response() dereferences the payload as a 4-byte handle without verifying that the declared payload size is at least 4 bytes. A malformed or truncated message from ksmbd.mountd can lead to a 4-byte read past the declared payload size. Validate the size before dereferencing. This is a minimal fix to guard the initial handle read.
Impacted products
Vendor Product Version CPE status
Linux Linux Affected: 0626e6641f6b467447c81dd7678a69c66f7746cf , < a02e432d5130da4c723aabe1205bac805889fdb2 (git)
Affected: 0626e6641f6b467447c81dd7678a69c66f7746cf , < 2dc125f5da134c0915a840b62565c60a595673dd (git)
Affected: 0626e6641f6b467447c81dd7678a69c66f7746cf , < 898d527ed94c19980a4d848f10057f1fed578ffb (git)
Affected: 0626e6641f6b467447c81dd7678a69c66f7746cf , < 867ffd9d67285612da3f0498ca618297f8e41f01 (git)
Affected: 0626e6641f6b467447c81dd7678a69c66f7746cf , < 6f40e50ceb99fc8ef37e5c56e2ec1d162733fef0 (git)
guessed Create a notification for this product.
Linux Linux Affected: 5.15
Unaffected: 0 , < 5.15 (semver)
Unaffected: 6.1.158 , ≤ 6.1.* (semver)
Unaffected: 6.6.115 , ≤ 6.6.* (semver)
Unaffected: 6.12.56 , ≤ 6.12.* (semver)
Unaffected: 6.17.6 , ≤ 6.17.* (semver)
Unaffected: 6.18 , ≤ * (original_commit_for_fix)
guessed Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/smb/server/transport_ipc.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "a02e432d5130da4c723aabe1205bac805889fdb2",
              "status": "affected",
              "version": "0626e6641f6b467447c81dd7678a69c66f7746cf",
              "versionType": "git"
            },
            {
              "lessThan": "2dc125f5da134c0915a840b62565c60a595673dd",
              "status": "affected",
              "version": "0626e6641f6b467447c81dd7678a69c66f7746cf",
              "versionType": "git"
            },
            {
              "lessThan": "898d527ed94c19980a4d848f10057f1fed578ffb",
              "status": "affected",
              "version": "0626e6641f6b467447c81dd7678a69c66f7746cf",
              "versionType": "git"
            },
            {
              "lessThan": "867ffd9d67285612da3f0498ca618297f8e41f01",
              "status": "affected",
              "version": "0626e6641f6b467447c81dd7678a69c66f7746cf",
              "versionType": "git"
            },
            {
              "lessThan": "6f40e50ceb99fc8ef37e5c56e2ec1d162733fef0",
              "status": "affected",
              "version": "0626e6641f6b467447c81dd7678a69c66f7746cf",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/smb/server/transport_ipc.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.158",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.115",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.56",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.17.*",
              "status": "unaffected",
              "version": "6.17.6",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.18",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.158",
                  "versionStartIncluding": "5.15",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6.115",
                  "versionStartIncluding": "5.15",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.56",
                  "versionStartIncluding": "5.15",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.17.6",
                  "versionStartIncluding": "5.15",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18",
                  "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: transport_ipc: validate payload size before reading handle\n\nhandle_response() dereferences the payload as a 4-byte handle without\nverifying that the declared payload size is at least 4 bytes. A malformed\nor truncated message from ksmbd.mountd can lead to a 4-byte read past the\ndeclared payload size. Validate the size before dereferencing.\n\nThis is a minimal fix to guard the initial handle read."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.1,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:L - The vulnerable code is reached only via a generic netlink message to the `SMBD_GENL` family (`handle_generic_event` \u2192 `handle_response`), which requires a local socket on the machine; a remote SMB client on TCP/445 cannot inject IPC responses.\nAC:L - The attacker fully controls the crafted netlink message \u2014 a zero-length `KSMBD_EVENT_RPC_RESPONSE`/`SPNEGO_AUTHEN_RESPONSE` attribute followed by a chosen nlattr header supplies both the undersized `sz` and the out-of-bounds \"handle\" value, and IDA-allocated handles are small and brute-forceable.\nPR:L - The `netlink_capable(CAP_NET_ADMIN)` gate exists only when `CONFIG_SMB_SERVER_CHECK_CAP_NET_ADMIN` is set, and builds that disable it let any unprivileged local user open a `NETLINK_GENERIC` socket and send the message; there is also no check binding the sender to the registered `ksmbd_tools_pid`.\nUI:N - The attacker sends the malformed netlink message directly; no victim action is needed beyond ksmbd already running, which is the normal state on an SMB server.\nS:U - The out-of-bounds read and the resulting fault stay within the kernel\u0027s own security authority, with no crossing of a VM, IOMMU, or sandbox boundary.\nC:H - The unchecked deref reads 4 bytes past the declared payload, and the undersized response it admits causes `ipc_validate_msg()` and the SPNEGO/RPC consumers to read fields beyond a tiny slab allocation, whose contents can be reflected back toward the SMB client.\nI:N - The `memcpy(entry-\u003eresponse, payload, sz)` is bounded by the same `sz` used for the allocation, so the bug yields no out-of-bounds write or other data-modification primitive.\nA:H - A zero-length payload makes `kvzalloc(0)` return `ZERO_SIZE_PTR`, which passes the non-NULL check and is then dereferenced in `ipc_validate_msg()`, producing a kernel oops that is repeatable at will."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T12:07:38.947Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/a02e432d5130da4c723aabe1205bac805889fdb2"
        },
        {
          "url": "https://git.kernel.org/stable/c/2dc125f5da134c0915a840b62565c60a595673dd"
        },
        {
          "url": "https://git.kernel.org/stable/c/898d527ed94c19980a4d848f10057f1fed578ffb"
        },
        {
          "url": "https://git.kernel.org/stable/c/867ffd9d67285612da3f0498ca618297f8e41f01"
        },
        {
          "url": "https://git.kernel.org/stable/c/6f40e50ceb99fc8ef37e5c56e2ec1d162733fef0"
        }
      ],
      "title": "ksmbd: transport_ipc: validate payload size before reading handle",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-40084",
    "datePublished": "2025-10-29T13:37:03.185Z",
    "dateReserved": "2025-04-16T07:20:57.161Z",
    "dateUpdated": "2026-08-05T12:07:38.947Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2025-40084",
      "date": "2026-09-19",
      "epss": "0.0014",
      "percentile": "0.03706"
    },
    "nvd": {
      "cve": {
        "affected": [
          {
            "affectedData": [
              {
                "defaultStatus": "unaffected",
                "product": "Linux",
                "programFiles": [
                  "fs/smb/server/transport_ipc.c"
                ],
                "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                "vendor": "Linux",
                "versions": [
                  {
                    "lessThan": "a02e432d5130da4c723aabe1205bac805889fdb2",
                    "status": "affected",
                    "version": "0626e6641f6b467447c81dd7678a69c66f7746cf",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "2dc125f5da134c0915a840b62565c60a595673dd",
                    "status": "affected",
                    "version": "0626e6641f6b467447c81dd7678a69c66f7746cf",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "898d527ed94c19980a4d848f10057f1fed578ffb",
                    "status": "affected",
                    "version": "0626e6641f6b467447c81dd7678a69c66f7746cf",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "867ffd9d67285612da3f0498ca618297f8e41f01",
                    "status": "affected",
                    "version": "0626e6641f6b467447c81dd7678a69c66f7746cf",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "6f40e50ceb99fc8ef37e5c56e2ec1d162733fef0",
                    "status": "affected",
                    "version": "0626e6641f6b467447c81dd7678a69c66f7746cf",
                    "versionType": "git"
                  }
                ]
              },
              {
                "defaultStatus": "affected",
                "product": "Linux",
                "programFiles": [
                  "fs/smb/server/transport_ipc.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.158",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "6.6.*",
                    "status": "unaffected",
                    "version": "6.6.115",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "6.12.*",
                    "status": "unaffected",
                    "version": "6.12.56",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "6.17.*",
                    "status": "unaffected",
                    "version": "6.17.6",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "*",
                    "status": "unaffected",
                    "version": "6.18",
                    "versionType": "original_commit_for_fix"
                  }
                ]
              }
            ],
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
          }
        ],
        "cveTags": [],
        "descriptions": [
          {
            "lang": "en",
            "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: transport_ipc: validate payload size before reading handle\n\nhandle_response() dereferences the payload as a 4-byte handle without\nverifying that the declared payload size is at least 4 bytes. A malformed\nor truncated message from ksmbd.mountd can lead to a 4-byte read past the\ndeclared payload size. Validate the size before dereferencing.\n\nThis is a minimal fix to guard the initial handle read."
          }
        ],
        "id": "CVE-2025-40084",
        "lastModified": "2026-07-30T06:24:10.403",
        "metrics": {
          "cvssMetricV31": [
            {
              "cvssData": {
                "attackComplexity": "LOW",
                "attackVector": "LOCAL",
                "availabilityImpact": "HIGH",
                "baseScore": 7.1,
                "baseSeverity": "HIGH",
                "confidentialityImpact": "HIGH",
                "integrityImpact": "NONE",
                "privilegesRequired": "LOW",
                "scope": "UNCHANGED",
                "userInteraction": "NONE",
                "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H",
                "version": "3.1"
              },
              "exploitabilityScore": 1.8,
              "impactScore": 5.2,
              "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
              "type": "Secondary"
            }
          ]
        },
        "published": "2025-10-29T14:15:55.007",
        "references": [
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/2dc125f5da134c0915a840b62565c60a595673dd"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/6f40e50ceb99fc8ef37e5c56e2ec1d162733fef0"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/867ffd9d67285612da3f0498ca618297f8e41f01"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/898d527ed94c19980a4d848f10057f1fed578ffb"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/a02e432d5130da4c723aabe1205bac805889fdb2"
          }
        ],
        "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "vulnStatus": "Deferred"
      }
    },
    "redhat_vex": {
      "aggregate_severity": "None",
      "current_release_date": "2026-06-30T10:34:15+00:00",
      "cve": "CVE-2025-40084",
      "id": "CVE-2025-40084",
      "initial_release_date": "2025-10-29T00:00:00+00:00",
      "product_status:known_not_affected": "274",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: ksmbd: transport_ipc: validate payload size before reading handle",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-40084.json",
      "version": "3"
    },
    "suse_vex": {
      "aggregate_severity": "moderate",
      "current_release_date": "2026-08-30T01:49:20Z",
      "cve": "CVE-2025-40084",
      "id": "CVE-2025-40084",
      "initial_release_date": "2025-10-30T00:24:24Z",
      "product_status:known_not_affected": "514",
      "product_status:recommended": "6",
      "source": "SUSE CSAF VEX",
      "status": "interim",
      "title": "SUSE CVE CVE-2025-40084",
      "url": "https://ftp.suse.com/pub/projects/security/csaf-vex/cve-2025-40084.json",
      "version": "8"
    }
  }
}



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…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…