[GIT PULL] hfs/hfsplus changes for 7.2-rc1

From: Viacheslav Dubeyko

Date: Tue Jun 16 2026 - 01:48:52 EST


Hello Linus,

This pull request contains several fixes in HFS/HFS+ of syzbot
reported issues and HFS//HFS+ fixes of xfstests failures.

Edward Adam Davis has fixed a null-ptr-deref issue reported by
syzbot in hfsplus_create_attributes_file() for the case if
the attributes file is not loaded during system mount. Also,
it was added b-tree node size check in hfs_btree_open() with
the goal to prevent an uninit-value bug reported by syzbot
for the case of corrupted HFS+ image.

Rosen Penev suggested a nice fix in __hfs_bnode_create() by
using kzalloc_flex() instead of kzalloc().

Tristan Madani suggested really useful fix in hfs_bnode_read().
hfs_bnode_read() can return early without writing to the output buffer
when is_bnode_offset_valid() fails or when check_and_correct_requested_
length() corrects the length to zero. Callers such as hfs_bnode_read_
u16() and hfs_bnode_read_u8() pass stack-allocated buffers and use the
result unconditionally, leading to KMSAN uninit-value reports.

The rest patches suggest teh fixes: (1) generic/637, generic/729 issue
for the case of HFS+ file system, (2) generic/003, generic/637
for the case of HFS file system.

The following changes since commit
254f49634ee16a731174d2ae34bc50bd5f45e731:

Linux 7.1-rc1 (2026-04-26 14:19:00 -0700)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/vdubeyko/hfs.git
tags/hfs-v7.2-tag1

for you to fetch changes up to
7fde7e806657fbe0d33f489521b488eed94f9b39:

hfs: rework hfsplus_readdir() logic (2026-05-27 11:24:05 -0700)

----------------------------------------------------------------
hfs/hfsplus updates for v7.2

- hfs: rework hfsplus_readdir() logic
- hfs: disable the updating of file access times (atime)
- hfs: fix incorrect inode ID assignment in hfs_new_inode()
- hfsplus: rework hfsplus_readdir() logic
- hfs/hfsplus: zero-initialize buffer in hfs_bnode_read
- hfs/hfsplus: fix u32 overflow in check_and_correct_requested_length
- hfsplus: Add a sanity check for btree node size
- hfsplus: fix issue of direct writes beyond end-of-file
- hfs/hfxplus: use kzalloc_flex()
- hfsplus: Remove the duplicate attr inode dirty marking action

----------------------------------------------------------------
Edward Adam Davis (2):
hfsplus: Remove the duplicate attr inode dirty marking action
hfsplus: Add a sanity check for btree node size

Rosen Penev (1):
hfs/hfxplus: use kzalloc_flex()

Tristan Madani (2):
hfs/hfsplus: fix u32 overflow in
check_and_correct_requested_length
hfs/hfsplus: zero-initialize buffer in hfs_bnode_read

Viacheslav Dubeyko (5):
hfsplus: fix issue of direct writes beyond end-of-file
hfsplus: rework hfsplus_readdir() logic
hfs: fix incorrect inode ID assignment in hfs_new_inode()
hfs: disable the updating of file access times (atime)
hfs: rework hfsplus_readdir() logic

fs/hfs/bnode.c | 10 +++++-----
fs/hfs/catalog.c | 9 ---------
fs/hfs/dir.c | 37 ++++++++++++++++++-------------------
fs/hfs/hfs.h | 3 +--
fs/hfs/hfs_fs.h | 2 --
fs/hfs/inode.c | 21 +++++++++++----------
fs/hfs/super.c | 2 +-
fs/hfsplus/bnode.c | 8 ++++----
fs/hfsplus/btree.c | 2 ++
fs/hfsplus/catalog.c | 11 -----------
fs/hfsplus/dir.c | 28 +++++++++++-----------------
fs/hfsplus/hfsplus_fs.h | 7 ++-----
fs/hfsplus/inode.c | 40 ++++++++++++++++++++++++++++++++++++--
--
fs/hfsplus/super.c | 2 --
fs/hfsplus/xattr.c | 1 -
include/linux/hfs_common.h | 1 +
16 files changed, 92 insertions(+), 92 deletions(-)