# CVE-2025-40285: smb/server: fix possible refcount leak in smb2_sess_setup()

- Severity: High 7.5 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.44%, higher than 40% of CVEs (2026-12-01)
- Published: 2025-12-06T21:51:09.590Z
- Modified: 2026-10-15T19:10:00.173Z
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

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

Reference count of ksmbd_session will leak when session need reconnect.
Fix this by adding the missing ksmbd_user_session_put().

(As written by CVE List.)

## Affected

- Linux Linux: from 37a0e2b362b3150317fb6e2139de67b1e29ae5ff before 6fc935f798d44a8eb8a5e6659198399fbf57b981; from 450a844c045ff0895d41b05a1cbe8febd1acfcfd before e671f9bb97805771380c98de944e2ceab6949188; from a39e31e22a535d47b14656a7d6a893c7f6cf758c before dcc51dfe6ff26b52cac106865a172ac982d78401; from b95629435b84b9ecc0c765995204a4d8a913ed52 before d37b2c81c83d6c0d5ca582f4fe73c672983f9e0d; from b95629435b84b9ecc0c765995204a4d8a913ed52 before 379510a815cb2e64eb0a379cb62295d6ade65df0; 2107ab40629aeabbec369cf34b8cf0f288c3eb1b; from 6.1.121 before 6.1.159; from 6.6.67 before 6.6.117; from 6.12.6 before 6.12.59; from 5.15.176 before 5.16; 6.13 (not affected: before 6.13; from 6.1.159 up to 6.1.*; from 6.6.117 up to 6.6.*; from 6.12.59 up to 6.12.*; from 6.17.9 up to 6.17.*; from 6.18 up to *)

## References

- <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>

## Sources

- CVE List: [CVE-2025-40285](https://www.cve.org/CVERecord?id=CVE-2025-40285), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2025-40285](https://nvd.nist.gov/vuln/detail/CVE-2025-40285), Public domain, modified 2026-10-15

---

Page: https://cve.day/CVE-2025-40285 · Whole record: https://cve.day/CVE-2025-40285.json · Rebuilt by cve.day 2026-11-25T22:59:08.380Z
