CVE-2025-40285
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().
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A reference count leak in the Linux kernel's SMB server session setup could lead to resource exhaustion when sessions need reconnection, fixed by adding a missing put call.
Vulnerability
Description
A reference count leak has been found in the SMB server implementation within the Linux kernel. The issue occurs in the smb2_sess_setup() function, where the reference count of a ksmbd_session object is not properly decremented when a session needs to reconnect. This missing ksmbd_user_session_put() call means the session's reference count remains elevated even after it should have been released [1][2][3].
Exploitation and
Impact
The vulnerability can be triggered through normal SMB session reconnection operations, requiring only the ability to initiate SMB connections to a vulnerable kernel's SMB server. An attacker who can cause repeated session reconnections could gradually exhaust the reference count resources, potentially leading to a denial-of-service condition. No special privileges are needed beyond basic network access to the SMB server port.
Mitigation
The fix has been applied to the Linux kernel stable branches, as seen in the upstream commit references [1][2][3]. System administrators should update their kernels to include the patch that adds the missing ksmbd_user_session_put() call to properly balance the reference count during session setup failure or reconnection paths.
AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
2Patches
56fc935f798d4e671f9bb9780dcc51dfe6ff2d37b2c81c83d379510a815cbVulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
5- git.kernel.org/stable/c/379510a815cb2e64eb0a379cb62295d6ade65df0nvd
- git.kernel.org/stable/c/6fc935f798d44a8eb8a5e6659198399fbf57b981nvd
- git.kernel.org/stable/c/d37b2c81c83d6c0d5ca582f4fe73c672983f9e0dnvd
- git.kernel.org/stable/c/dcc51dfe6ff26b52cac106865a172ac982d78401nvd
- git.kernel.org/stable/c/e671f9bb97805771380c98de944e2ceab6949188nvd
News mentions
0No linked articles in our index yet.