syzbot


possible deadlock in hfsplus_get_block

Status: upstream: reported C repro on 2023/03/13 14:59
Bug presence: origin:lts-only
[Documentation on labels]
Reported-by: syzbot+4b92cf592cc55a929db6@syzkaller.appspotmail.com
First crash: 441d, last: 4h38m
Bug presence (2)
Date Name Commit Repro Result
2023/09/13 linux-6.1.y (ToT) 09045dae0d90 C [report] possible deadlock in hfsplus_get_block
2023/09/13 upstream (ToT) 3669558bdf35 C Didn't crash
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 possible deadlock in hfsplus_get_block origin:upstream C 791 8h14m 440d 0/3 upstream: reported C repro on 2023/03/14 12:03
linux-4.19 possible deadlock in hfsplus_get_block hfsplus C 248 448d 549d 0/1 upstream: reported C repro on 2022/11/26 01:19
linux-4.14 possible deadlock in hfsplus_get_block hfsplus C 131 453d 545d 0/1 upstream: reported C repro on 2022/11/30 01:33
upstream possible deadlock in hfsplus_get_block hfs C error 8938 5h19m 550d 0/26 upstream: reported C repro on 2022/11/25 09:45
Fix bisection attempts (1)
Created Duration User Patch Repo Result
2023/09/27 12:10 2h09m fix candidate upstream job log (0) log

Sample crash report:
loop0: detected capacity change from 0 to 1024
============================================
WARNING: possible recursive locking detected
6.1.84-syzkaller #0 Not tainted
--------------------------------------------
syz-executor262/3540 is trying to acquire lock:
ffff88807c9b07c8 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_get_block+0x37f/0x14e0 fs/hfsplus/extents.c:260

but task is already holding lock:
ffff888077369548 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_truncate+0x2d6/0xb40 fs/hfsplus/extents.c:576

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-executor262/3540:
 #0: ffff88807d90e460 (sb_writers#9){.+.+}-{0:0}, at: mnt_want_write+0x3b/0x80 fs/namespace.c:393
 #1: ffff888077369740 (&sb->s_type->i_mutex_key#15){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:758 [inline]
 #1: ffff888077369740 (&sb->s_type->i_mutex_key#15){+.+.}-{3:3}, at: do_truncate+0x208/0x300 fs/open.c:63
 #2: ffff888077369548 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_truncate+0x2d6/0xb40 fs/hfsplus/extents.c:576
 #3: ffff888028d940f8 (&sbi->alloc_mutex){+.+.}-{3:3}, at: hfsplus_block_free+0xb7/0x4d0 fs/hfsplus/bitmap.c:182

stack backtrace:
CPU: 0 PID: 3540 Comm: syz-executor262 Not tainted 6.1.84-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
 print_deadlock_bug kernel/locking/lockdep.c:2983 [inline]
 check_deadlock kernel/locking/lockdep.c:3026 [inline]
 validate_chain+0x4711/0x5950 kernel/locking/lockdep.c:3812
 __lock_acquire+0x125b/0x1f80 kernel/locking/lockdep.c:5049
 lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
 __mutex_lock_common kernel/locking/mutex.c:603 [inline]
 __mutex_lock+0x132/0xd80 kernel/locking/mutex.c:747
 hfsplus_get_block+0x37f/0x14e0 fs/hfsplus/extents.c:260
 block_read_full_folio+0x403/0xf60 fs/buffer.c:2271
 filemap_read_folio+0x199/0x780 mm/filemap.c:2461
 do_read_cache_folio+0x2ee/0x810 mm/filemap.c:3598
 do_read_cache_page+0x32/0x220 mm/filemap.c:3640
 read_mapping_page include/linux/pagemap.h:791 [inline]
 hfsplus_block_free+0x124/0x4d0 fs/hfsplus/bitmap.c:185
 hfsplus_free_extents+0x17a/0xae0 fs/hfsplus/extents.c:363
 hfsplus_file_truncate+0x7cc/0xb40 fs/hfsplus/extents.c:591
 hfsplus_setattr+0x1b9/0x280 fs/hfsplus/inode.c:269
 notify_change+0xce3/0xfc0 fs/attr.c:499
 do_truncate+0x21c/0x300 fs/open.c:65
 handle_truncate fs/namei.c:3287 [inline]
 do_open fs/namei.c:3632 [inline]
 path_openat+0x27e2/0x2e60 fs/namei.c:3785
 do_filp_open+0x230/0x480 fs/namei.c:3812
 do_sys_openat2+0x13b/0x500 fs/open.c:1318
 do_sys_open fs/open.c:1334 [inline]
 __do_sys_creat fs/open.c:1410 [inline]
 __se_sys_creat fs/open.c:1404 [inline]
 __x64_sys_creat+0x11f/0x160 fs/open.c:1404
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f6341bd75f9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 61 17 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffdadc20d48 EFLAGS: 00000246 ORIG_RAX: 0000000000000055
RAX: ffffffffffffffda RBX: 0031656c69662f2e RCX: 00007f6341bd75f9
RDX: 00007f6341bd68f0 RSI: 0000000000000000 RDI: 0000000020000100
RBP: 00007f6341c4a610 R08: 0000000000000685 R09: 0000000000000000
R10: 00007ffdadc20c10 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffdadc20f18 R14: 0000000000000001 R15: 0000000000000001
 </TASK>
hfsplus: request for non-existent node 16777216 in B*Tree

Crashes (759):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/04/07 22:02 linux-6.1.y 347385861c50 ca620dd8 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan possible deadlock in hfsplus_get_block
2023/09/15 12:31 linux-6.1.y 09045dae0d90 0b6a67ac .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan possible deadlock in hfsplus_get_block
2023/09/13 01:18 linux-6.1.y 59b13c2b647e 59da8366 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan possible deadlock in hfsplus_get_block
2024/04/21 21:46 linux-6.1.y 6741e066ec76 af24b050 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_get_block
2024/03/23 23:05 linux-6.1.y d7543167affd 0ea90952 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_get_block
2024/03/19 00:27 linux-6.1.y d7543167affd baa80228 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_get_block
2024/03/02 16:35 linux-6.1.y a3eb3a74aa8c 25905f5d .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_get_block
2024/01/22 23:44 linux-6.1.y 8fd7f4462453 9bd8dcda .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_get_block
2023/10/09 19:51 linux-6.1.y ecda77b46871 3c53c7d9 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_get_block
2023/05/13 03:06 linux-6.1.y bf4ad6fa4e53 ecca8a24 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_get_block
2023/06/28 09:44 linux-6.1.y e84a4e368abe 4cd5bb25 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan possible deadlock in hfsplus_get_block
2023/06/11 21:46 linux-6.1.y 2f3918bc53fb 49519f06 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan possible deadlock in hfsplus_get_block
2023/06/04 15:07 linux-6.1.y d2869ace6eeb a4ae4f42 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan possible deadlock in hfsplus_get_block
2023/06/17 19:57 linux-6.1.y ca87e77a2ef8 f3921d4d .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_get_block
2023/05/07 04:51 linux-6.1.y ca48fc16c493 90c93c40 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_get_block
2024/05/28 07:12 linux-6.1.y 88690811da69 f550015e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfsplus_get_block
2024/05/28 05:32 linux-6.1.y 88690811da69 f550015e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfsplus_get_block
2024/05/28 00:30 linux-6.1.y 88690811da69 f550015e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfsplus_get_block
2024/05/24 09:25 linux-6.1.y 4078fa637fcd 8f98448e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfsplus_get_block
2024/05/22 04:14 linux-6.1.y 4078fa637fcd 1014eca7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfsplus_get_block
2024/05/21 16:08 linux-6.1.y 4078fa637fcd 4c0d3ee3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfsplus_get_block
2024/05/21 13:34 linux-6.1.y 4078fa637fcd 4c0d3ee3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfsplus_get_block
2024/05/19 02:48 linux-6.1.y 4078fa637fcd c0f1611a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfsplus_get_block
2024/05/18 16:35 linux-6.1.y 4078fa637fcd c0f1611a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfsplus_get_block
2024/05/18 04:27 linux-6.1.y 4078fa637fcd c0f1611a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfsplus_get_block
2024/05/16 22:36 linux-6.1.y 909ba1f1b414 c2e07261 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfsplus_get_block
2024/05/16 08:15 linux-6.1.y 909ba1f1b414 ef5d53ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfsplus_get_block
2024/05/11 23:57 linux-6.1.y 909ba1f1b414 9026e142 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfsplus_get_block
2024/05/10 16:39 linux-6.1.y 909ba1f1b414 f7c35481 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfsplus_get_block
2024/05/10 00:24 linux-6.1.y 909ba1f1b414 05079661 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfsplus_get_block
2024/05/08 23:03 linux-6.1.y 909ba1f1b414 20bf80e1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfsplus_get_block
2024/05/07 17:24 linux-6.1.y 909ba1f1b414 cb2dcc0e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfsplus_get_block
2024/05/06 06:00 linux-6.1.y 909ba1f1b414 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfsplus_get_block
2024/05/04 01:50 linux-6.1.y 909ba1f1b414 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfsplus_get_block
2024/05/03 11:52 linux-6.1.y 909ba1f1b414 dd26401e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfsplus_get_block
2024/05/03 09:05 linux-6.1.y 909ba1f1b414 dd26401e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfsplus_get_block
2024/05/03 03:36 linux-6.1.y 909ba1f1b414 ddfc15a1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfsplus_get_block
2024/05/02 23:39 linux-6.1.y 909ba1f1b414 ddfc15a1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in hfsplus_get_block
2024/05/24 00:37 linux-6.1.y 4078fa637fcd 8f98448e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_get_block
2024/05/23 10:23 linux-6.1.y 4078fa637fcd 4c2072ee .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_get_block
2024/05/22 13:49 linux-6.1.y 4078fa637fcd 4d098039 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_get_block
2024/05/21 11:19 linux-6.1.y 4078fa637fcd 4c0d3ee3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_get_block
2024/05/18 01:53 linux-6.1.y 4078fa637fcd c0f1611a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_get_block
2024/05/17 16:36 linux-6.1.y 4078fa637fcd a12e99e7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_get_block
2024/05/16 20:54 linux-6.1.y 909ba1f1b414 c2e07261 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_get_block
2024/05/15 19:39 linux-6.1.y 909ba1f1b414 94b087b1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_get_block
2024/05/15 14:05 linux-6.1.y 909ba1f1b414 94b087b1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_get_block
2024/05/15 01:08 linux-6.1.y 909ba1f1b414 fdb4c10c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_get_block
2024/05/14 09:17 linux-6.1.y 909ba1f1b414 fdb4c10c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_get_block
2024/05/11 11:34 linux-6.1.y 909ba1f1b414 9026e142 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_get_block
2024/05/10 04:58 linux-6.1.y 909ba1f1b414 de979bc2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_get_block
2024/05/09 13:00 linux-6.1.y 909ba1f1b414 05079661 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_get_block
2024/05/08 16:54 linux-6.1.y 909ba1f1b414 20bf80e1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_get_block
2024/05/08 13:51 linux-6.1.y 909ba1f1b414 4cf3f9b3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_get_block
2024/05/08 00:27 linux-6.1.y 909ba1f1b414 4cf3f9b3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_get_block
2024/05/07 12:10 linux-6.1.y 909ba1f1b414 cb2dcc0e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_get_block
2024/05/07 07:41 linux-6.1.y 909ba1f1b414 fa7a5cf0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_get_block
2024/05/07 00:53 linux-6.1.y 909ba1f1b414 fa7a5cf0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_get_block
2024/05/06 13:22 linux-6.1.y 909ba1f1b414 d884b519 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_get_block
2024/05/05 23:09 linux-6.1.y 909ba1f1b414 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_get_block
2024/05/04 02:55 linux-6.1.y 909ba1f1b414 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_get_block
2024/05/04 00:01 linux-6.1.y 909ba1f1b414 dd26401e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_get_block
2024/05/03 00:50 linux-6.1.y 909ba1f1b414 ddfc15a1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_get_block
2024/05/02 22:29 linux-6.1.y 909ba1f1b414 ddfc15a1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_get_block
2023/03/13 14:57 linux-6.1.y 6449a0ba6843 026e2200 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in hfsplus_get_block
* Struck through repros no longer work on HEAD.