Skip to contentSkip to conversation

CVE-2025-71230: hfs: ensure sb->s_fs_info is always cleaned up

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Feb 18

lore
Share & tools
lore
#0 lore raw

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

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

hfs: ensure sb->s_fs_info is always cleaned up

When hfs was converted to the new mount api a bug was introduced by changing the allocation pattern of sb->s_fs_info. If setup_bdev_super() fails after a new superblock has been allocated by sget_fc(), but before hfs_fill_super() takes ownership of the filesystem-specific s_fs_info data it was leaked.

Fix this by freeing sb->s_fs_info in hfs_kill_super().

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

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

	Fixed in 6.18.11 with commit 46c1d56ad321fb024761abd9af61a0cb616cf2f6
	Fixed in 6.19.1 with commit 399219831514126bc9541e8eadefe02c6fbd9166

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-71230

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/hfs/mdb.c
fs/hfs/super.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/46c1d56ad321fb024761abd9af61a0cb616cf2f6
	https://git.kernel.org/stable/c/399219831514126bc9541e8eadefe02c6fbd9166
	https://git.kernel.org/stable/c/05ce49a902be15dc93854cbfc20161205a9ee446