CVE-2025-40285: Linux kernel · smb/server: fix possible refcount leak in smb2_sess_setup()
Source GCVE Database
Not known to be exploited · CVSS 7.5 High.
Data as of 26 Oct 2026, 14:05 UTC
- EPSS
- 0.4% chance of exploitation in 30 days – higher than 35% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HExploitation evidence
Disclosed: evidence found.
CVE published 7 Dec 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
AI-suggested
A fix for this vulnerability has been implemented in the Linux kernel by adding the missing ksmbd_user_session_put() call. Users should apply the official Linux kernel updates that include this fix. Patch status is not explicitly confirmed in the provided data; therefore, check the vendor advisory for current remediation guidance.
Description
A high-severity vulnerability in the Linux kernel's SMB server component (smb2_sess_setup) caused a reference count leak of ksmbd_session when a session needed to reconnect. This issue was fixed by adding the missing ksmbd_user_session_put() call to properly release the reference count.
References
- nvd.nist.gov/vuln/detail/CVE-2025-40285 (opens in a new tab)
- git.kernel.org/stable/c/379510a815cb2e64eb0a379cb62295d6ade65df0 (opens in a new tab)
- git.kernel.org/stable/c/6fc935f798d44a8eb8a5e6659198399fbf57b981 (opens in a new tab)
- git.kernel.org/stable/c/d37b2c81c83d6c0d5ca582f4fe73c672983f9e0d (opens in a new tab)
- git.kernel.org/stable/c/dcc51dfe6ff26b52cac106865a172ac982d78401 (opens in a new tab)
- git.kernel.org/stable/c/e671f9bb97805771380c98de944e2ceab6949188 (opens in a new tab)