CVE-2025-40055
Description
In the Linux kernel, the following vulnerability has been resolved:
ocfs2: fix double free in user_cluster_connect()
user_cluster_disconnect() frees "conn->cc_private" which is "lc" but then the error handling frees "lc" a second time. Set "lc" to NULL on this path to avoid a double free.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A double free vulnerability in the Linux kernel's ocfs2 filesystem can occur in user_cluster_connect() when error handling frees memory already freed by user_cluster_disconnect().
In the Linux kernel's OCFS2 filesystem, a double-free vulnerability exists in the user_cluster_connect() function. The function calls user_cluster_disconnect() on error, which frees the 'lc' structure stored in conn->cc_private. However, the subsequent error handling code also frees 'lc' again, leading to a double free [1].
Exploitation requires triggering an error path in user_cluster_connect(). An attacker must be able to cause a failure during cluster connection setup, possibly by manipulating network conditions or resource limits. No special privileges are needed if the function can be invoked from userspace, but the exact prerequisites depend on the OCFS2 cluster configuration.
A double free can result in memory corruption, potentially leading to system crashes or privilege escalation. The kernel memory allocator may treat the freed memory as usable, leading to use-after-free scenarios that could be exploited for arbitrary code execution.
The fix sets the local variable 'lc' to NULL after the call to user_cluster_disconnect() to prevent the second free. Patches have been applied to multiple stable kernel branches [2][3]. Users should update to the latest patched kernel version. No workarounds are known.
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
1Patches
8283333079d96f992bc72f681827c8efa0d1abfe011297ddd7e76fe9dfadb694d5b401036892f41e12c868f45f089337dVulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
8- git.kernel.org/stable/c/283333079d96c84baa91f0c62b5e0cbec246b7a2nvd
- git.kernel.org/stable/c/694d5b401036a614f8080085a9de6f86ff0742dcnvd
- git.kernel.org/stable/c/7e76fe9dfadbc00364d7523d5a109e9d3e4a7db2nvd
- git.kernel.org/stable/c/827c8efa0d1afe817b90f3618afff552e88348d2nvd
- git.kernel.org/stable/c/892f41e12c8689130d552a9eb2b77bafd26484abnvd
- git.kernel.org/stable/c/8f45f089337d924db24397f55697cda0e6960516nvd
- git.kernel.org/stable/c/bfe011297ddd2d0cd64752978baaa0c04cd20573nvd
- git.kernel.org/stable/c/f992bc72f681c32a682d474a29c2135a64d4f4e5nvd
News mentions
0No linked articles in our index yet.