CVE-2025-40286
Description
In the Linux kernel, the following vulnerability has been resolved:
smb/server: fix possible memory leak in smb2_read()
Memory leak occurs when ksmbd_vfs_read() fails. Fix this by adding the missing kvfree().
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Memory leak in Linux kernel's smb/server (ksmbd) smb2_read() can lead to resource exhaustion.
Vulnerability
In the Linux kernel's SMB server (ksmbd), the smb2_read() function allocates memory that is not freed when ksmbd_vfs_read() fails, leading to a memory leak [1]. The missing kvfree() call causes the allocated buffer to persist, gradually exhausting kernel memory over repeated failed SMB read operations.
Exploitation
An attacker with network access to the SMB server can trigger the leak by sending malformed SMB2 read requests that cause ksmbd_vfs_read() to return an error. No authentication is required if the server allows anonymous access; otherwise, valid credentials are needed. The attack is low-complexity and can be performed remotely.
Impact
Successful exploitation results in a denial of service (DoS) due to kernel memory exhaustion. The system may become unresponsive, crash, or require a reboot to recover. There is no evidence of information disclosure or privilege escalation from this bug.
Mitigation
The fix adds the missing kvfree() call and has been backported to multiple stable kernel branches [1][2][3][4]. Administrators should update their kernels to include the corresponding commit. No workaround is available besides applying the patch or restricting SMB access.
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
50797c6cf3b8563d8706a2c09f13055877318bfda5422a1666fced056d2ccVulnerability 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/0797c6cf3b857cc229ab2bc69552938dcd738d78nvd
- git.kernel.org/stable/c/63d8706a2c09a0c29b8b0e8a44bc7a1339685de9nvd
- git.kernel.org/stable/c/6fced056d2cc8d01b326e6fcfabaacb9850b71a4nvd
- git.kernel.org/stable/c/bfda5422a16651d0bf864ec468b1c216e1b10d91nvd
- git.kernel.org/stable/c/f1305587731886da37a214cda812ade246c653b0nvd
News mentions
0No linked articles in our index yet.