VYPR
Unrated severityNVD Advisory· Published Oct 28, 2025· Updated Apr 15, 2026

CVE-2025-40055

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

1

Patches

8

Vulnerability mechanics

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

References

8

News mentions

0

No linked articles in our index yet.