linux/fs/hfsplus
Linus Torvalds 4d9981429a hfs/hfsplus updates for v7.1
- hfsplus: fix generic/642 failure
 - hfsplus: rework logic of map nodes creation in xattr b-tree
 - hfsplus: fix logic of alloc/free b-tree node
 - hfsplus: fix error processing issue in hfs_bmap_free()
 - hfsplus: fix potential race conditions in b-tree functionality
 - hfsplus: extract hidden directory search into a helper function
 - hfsplus: fix held lock freed on hfsplus_fill_super()
 - hfsplus: fix generic/523 test-case failure
 - hfsplus: validate b-tree node 0 bitmap at mount time
 - hfsplus: refactor b-tree map page access and add node-type validation
 - hfsplus: fix to update ctime after rename
 - hfsplus: fix generic/533 test-case failure
 - hfsplus: set ctime after setxattr and removexattr
 - hfsplus: fix uninit-value by validating catalog record size
 - hfsplus: fix potential Allocation File corruption after fsync
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQT4wVoLCG92poNnMFAhI4xTh21NnQUCadlj7wAKCRAhI4xTh21N
 nRzsAQDhjGNvUe9QJUDk7D/GjMxWUs+8jrGw9Ruu8GhvRIePzwEAtkZoJRwNQzwa
 9XEyenrKqxLTaqaPtRChicbmdKw7eQQ=
 =TUrR
 -----END PGP SIGNATURE-----

Merge tag 'hfs-v7.1-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/vdubeyko/hfs

Pull hfsplus updates from Viacheslav Dubeyko:
 "This contains several fixes of syzbot reported issues and HFS+ fixes
  of xfstests failures.

   - Fix a syzbot reported issue of a KMSAN uninit-value in
     hfsplus_strcasecmp().

     The root cause was that hfs_brec_read() doesn't validate that the
     on-disk record size matches the expected size for the record type
     being read. The fix introduced hfsplus_brec_read_cat() wrapper that
     validates the record size based on the type field and returns -EIO
     if size doesn't match (Deepanshu Kartikey)

   - Fix a syzbot reported issue of processing corrupted HFS+ images
     where the b-tree allocation bitmap indicates that the header node
     (Node 0) is free. Node 0 must always be allocated. Violating this
     invariant leads to allocator corruption, which cascades into kernel
     panics or undefined behavior.

     Prevent trusting a corrupted allocator state by adding a validation
     check during hfs_btree_open(). If corruption is detected, print a
     warning identifying the specific corrupted tree and force the
     filesystem to mount read-only (SB_RDONLY).

     This prevents kernel panics from corrupted images while enabling
     data recovery (Shardul Bankar)

   - Fix a potential deadlock in hfsplus_fill_super().

     hfsplus_fill_super() calls hfs_find_init() to initialize a search
     structure, which acquires tree->tree_lock. If the subsequent call
     to hfsplus_cat_build_key() fails, the function jumps to the
     out_put_root error label without releasing the lock.

     Fix this by adding the missing hfs_find_exit(&fd) call before
     jumping to the out_put_root error label. This ensures that
     tree->tree_lock is properly released on the error path (Zilin Guan)

   - Update a files ctime after rename in hfsplus_rename() (Yangtao Li)

  The rest of the patches introduce the HFS+ fixes for the case of
  generic/348, generic/728, generic/533, generic/523, and generic/642
  test-cases of xfstests suite"

* tag 'hfs-v7.1-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/vdubeyko/hfs:
  hfsplus: fix generic/642 failure
  hfsplus: rework logic of map nodes creation in xattr b-tree
  hfsplus: fix logic of alloc/free b-tree node
  hfsplus: fix error processing issue in hfs_bmap_free()
  hfsplus: fix potential race conditions in b-tree functionality
  hfsplus: extract hidden directory search into a helper function
  hfsplus: fix held lock freed on hfsplus_fill_super()
  hfsplus: fix generic/523 test-case failure
  hfsplus: validate b-tree node 0 bitmap at mount time
  hfsplus: refactor b-tree map page access and add node-type validation
  hfsplus: fix to update ctime after rename
  hfsplus: fix generic/533 test-case failure
  hfsplus: set ctime after setxattr and removexattr
  hfsplus: fix uninit-value by validating catalog record size
  hfsplus: fix potential Allocation File corruption after fsync
2026-04-13 16:50:38 -07:00
..
.kunitconfig hfsplus: introduce KUnit tests for HFS+ string operations 2025-11-24 16:12:51 -08:00
attributes.c hfs/hfsplus updates for v7.1 2026-04-13 16:50:38 -07:00
bfind.c hfsplus: fix uninit-value by validating catalog record size 2026-03-09 10:16:09 -07:00
bitmap.c hfs/hfsplus: rework debug output subsystem 2025-09-24 16:30:34 -07:00
bnode.c hfsplus: fix potential race conditions in b-tree functionality 2026-04-08 14:23:28 -07:00
brec.c hfsplus: fix generic/642 failure 2026-04-08 14:23:29 -07:00
btree.c hfsplus: fix logic of alloc/free b-tree node 2026-04-08 14:23:29 -07:00
catalog.c hfs/hfsplus updates for v7.1 2026-04-13 16:50:38 -07:00
dir.c hfs/hfsplus updates for v7.1 2026-04-13 16:50:38 -07:00
extents.c hfs/hfsplus updates for v7.1 2026-04-13 16:50:38 -07:00
hfsplus_fs.h hfsplus: fix generic/523 test-case failure 2026-03-25 12:38:11 -07:00
hfsplus_raw.h hfs/hfsplus: move on-disk layout declarations into hfs_common.h 2025-11-25 15:16:03 -08:00
inode.c hfs/hfsplus updates for v7.1 2026-04-13 16:50:38 -07: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 hfsplus: introduce KUnit tests for HFS+ string operations 2025-11-24 16:12:51 -08:00
Makefile hfsplus: introduce KUnit tests for HFS+ string operations 2025-11-24 16:12:51 -08:00
options.c fs: inline current_umask() and move it to fs_struct.h 2025-11-05 22:51:23 +01: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 hfs/hfsplus updates for v7.1 2026-04-13 16:50:38 -07:00
tables.c
unicode_test.c hfsplus: fix generic/523 test-case failure 2026-03-25 12:38:11 -07:00
unicode.c hfsplus: fix generic/523 test-case failure 2026-03-25 12:38:11 -07:00
wrapper.c hfsplus: use bdev_rw_virt in hfsplus_submit_bio 2025-05-07 07:31:08 -06: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
xattr.c hfs/hfsplus updates for v7.1 2026-04-13 16:50:38 -07:00
xattr.h hfsplus: move hfsplus_xattr_handlers to .rodata 2023-10-09 16:24:19 +02:00