CVE-2025-71271: hfsplus: ensure sb->s_fs_info is always cleaned up
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
hfsplus: ensure sb->s_fs_info is always cleaned up
When hfsplus 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 hfsplus_fill_super() takes ownership of the filesystem-specific s_fs_info data it was leaked.
Fix this by freeing sb->s_fs_info in hfsplus_kill_super().
The Linux kernel CVE team has assigned CVE-2025-71271 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.13 with commit 432f7c78cb000a3151fa0d39585b000312f50d7e and fixed in 6.18.16 with commit 0bcfebb83b5460d5be4e5c9dfb19cdaf3d4cb1db Issue introduced in 6.13 with commit 432f7c78cb000a3151fa0d39585b000312f50d7e and fixed in 6.19.6 with commit 1e38d32bb04d85a2c81204a85a34878a497128c8 Issue introduced in 6.13 with commit 432f7c78cb000a3151fa0d39585b000312f50d7e and fixed in 7.0 with commit 126fb0ce99431126b44a6c360192668c818f641f
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-71271
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/hfsplus/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/0bcfebb83b5460d5be4e5c9dfb19cdaf3d4cb1db https://git.kernel.org/stable/c/1e38d32bb04d85a2c81204a85a34878a497128c8 https://git.kernel.org/stable/c/126fb0ce99431126b44a6c360192668c818f641f