What’s Vulnerable › Vulnerabilities
CVE-2025-40285: smb/server: fix possible refcount leak in smb2_sess_setup()
- Severity: high (CVSS 7.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.4% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2025-12-06 · updated 2026-10-15
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().
Affected products
- Linux kernel: 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 — fixed in 5.16, 6.1.159, 6.12.59, 6.18, 6.6.117
How to fix
Upgrade to a fixed version: Linux kernel 5.16, 6.1.159, 6.12.59, 6.18. Check the vendor advisory for mitigations.
References
- https://git.kernel.org/stable/c/379510a815cb2e64eb0a379cb62295d6ade65df0
- https://git.kernel.org/stable/c/6fc935f798d44a8eb8a5e6659198399fbf57b981
- https://git.kernel.org/stable/c/d37b2c81c83d6c0d5ca582f4fe73c672983f9e0d
- https://git.kernel.org/stable/c/dcc51dfe6ff26b52cac106865a172ac982d78401
- https://git.kernel.org/stable/c/e671f9bb97805771380c98de944e2ceab6949188
Get alerted when CVE-2025-40285 or the next vulnerability affects your stack