VYPR
Unrated severityNVD Advisory· Published Dec 6, 2025· Updated Apr 15, 2026

CVE-2025-40285

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

2
  • Linux/Kernelinferred2 versions
    (expand)+ 1 more
    • (no CPE)
    • (no CPE)

Patches

5

Vulnerability mechanics

Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

5

News mentions

0

No linked articles in our index yet.