possible deadlock in hfsplus_file_extend (4)

Status: upstream: reported C repro on 2026/02/11 15:48
Reported-by: syzbot+65d55898e6b1bd038d24@syzkaller.appspotmail.com
First crash: 184d, last: 20d
Fix bisection: failed (error log, bisect log)
  
Bug presence (1)
Date Name Commit Repro Result
2026/07/20 upstream (ToT) 1590cf032971 C Failed due to an error; will retry later
Similar bugs (12)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 possible deadlock in hfsplus_file_extend (3) 4 4 297d 299d 0/3 auto-obsoleted due to no activity on 2026/01/30 04:03
linux-6.1 possible deadlock in hfsplus_file_extend origin:upstream missing-backport 4 syz, C done 2760 742d 1250d 3/3 fixed on 2024/09/08 06:54
linux-5.15 possible deadlock in hfsplus_file_extend (3) 4 10 276d 298d 0/3 auto-obsoleted due to no activity on 2026/01/21 08:03
upstream possible deadlock in hfsplus_file_extend (2) prio:normal hfs 4 syz, C inconclusive error 912 8d01h 642d 0/29 upstream: reported C repro on 2024/11/11 11:50
linux-5.15 possible deadlock in hfsplus_file_extend (2) 4 7 620d 671d 0/3 auto-obsoleted due to no activity on 2025/03/13 03:31
linux-4.14 possible deadlock in hfsplus_file_extend hfsplus 4 syz, C 3 1259d 1325d 0/1 upstream: reported C repro on 2022/12/29 06:07
linux-6.6 possible deadlock in hfsplus_file_extend origin:upstream 4 syz, C error 4 185d 302d 0/2 upstream: reported C repro on 2025/10/16 15:40
linux-5.15 possible deadlock in hfsplus_file_extend missing-backport origin:lts-only 4 syz, C done 3439 726d 1252d 3/3 fixed on 2024/09/23 09:27
linux-4.19 possible deadlock in hfsplus_file_extend hfsplus 4 syz, C 258 1258d 1358d 0/1 upstream: reported C repro on 2022/11/26 10:00
linux-5.15 possible deadlock in hfsplus_file_extend (4) 4 3 185d 185d 0/3 auto-obsoleted due to no activity on 2026/05/22 01:53
linux-6.1 possible deadlock in hfsplus_file_extend (2) 4 2 580d 580d 0/3 auto-obsoleted due to no activity on 2025/04/22 11:08
upstream possible deadlock in hfsplus_file_extend hfs 4 syz, C error done 31659 669d 1358d 28/29 fixed on 2024/10/21 12:45

Sample crash report:
hfsplus: invalid length 65281 has been corrected to 255
hfsplus: invalid length 65281 has been corrected to 255
hfsplus: invalid length 65281 has been corrected to 255
============================================
WARNING: possible recursive locking detected
syzkaller #0 Not tainted
--------------------------------------------
syz.0.17/4493 is trying to acquire lock:
ffff0000e0f10108 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_extend+0x188/0x1324 fs/hfsplus/extents.c:455

but task is already holding lock:
ffff0000e0f13048 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_extend+0x188/0x1324 fs/hfsplus/extents.c:455

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(&HFSPLUS_I(inode)->extents_lock);
  lock(&HFSPLUS_I(inode)->extents_lock);

 *** DEADLOCK ***

 May be due to missing lock nesting notation

4 locks held by syz.0.17/4493:
 #0: ffff0000d5a7a460 (sb_writers#12){.+.+}-{0:0}, at: mnt_want_write+0x44/0x9c fs/namespace.c:402
 #1: ffff0000e0f13240 (&sb->s_type->i_mutex_key#20){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:758 [inline]
 #1: ffff0000e0f13240 (&sb->s_type->i_mutex_key#20){+.+.}-{3:3}, at: do_truncate+0x174/0x20c fs/open.c:63
 #2: ffff0000e0f13048 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_extend+0x188/0x1324 fs/hfsplus/extents.c:455
 #3: ffff0000d490c0b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfsplus_find_init+0x148/0x1c0 fs/hfsplus/bfind.c:28

stack backtrace:
CPU: 1 PID: 4493 Comm: syz.0.17 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/02/2026
Call trace:
 dump_backtrace+0x1c4/0x1f0 arch/arm64/kernel/stacktrace.c:158
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
 __dump_stack+0x30/0x40 lib/dump_stack.c:88
 dump_stack_lvl+0xf4/0x15c lib/dump_stack.c:106
 dump_stack+0x1c/0x5c lib/dump_stack.c:113
 __lock_acquire+0x15d0/0x6634 kernel/locking/lockdep.c:-1
 lock_acquire+0x20c/0x638 kernel/locking/lockdep.c:5676
 __mutex_lock_common+0x1a0/0x1f3c kernel/locking/mutex.c:603
 __mutex_lock kernel/locking/mutex.c:747 [inline]
 mutex_lock_nested+0x38/0x44 kernel/locking/mutex.c:799
 hfsplus_file_extend+0x188/0x1324 fs/hfsplus/extents.c:455
 hfsplus_bmap_reserve+0xd0/0x458 fs/hfsplus/btree.c:358
 __hfsplus_ext_write_extent+0x1e4/0x4b0 fs/hfsplus/extents.c:104
 __hfsplus_ext_cache_extent+0x84/0x924 fs/hfsplus/extents.c:186
 hfsplus_ext_read_extent fs/hfsplus/extents.c:218 [inline]
 hfsplus_file_extend+0x388/0x1324 fs/hfsplus/extents.c:459
 hfsplus_get_block+0x318/0x11a0 fs/hfsplus/extents.c:245
 __block_write_begin_int+0x3d8/0x13c0 fs/buffer.c:1991
 __block_write_begin fs/buffer.c:2041 [inline]
 block_write_begin fs/buffer.c:2102 [inline]
 cont_write_begin+0x5b4/0x820 fs/buffer.c:2456
 hfsplus_write_begin+0x98/0xe4 fs/hfsplus/inode.c:52
 cont_expand_zero fs/buffer.c:2383 [inline]
 cont_write_begin+0x290/0x820 fs/buffer.c:2446
 hfsplus_write_begin+0x98/0xe4 fs/hfsplus/inode.c:52
 generic_cont_expand_simple+0x130/0x208 fs/buffer.c:2347
 hfsplus_setattr+0x14c/0x25c fs/hfsplus/inode.c:283
 notify_change+0xb5c/0xe20 fs/attr.c:499
 do_truncate+0x188/0x20c fs/open.c:65
 vfs_truncate+0x23c/0x2b0 fs/open.c:111
 do_sys_truncate+0xec/0x1b4 fs/open.c:134
 __do_sys_truncate fs/open.c:146 [inline]
 __se_sys_truncate fs/open.c:144 [inline]
 __arm64_sys_truncate+0x5c/0x70 fs/open.c:144
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x290 arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x13c/0x258 arch/arm64/kernel/syscall.c:140
 do_el0_svc+0x5c/0x134 arch/arm64/kernel/syscall.c:204
 el0_svc+0x58/0x128 arch/arm64/kernel/entry-common.c:637
 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585

Crashes (14):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/07/26 09:22 linux-6.1.y dc5c83b7f5f8 492bab15 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_file_extend
2026/02/16 14:05 linux-6.1.y 8ce36b2849ef 1e62d198 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_file_extend
2026/04/05 20:59 linux-6.1.y 1989cd3d56e2 4440e7c2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfsplus_file_extend
2026/07/26 08:57 linux-6.1.y dc5c83b7f5f8 492bab15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_file_extend
2026/02/18 04:35 linux-6.1.y 8ce36b2849ef 39751c21 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_file_extend
2026/02/18 04:29 linux-6.1.y 8ce36b2849ef 39751c21 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_file_extend
2026/02/16 13:39 linux-6.1.y 8ce36b2849ef 1e62d198 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_file_extend
2026/02/15 14:36 linux-6.1.y 8ce36b2849ef 1e62d198 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_file_extend
2026/02/13 21:06 linux-6.1.y 8ce36b2849ef 1e62d198 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_file_extend
2026/02/12 16:49 linux-6.1.y 8ce36b2849ef 504cb1bf .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_file_extend
2026/02/12 04:17 linux-6.1.y 8ce36b2849ef 76a109e2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_file_extend
2026/02/12 00:55 linux-6.1.y 8ce36b2849ef 76a109e2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_file_extend
2026/02/12 00:53 linux-6.1.y 8ce36b2849ef 76a109e2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_file_extend
2026/02/11 15:47 linux-6.1.y 8ce36b2849ef 75707236 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_file_extend
* Struck through repros no longer work on HEAD.