Skip to contentSkip to conversation

CVE-2025-40055: ocfs2: fix double free in user_cluster_connect()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Oct 28, 2025

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

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.

The Linux kernel CVE team has assigned CVE-2025-40055 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 3.14 with commit c994c2ebdbbc391a42f177c8eb7882ebf3f142d8 and fixed in 5.15.195 with commit 827c8efa0d1afe817b90f3618afff552e88348d2
	Issue introduced in 3.14 with commit c994c2ebdbbc391a42f177c8eb7882ebf3f142d8 and fixed in 6.1.156 with commit bfe011297ddd2d0cd64752978baaa0c04cd20573
	Issue introduced in 3.14 with commit c994c2ebdbbc391a42f177c8eb7882ebf3f142d8 and fixed in 6.6.112 with commit 7e76fe9dfadbc00364d7523d5a109e9d3e4a7db2
	Issue introduced in 3.14 with commit c994c2ebdbbc391a42f177c8eb7882ebf3f142d8 and fixed in 6.12.53 with commit 694d5b401036a614f8080085a9de6f86ff0742dc
	Issue introduced in 3.14 with commit c994c2ebdbbc391a42f177c8eb7882ebf3f142d8 and fixed in 6.17.3 with commit 892f41e12c8689130d552a9eb2b77bafd26484ab
	Issue introduced in 3.14 with commit c994c2ebdbbc391a42f177c8eb7882ebf3f142d8 and fixed in 6.18-rc1 with commit 8f45f089337d924db24397f55697cda0e6960516

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2025-40055

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
fs/ocfs2/stack_user.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/827c8efa0d1afe817b90f3618afff552e88348d2
	https://git.kernel.org/stable/c/bfe011297ddd2d0cd64752978baaa0c04cd20573
	https://git.kernel.org/stable/c/7e76fe9dfadbc00364d7523d5a109e9d3e4a7db2
	https://git.kernel.org/stable/c/694d5b401036a614f8080085a9de6f86ff0742dc
	https://git.kernel.org/stable/c/892f41e12c8689130d552a9eb2b77bafd26484ab
	https://git.kernel.org/stable/c/8f45f089337d924db24397f55697cda0e6960516