linux/fs/hfsplus
Mehdi Ben Hadj Khelifa 0bcfebb83b hfsplus: ensure sb->s_fs_info is always cleaned up
[ Upstream commit 126fb0ce99 ]

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().

Cc: stable@vger.kernel.org
Fixes: 432f7c78cb ("hfsplus: convert hfsplus to use the new mount api")
Reported-by: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
Tested-by: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Mehdi Ben Hadj Khelifa <mehdi.benhadjkhelifa@gmail.com>
Reviewed-by: Viacheslav Dubeyko <slava@dubeyko.com>
Signed-off-by: Viacheslav Dubeyko <slava@dubeyko.com>
Link: https://lore.kernel.org/r/20251201222843.82310-3-mehdi.benhadjkhelifa@gmail.com
Signed-off-by: Viacheslav Dubeyko <slava@dubeyko.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2026-03-04 07:20:53 -05:00
..
attributes.c hfs/hfsplus: rework debug output subsystem 2025-09-24 16:30:34 -07:00
bfind.c hfs/hfsplus: rework debug output subsystem 2025-09-24 16:30:34 -07:00
bitmap.c hfs/hfsplus: rework debug output subsystem 2025-09-24 16:30:34 -07:00
bnode.c hfsplus: return error when node already exists in hfs_bnode_create 2026-02-26 14:58:56 -08:00
brec.c hfs/hfsplus: rework debug output subsystem 2025-09-24 16:30:34 -07:00
btree.c hfs/hfsplus: rework debug output subsystem 2025-09-24 16:30:34 -07:00
catalog.c hfs/hfsplus: rework debug output subsystem 2025-09-24 16:30:34 -07:00
dir.c hfsplus: fix volume corruption issue for generic/480 2026-03-04 07:19:28 -05:00
extents.c hfs/hfsplus: rework debug output subsystem 2025-09-24 16:30:34 -07:00
hfsplus_fs.h hfsplus: fix volume corruption issue for generic/101 2026-01-02 12:56:41 +01:00
hfsplus_raw.h hfsplus: use struct_group_attr() for memcpy() region 2022-01-20 08:52:54 +02:00
inode.c hfsplus: fix volume corruption issue for generic/498 2026-03-04 07:19:28 -05:00
ioctl.c vfs: rename parent_ino to d_parent_ino and make it use RCU 2024-06-27 18:34:21 +02:00
Kconfig fs: add CONFIG_BUFFER_HEAD 2023-08-02 09:13:09 -06:00
Makefile hfsplus: drop ACL support 2018-08-22 10:52:50 -07:00
options.c hfsplus: convert hfsplus to use the new mount api 2024-10-08 14:41:50 +02:00
part_tbl.c fs/hfsplus: Use the enum req_op and blk_opf_t types 2022-07-14 12:14:32 -06:00
super.c hfsplus: ensure sb->s_fs_info is always cleaned up 2026-03-04 07:20:53 -05:00
tables.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
unicode.c hfsplus: fix slab-out-of-bounds read in hfsplus_strcasecmp() 2025-09-22 15:11:33 -07:00
wrapper.c hfsplus: use bdev_rw_virt in hfsplus_submit_bio 2025-05-07 07:31:08 -06:00
xattr.c hfs/hfsplus: rework debug output subsystem 2025-09-24 16:30:34 -07:00
xattr.h hfsplus: move hfsplus_xattr_handlers to .rodata 2023-10-09 16:24:19 +02:00
xattr_security.c fs: port xattr to mnt_idmap 2023-01-19 09:24:28 +01:00
xattr_trusted.c fs: port xattr to mnt_idmap 2023-01-19 09:24:28 +01:00
xattr_user.c fs: port xattr to mnt_idmap 2023-01-19 09:24:28 +01:00