<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/stable/linux.git/fs/hfsplus, branch master</title>
<subtitle>Linux kernel stable tree</subtitle>
<id>https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=master</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/'/>
<updated>2026-08-18T01:14:32+00:00</updated>
<entry>
<title>Merge tag 'hfs-v7.3-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/vdubeyko/hfs</title>
<updated>2026-08-18T01:14:32+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-08-18T01:14:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=0de672c7e1920acc5675d0dd22718c4f6e6b4447'/>
<id>urn:sha1:0de672c7e1920acc5675d0dd22718c4f6e6b4447</id>
<content type='text'>
Pull HFS updates from Viacheslav Dubeyko:
 "This contains several fixes in HFS/HFS+ of syzbot reported issues and
  HFS/HFS+ fixes of xfstests failures.

   - b-tree bitmap corruption check (Aditya Prakash Srivastava)

     During b-tree open (hfs_btree_open()), the code verifies that the
     allocation map bit for the tree header (node 0) is set. If not, it
     indicates a corrupted map record/bitmap and mounts the volume as
     read-only (SB_RDONLY) to prevent further damage.

   - Validate catalog CNIDs before instantiating inodes (David
     Maximiliano Hermitte)

     The hfs_cat_find_brec() first resolves a catalog thread record by
     CNID and then looks up the corresponding catalog record by
     parent/name. On a corrupted filesystem image, the second lookup may
     find a record whose CNID does not match the CNID that was
     requested. Finally, corrupted catalog records are rejected.

   - Validate B-tree record offset table (Jiaming Zhang)

     A crafted HFS+ image can contain a corrupted B-tree node. The node
     descriptor may contain a record count that does not fit in the
     node, and record offsets may be unordered, unaligned, outside the
     node, or point into the offset table itself. Validate num_recs
     against the node size before walking the record offset table.
     Reject record ranges that are unordered, unaligned, outside the
     node, or overlapping the offset table. Reject invalid record
     indexes before reading their offset entries, and avoid decrementing
     an already-zero leaf_count.

   - Refactoring of hfsplus_delete_cat() logic (Kyle Zeng).

     The hfsplus_delete_cat() is called with str == NULL when the last
     open reference to an unlinked HFS+ hardlink backing inode is
     closed. In that case, the function finds the catalog thread by CNID
     and rebuilds the catalog key from thread.nodeName. A corrupted
     image can therefore provide an oversized thread name length and
     make hfs_bnode_read() write past the catalog search-key allocation.
     Read the CNID record through hfsplus_brec_read_cat(), which bounds
     the record read to sizeof(hfsplus_cat_entry) and verifies that a
     thread record's size exactly matches nodeName.length.

   - Cleanup in KUnit test (Mohammad Shahid)

     The kfree() safely handles NULL pointers, so the explicit NULL
     check in free_mock_str_env() before calling kfree() is unnecessary.

  The rest contain fixes of generic/564 xfstests' test-case failure
  for the case of HFS+ file system, syzbot reported issue in
  hfs_mdb_commit() and hfs_mdb_close() methods of HFS file system,
  and reworking the MDB locking scheme in HFS file system"

* tag 'hfs-v7.3-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/vdubeyko/hfs:
  hfsplus: validate extent record length before writing it back
  hfsplus: validate B-tree record offset table
  hfs: rework MDB locking scheme
  fs: hfsplus: remove redundant NULL check before kfree()
  hfs: port HFS+ b-tree bitmap corruption check
  hfs: don't re-dirty MDB buffers after a write failure
  hfsplus: fix error code when writing beyond volume capacity
  hfs: fix error code when writing beyond volume capacity
  hfsplus: validate thread record before delete key rebuild
  hfs: validate catalog CNIDs before instantiating inodes
</content>
</entry>
<entry>
<title>Merge tag 'vfs-7.3-rc1.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs</title>
<updated>2026-08-17T19:56:12+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-08-17T19:56:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=1c3e8cef79ea5f1415cff0d3c507e2e07b71ade8'/>
<id>urn:sha1:1c3e8cef79ea5f1415cff0d3c507e2e07b71ade8</id>
<content type='text'>
Pull misc vfs updates from Christian Brauner:
 "Bigger cleanups:

   - The lockref dead-count handling is tidied up.

     The open-coded check for a count below zero as the dead marker
     relies on information the caller should not have.

   - make put_mnt_ns() leave mounts connected. Destroying a mount
     namespace disconnected its mounts from their mount points. So a
     file descriptor still open on the parent of a mount point could be
     used to peek under it.

     Locked mounts were already kept connected to prevent exactly that.
     But a mount is only locked when its tree is copied across a user
     namespace boundary. So a mount namespace set up by a privileged
     component had no locked mounts and its mounts were disconnected.
     Passing UMOUNT_CONNECTED keeps every mount connected and prevents
     that bug.

   - vfs_prepare_mode() passes S_IFDIR for directories. I meant to fix
     that ago but didn't get to it. So now someone finally did it.

     This kills the exception where the mode could be 0 when a directory
     was created whereas every other creation operation passed it
     explicitly already.

   - move long delayed work for ufs, jffs2, hfsplus, hfs and affs from
     the per-cpu system_long_wq to the new unbound system_dfl_long_wq.

     None of that work relies on per-cpu state and the work item is
     enqueued with queue_delayed_work() whose timer is global anyway. So
     it may as well benefit from scheduler task placement.

  Smaller fixes and cleanups:

   - unlock_buffer() and journal_end_buffer_io_sync() use
     clear_and_wake_up_bit()

   - the pipe page pools are unified into a single per-pipe pool and the
     extra wake_up(rd_wait) is limited to EPOLLET consumers

   - eventpoll now computes its timer slack lazily in ep_poll()

   - shrink_dcache_for_umount() keeps making progress on busy roots

   - excess xarray nodes are freed in clear_inode()

   - romfs detects hard link cycles

   - the user path of nested backing files is fixed

   - pidfd holds exec_update_lock around the namespace ioctl

   - non-memcg-aware nr_cached_objects is skipped during memcg slab
     shrink

   - iomap_write_iter() always returns status

   - mangle_path() is renamed to seq_mangle_path()

   - inode timestamp accessors are annotated

   - new regression test for pipe-&gt;poll_usage.

   - a few documentation, kernel-doc and selftest fixes"

* tag 'vfs-7.3-rc1.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: (67 commits)
  selftests/namespaces: Fix racy pipe handshake in timens and pidns_separate
  selftests/epoll: add a regression test for pipe-&gt;poll_usage
  pipe: only enable the extra wake_up(rd_wait) for EPOLLET consumers
  pidfd: hold exec_update_lock around namespace ioctl
  fs: fix user path of nested backing files
  fs: remove stale inode_insert5() kernel-doc parameter
  fs: fix switch/case indentation in sysfs() syscall
  fs: document semantics of kstat::{uid,gid} fields
  dcache: keep shrink_dcache_for_umount() making progress on busy roots
  seq_file: rename mangle_path to seq_mangle_path
  nstree: add/fix struct ns_id_req kernel-doc member fields
  dcache: use lockref routines for dead count checks
  lockref: tidy up dead count handling
  initramfs: fix typo in reserve_initrd_mem comment
  fs/pipe: unify the page pools into a single per-pipe pool
  fs: annotate inode timestamp accessors
  eventpoll: compute timer slack lazily in ep_poll()
  selftests/filesystems: add mntns cleanup test
  put_mnt_ns(): leave mounts connected
  affs: Move long delayed work on system_dfl_long_wq
  ...
</content>
</entry>
<entry>
<title>hfsplus: validate extent record length before writing it back</title>
<updated>2026-08-11T23:37:16+00:00</updated>
<author>
<name>Jiaming Zhang</name>
<email>r772577952@gmail.com</email>
</author>
<published>2026-08-10T09:24:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=627b7865c062ff642c0000f3a4775f1a44b986a4'/>
<id>urn:sha1:627b7865c062ff642c0000f3a4775f1a44b986a4</id>
<content type='text'>
__hfsplus_ext_write_extent() writes the cached extent record back into a
B-tree node using fd-&gt;entrylength as the length, and fd-&gt;entrylength is
derived in __hfs_brec_find() from two on-disk values:

	fd-&gt;entrylength = len - keylen;

A crafted image can keep both len and keylen valid but make fd-&gt;entrylength
negative (keylen &gt; len). __hfsplus_ext_write_extent() doesn't check
fd-&gt;entrylength before consuming it, and hfs_bnode_write() takes the length
as u32, so the negative value turns into a huge one. The copy then reads
data past the end of hip-&gt;cached_extents, which is only
sizeof(hfsplus_extent_rec) bytes long, and leaks kernel memory into the
image.

Reject an fd-&gt;entrylength that does not match sizeof(hfsplus_extent_rec) in
__hfsplus_ext_write_extent(), mirroring the check already performed in
__hfsplus_ext_read_extent().

Link: https://lore.kernel.org/lkml/cbd7003314c530d4f910eacf019ff80adad6687e.camel@dubeyko.com/
Signed-off-by: Jiaming Zhang &lt;r772577952@gmail.com&gt;
Reviewed-by: Viacheslav Dubeyko &lt;slava@dubeyko.com&gt;
Link: https://lore.kernel.org/r/20260810092422.1691377-1-r772577952@gmail.com
Signed-off-by: Viacheslav Dubeyko &lt;slava@dubeyko.com&gt;
</content>
</entry>
<entry>
<title>hfsplus: validate B-tree record offset table</title>
<updated>2026-08-11T23:22:26+00:00</updated>
<author>
<name>Jiaming Zhang</name>
<email>r772577952@gmail.com</email>
</author>
<published>2026-08-06T07:33:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=00aedd67d75d7b86681bdecaa3b20394e1447d2e'/>
<id>urn:sha1:00aedd67d75d7b86681bdecaa3b20394e1447d2e</id>
<content type='text'>
A crafted HFS+ image can contain a corrupted B-tree node. The node
descriptor may contain a record count that does not fit in the node, and
record offsets may be unordered, unaligned, outside the node, or point into
the offset table itself.

Several B-tree helpers consume these on-disk fields before validating them:
hfs_bnode_dump() can walk past the offset table when num_recs is corrupted,
hfs_brec_lenoff() can produce an underflowed length or a record range that
overlaps the offset table. This can make the unlink/writeback path
repeatedly call hfs_bnode_read_u16() with invalid offsets while holding the
HFS+ B-tree lock, producing a flood of "requested invalid offset" messages.
Other writeback workers then block on tree-&gt;tree_lock and the system
reports tasks hung in hfsplus_write_inode().

Validate num_recs against the node size before walking the record offset
table. Reject record ranges that are unordered, unaligned, outside the
node, or overlapping the offset table. Reject invalid record indexes before
reading their offset entries, and avoid decrementing an already-zero
leaf_count.

Closes: https://lore.kernel.org/lkml/CANypQFb_2TqKGrztAXj5m0_v+QChxXDnQVeifzV8J25Vuju10Q@mail.gmail.com/
Assisted-by: Codex:gpt-5.5-xhigh
Signed-off-by: Jiaming Zhang &lt;r772577952@gmail.com&gt;
Reviewed-by: Viacheslav Dubeyko &lt;slava@dubeyko.com&gt;
Tested-by: Viacheslav Dubeyko &lt;slava@dubeyko.com&gt;
Signed-off-by: Viacheslav Dubeyko &lt;slava@dubeyko.com&gt;
Link: https://lore.kernel.org/r/20260806073358.1184938-1-r772577952@gmail.com
Signed-off-by: Viacheslav Dubeyko &lt;slava@dubeyko.com&gt;
</content>
</entry>
<entry>
<title>Remove excl arg to -&gt;create inode_operation</title>
<updated>2026-07-31T08:18:30+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neil@brown.name</email>
</author>
<published>2026-07-01T11:51:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b2f1e6301efa4a80becdb0715416c3cbc693fbb4'/>
<id>urn:sha1:b2f1e6301efa4a80becdb0715416c3cbc693fbb4</id>
<content type='text'>
The only time that 'false' is passed as the 'excl' arg to the -&gt;create
inode_operation is in lookup_open() when -&gt;atomic_open is not provided
by the parent directory.
*all* directory inode_operations which do not have -&gt;atomic_open
completely ignore the 'excl' arg.

Therefore we don't need the 'excl' arg.  Those few -&gt;create operations
which pay attention to the arg are only ever called with a value of
'true'.

We remove that arg and change all -&gt;create operations to behave as those
thhe arg were 'true'.

Signed-off-by: NeilBrown &lt;neil@brown.name&gt;
Link: https://patch.msgid.link/178290671516.27465.15984496764174914338@noble.neil.brown.name
Reviewed-by: Jori Koolstra &lt;jkoolstra@xs4all.nl&gt;
Reviewed-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Christian Brauner (Amutable) &lt;brauner@kernel.org&gt;
</content>
</entry>
<entry>
<title>hfsplus: Move long delayed work on system_dfl_long_wq</title>
<updated>2026-07-31T08:09:07+00:00</updated>
<author>
<name>Marco Crivellari</name>
<email>marco.crivellari@suse.com</email>
</author>
<published>2026-07-06T10:54:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=f159da4398352302948c4f328515dca0b6f336b7'/>
<id>urn:sha1:f159da4398352302948c4f328515dca0b6f336b7</id>
<content type='text'>
Currently the code enqueue work items using {queue|mod}_delayed_work(),
using system_long_wq. This workqueue should be used when long works are
expected and it is a per-cpu workqueue.

The function(s) end up calling __queue_delayed_work(), which set a global
timer that could fire anywhere, enqueuing the work where the timer fired.

Unbound works could benefit from scheduler task placement, to optimize
performance and power consumption. Long work shouldn't stick to a single
CPU.

Recently, a new unbound workqueue specific for long running work has
been added:

    c116737e972e ("workqueue: Add system_dfl_long_wq for long unbound works")

Since the workqueue work doesn't rely on per-cpu variables, there is no
obvious reason that justify the use of a per-cpu workqueue. So change
system_long_wq with system_dfl_long_wq so that the work may benefit from
scheduler task placement.

Cc: Viacheslav Dubeyko &lt;slava@dubeyko.com&gt;
Cc: John Paul Adrian Glaubitz &lt;glaubitz@physik.fu-berlin.de&gt;
Cc: Yangtao Li &lt;frank.li@vivo.com&gt;
Cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Marco Crivellari &lt;marco.crivellari@suse.com&gt;
Link: https://patch.msgid.link/20260706105443.173697-4-marco.crivellari@suse.com
Reviewed-by: Viacheslav Dubeyko &lt;slava@dubeyko.com&gt;
Signed-off-by: Christian Brauner (Amutable) &lt;brauner@kernel.org&gt;
</content>
</entry>
<entry>
<title>fs: hfsplus: remove redundant NULL check before kfree()</title>
<updated>2026-07-28T01:07:37+00:00</updated>
<author>
<name>Mohammad Shahid</name>
<email>mdshahid03@gmail.com</email>
</author>
<published>2026-07-26T06:42:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=c86df5cbba015c40985a49ce70217c370cd57fc6'/>
<id>urn:sha1:c86df5cbba015c40985a49ce70217c370cd57fc6</id>
<content type='text'>
kfree() safely handles NULL pointers, so the explicit NULL check
before calling kfree() is unnecessary.

This issue was reported by ifnullfree.cocci.

Signed-off-by: Mohammad Shahid &lt;mdshahid03@gmail.com&gt;
Link: https://lore.kernel.org/r/20260726064228.248199-1-mdshahid03@gmail.com
Reviewed-by: Viacheslav Dubeyko &lt;slava@dubeyko.com&gt;
Signed-off-by: Viacheslav Dubeyko &lt;slava@dubeyko.com&gt;
</content>
</entry>
<entry>
<title>hfsplus: fix error code when writing beyond volume capacity</title>
<updated>2026-07-14T17:25:39+00:00</updated>
<author>
<name>Viacheslav Dubeyko</name>
<email>slava@dubeyko.com</email>
</author>
<published>2026-07-06T22:17:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=56a4dbc90601689d013eaa5ce1b3d6a54bcff7c7'/>
<id>urn:sha1:56a4dbc90601689d013eaa5ce1b3d6a54bcff7c7</id>
<content type='text'>
The xfstests' test-case generic/564 fails for
the case of HFS+ file system. Test-case expects that
file system driver reports -EFBIG error code in the case
if there is the effort to write beyond 8TiB. However, HFS+
file system driver returns -ENOSPC instead.

The root cause is that hfsplus_fill_super() sets s_maxbytes
as MAX_LFS_FILESIZE. VFS therefore considers the write
position valid and calls into the filesystem. Because HFS+
does not support holes, cont_write_begin() zero-fills
the entire intermediate range from the current end-of-file
to the target offset. On a small test volume this exhausts
free space long before any block-number overflow is detected,
producing -ENOSPC instead of -EFBIG.

This patch fixes the issue by adding a bounds check at
the top of hfsplus_write_begin(). If the requested write
position is at or beyond the actual capacity of the volume
in bytes, return -EFBIG immediately before cont_write_begin()
is entered and before any zero-fill I/O is attempted.

sudo ./check generic/564
FSTYP         -- hfsplus
PLATFORM      -- Linux/x86_64 hfsplus-testing-0001 7.2.0-rc1-dirty #50 SMP PREEMPT_DYNAMIC Fri Jul  3 16:22:27 PDT 2026
MKFS_OPTIONS  -- /dev/loop51
MOUNT_OPTIONS -- /dev/loop51 /mnt/scratch

generic/564  13s ...  43s
Ran: generic/564
Passed all 1 tests

cc: John Paul Adrian Glaubitz &lt;glaubitz@physik.fu-berlin.de&gt;
cc: Yangtao Li &lt;frank.li@vivo.com&gt;
cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Viacheslav Dubeyko &lt;slava@dubeyko.com&gt;
Link: https://lore.kernel.org/r/20260706221738.140271-2-slava@dubeyko.com
Signed-off-by: Viacheslav Dubeyko &lt;slava@dubeyko.com&gt;
</content>
</entry>
<entry>
<title>hfsplus: validate thread record before delete key rebuild</title>
<updated>2026-07-14T17:23:20+00:00</updated>
<author>
<name>Kyle Zeng</name>
<email>kylebot@openai.com</email>
</author>
<published>2026-07-09T01:02:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e2ea5cac61acfc11dad22f1d2d4bc71d56c52a20'/>
<id>urn:sha1:e2ea5cac61acfc11dad22f1d2d4bc71d56c52a20</id>
<content type='text'>
hfsplus_delete_cat() is called with str == NULL when the last open
reference to an unlinked HFS+ hardlink backing inode is closed. In that
case, the function finds the catalog thread by CNID and rebuilds the
catalog key from thread.nodeName.

That reconstruction path reads thread.nodeName.length directly from the
catalog B-tree into fd.search_key and then copies length * 2 bytes into
fd.search_key-&gt;cat.name.unicode. It does not first check that the found
record is a thread record or that its size matches the thread name.

A corrupted image can therefore provide an oversized thread name length
and make hfs_bnode_read() write past the catalog search-key allocation.

Read the CNID record through hfsplus_brec_read_cat(), which bounds the
record read to sizeof(hfsplus_cat_entry) and verifies that a thread
record's size exactly matches nodeName.length. Together, these checks
ensure an accepted thread name fits HFSPLUS_MAX_STRLEN. Reject non-thread
records before building the delete key from the validated thread name.

Share the thread-record-type helper between hfsplus_find_cat() and
hfsplus_delete_cat().

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Assisted-by: Codex:gpt-5.6
Signed-off-by: Kyle Zeng &lt;kylebot@openai.com&gt;
Reviewed-by: Viacheslav Dubeyko &lt;slava@dubeyko.com&gt;
Signed-off-by: Viacheslav Dubeyko &lt;slava@dubeyko.com&gt;
Link: https://lore.kernel.org/r/20260709010203.49664-1-kylebot@openai.com
Signed-off-by: Viacheslav Dubeyko &lt;slava@dubeyko.com&gt;
</content>
</entry>
<entry>
<title>hfsplus: drop redundant S_IFDIR from mkdir</title>
<updated>2026-07-01T10:50:19+00:00</updated>
<author>
<name>Jori Koolstra</name>
<email>jkoolstra@xs4all.nl</email>
</author>
<published>2026-06-30T10:53:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b27e20b4475af6f0d839badec9648b5587c8dffd'/>
<id>urn:sha1:b27e20b4475af6f0d839badec9648b5587c8dffd</id>
<content type='text'>
vfs_mkdir() now sets the S_IFDIR type bit in the mode it passes to
-&gt;mkdir(), so OR-ing S_IFDIR into the mode again in hfsplus_mkdir() is
redundant. Drop it.

Assisted-by: LLM
Signed-off-by: Jori Koolstra &lt;jkoolstra@xs4all.nl&gt;
Link: https://patch.msgid.link/20260630105400.68459-14-jkoolstra@xs4all.nl
Reviewed-by: NeilBrown &lt;neil@brown.name&gt;
Signed-off-by: Christian Brauner (Amutable) &lt;brauner@kernel.org&gt;
</content>
</entry>
</feed>
