# smb/server: fix possible refcount leak in smb2_sess_setup()

CVE record · `CVE-2025-40285`

- **Identifiers:** `CVE-2025-40285`
- **State:** Confirmed
- **Severity:** CVSS 7.5 High
- **Critical:** No
- **CNA:** Linux
- **Technologies:** [Linux kernel](https://agentprime.io/advisories/technology/linux-kernel.md)
- **Published:** 6 Dec 2025
- **Updated:** 5 Aug 2026
- **Reviewed by a person:** No

Published by the CVE Program (CNA: Linux) at 6 Dec 2025, 21:51 UTC. agentprime has not analysed this yet, so whether it affects any app is not known. This CVE names a vendor and product rather than a package, so the lockfile check doesn’t match it.

## Affected products, as the CNA wrote them

- Vendor: Linux. Product: Linux.
  - affected: `37a0e2b362b3150317fb6e2139de67b1e29ae5ff to before 6fc935f798d44a8eb8a5e6659198399fbf57b981` (git)
  - affected: `450a844c045ff0895d41b05a1cbe8febd1acfcfd to before e671f9bb97805771380c98de944e2ceab6949188` (git)
  - affected: `a39e31e22a535d47b14656a7d6a893c7f6cf758c to before dcc51dfe6ff26b52cac106865a172ac982d78401` (git)
  - affected: `b95629435b84b9ecc0c765995204a4d8a913ed52 to before d37b2c81c83d6c0d5ca582f4fe73c672983f9e0d` (git)
  - affected: `b95629435b84b9ecc0c765995204a4d8a913ed52 to before 379510a815cb2e64eb0a379cb62295d6ade65df0` (git)
  - affected: `2107ab40629aeabbec369cf34b8cf0f288c3eb1b` (git)
  - affected: `6.1.121 to before 6.1.159` (semver)
  - affected: `6.6.67 to before 6.6.117` (semver)
  - affected: `6.12.6 to before 6.12.59` (semver)
  - affected: `5.15.176 to before 5.16` (semver)
  - Other versions: unaffected
- Vendor: Linux. Product: Linux.
  - affected: `6.13`
  - unaffected: `before 6.13` (semver)
  - unaffected: `6.1.159 to 6.1.*, inclusive` (semver)
  - unaffected: `6.6.117 to 6.6.*, inclusive` (semver)
  - unaffected: `6.12.59 to 6.12.*, inclusive` (semver)
  - unaffected: `6.17.9 to 6.17.*, inclusive` (semver)
  - unaffected: `6.18 to *, inclusive` (original_commit_for_fix)
  - Other versions: affected

## Not analysed yet

We haven’t published our own analysis of this CVE. If a person reviews it, this page will say what’s affected and what has to be true for it to matter.

## Severity and exploitation

- 7.5 High, CVSS 3.1: `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`, from CNA (Linux)

- **CISA KEV:** Not listed.
- **EPSS:** 0.0044, the 39th percentile, on 19 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

This record came from the full history of the CVE Program, published 6 Dec 2025. New records show when each source confirmed them.

## Sources

- [CVE List: CVE-2025-40285](https://www.cve.org/CVERecord?id=CVE-2025-40285)
- [NVD: CVE-2025-40285](https://nvd.nist.gov/vuln/detail/CVE-2025-40285)

### References from the CNA

- <https://git.kernel.org/stable/c/6fc935f798d44a8eb8a5e6659198399fbf57b981>
- <https://git.kernel.org/stable/c/e671f9bb97805771380c98de944e2ceab6949188>
- <https://git.kernel.org/stable/c/dcc51dfe6ff26b52cac106865a172ac982d78401>
- <https://git.kernel.org/stable/c/d37b2c81c83d6c0d5ca582f4fe73c672983f9e0d>
- <https://git.kernel.org/stable/c/379510a815cb2e64eb0a379cb62295d6ade65df0>

Facts on this page come from the CVE List as the CNA published them, with CVSS from the sources named above, CISA KEV and FIRST EPSS. Vendors, products and versions are shown as the CNA wrote them. We don’t reproduce the CVE’s description.

## Check whether this affects you

This CVE names a vendor and product rather than a package, so the lockfile check doesn’t match it. Compare the affected versions above with what you run.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), `get_advisory` returns this record and `search_advisories` finds related ones. Setup: <https://agentprime.io/mcp.md>
- As JSON: <https://api.agentprime.io/v1/advisories/CVE-2025-40285>
- Everything that needs attention now: <https://agentprime.io/advisories/critical.md>

---

The web page: <https://agentprime.io/advisories/CVE-2025-40285/>. Everything for agents: <https://agentprime.io/llms.txt>.
