./strace-static-x86_64 -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f ./syz-executor3175408892 <...> Warning: Permanently added '10.128.0.146' (ED25519) to the list of known hosts. execve("./syz-executor3175408892", ["./syz-executor3175408892"], 0x7ffcde70c110 /* 10 vars */) = 0 brk(NULL) = 0x5555557cb000 brk(0x5555557cbd00) = 0x5555557cbd00 arch_prctl(ARCH_SET_FS, 0x5555557cb380) = 0 set_tid_address(0x5555557cb650) = 5020 set_robust_list(0x5555557cb660, 24) = 0 rseq(0x5555557cbca0, 0x20, 0, 0x53053053) = 0 prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0 readlink("/proc/self/exe", "/root/syz-executor3175408892", 4096) = 28 getrandom("\xb9\xbd\x33\x4d\x73\xe9\x94\x31", 8, GRND_NONBLOCK) = 8 brk(NULL) = 0x5555557cbd00 brk(0x5555557ecd00) = 0x5555557ecd00 brk(0x5555557ed000) = 0x5555557ed000 mprotect(0x7fc070270000, 16384, PROT_READ) = 0 mmap(0x1ffff000, 4096, PROT_NONE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x1ffff000 mmap(0x20000000, 16777216, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x20000000 mmap(0x21000000, 4096, PROT_NONE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x21000000 memfd_create("syzkaller", 0) = 3 mmap(NULL, 138412032, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc067dbf000 write(3, "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"..., 524288) = 524288 munmap(0x7fc067dbf000, 524288) = 0 openat(AT_FDCWD, "/dev/loop0", O_RDWR) = 4 ioctl(4, LOOP_SET_FD, 3) = 0 close(3) = 0 mkdir("./file0", 0777) = 0 mount("/dev/loop0", "./file0", "hfsplus", MS_NODEV|MS_SILENT, "") = 0 openat(AT_FDCWD, "./file0", O_RDONLY|O_DIRECTORY) = 3 chdir("./file0") = 0 ioctl(4, LOOP_CLR_FD) = 0 close(4) = 0 openat(AT_FDCWD, "./file0", O_RDONLY) = 4 openat(AT_FDCWD, "./file0", O_RDONLY) = 5 linkat(4, "./file0", 5, "./bus", 0) = 0 openat(AT_FDCWD, "./file0", O_RDONLY) = 6 mknodat(6, "./file0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", 000) = 0 openat(AT_FDCWD, ".", O_RDONLY) = 7 [ 48.643973][ T5020] memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL, pid=5020 'syz-executor317' [ 48.663127][ T5020] loop0: detected capacity change from 0 to 1024 openat2(4, "./bus", {flags=O_RDONLY|O_TRUNC|O_CLOEXEC|FASYNC, resolve=RESOLVE_BENEATH}, 24) = 8 [ 48.701069][ T26] audit: type=1800 audit(1692804077.390:2): pid=5020 uid=0 auid=4294967295 ses=4294967295 subj=unconfined op=collect_data cause=failed comm="syz-executor317" name="bus" dev="loop0" ino=18 res=0 errno=0 [ 48.712758][ T5020] [ 48.723135][ T5020] ====================================================== [ 48.730166][ T5020] WARNING: possible circular locking dependency detected [ 48.737160][ T5020] 6.5.0-rc7-syzkaller-00018-g89bf6209cad6 #0 Not tainted [ 48.744199][ T5020] ------------------------------------------------------ [ 48.751193][ T5020] syz-executor317/5020 is trying to acquire lock: [ 48.757578][ T5020] ffff8880734e87c8 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_extend+0x1c5/0xf90 [ 48.768528][ T5020] [ 48.768528][ T5020] but task is already holding lock: [ 48.775868][ T5020] ffff8880793d20b0 (&tree->tree_lock){+.+.}-{3:3}, at: hfsplus_find_init+0x1a2/0x200 [ 48.785332][ T5020] [ 48.785332][ T5020] which lock already depends on the new lock. [ 48.785332][ T5020] [ 48.795803][ T5020] [ 48.795803][ T5020] the existing dependency chain (in reverse order) is: [ 48.804793][ T5020] [ 48.804793][ T5020] -> #1 (&tree->tree_lock){+.+.}-{3:3}: [ 48.812553][ T5020] __mutex_lock+0x181/0x1340 [ 48.817671][ T5020] hfsplus_file_truncate+0xecf/0x1120 [ 48.823558][ T5020] hfsplus_setattr+0x1eb/0x310 [ 48.828834][ T5020] notify_change+0x670/0x1160 [ 48.839300][ T5020] do_truncate+0x15c/0x220 [ 48.844246][ T5020] path_openat+0x23f1/0x29c0 [ 48.849441][ T5020] do_filp_open+0x1de/0x430 [ 48.854460][ T5020] do_sys_openat2+0x176/0x1e0 [ 48.859764][ T5020] __do_sys_openat2+0x1a4/0x2a0 [ 48.865130][ T5020] do_syscall_64+0x38/0xb0 [ 48.870056][ T5020] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 48.876466][ T5020] [ 48.876466][ T5020] -> #0 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}: [ 48.885576][ T5020] __lock_acquire+0x2e3d/0x5de0 [ 48.890950][ T5020] lock_acquire+0x1ae/0x510 [ 48.896005][ T5020] __mutex_lock+0x181/0x1340 [ 48.901303][ T5020] hfsplus_file_extend+0x1c5/0xf90 [ 48.907055][ T5020] hfsplus_bmap_reserve+0x318/0x410 [ 48.912769][ T5020] hfsplus_rename_cat+0x2ad/0x1240 [ 48.919003][ T5020] hfsplus_rename+0x118/0x200 [ 48.924225][ T5020] vfs_rename+0x13e0/0x1c30 [ 48.929265][ T5020] do_renameat2+0xc3c/0xdc0 [ 48.934372][ T5020] __x64_sys_renameat2+0xeb/0x130 [ 48.939914][ T5020] do_syscall_64+0x38/0xb0 [ 48.944861][ T5020] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 48.951350][ T5020] [ 48.951350][ T5020] other info that might help us debug this: [ 48.951350][ T5020] [ 48.961578][ T5020] Possible unsafe locking scenario: [ 48.961578][ T5020] [ 48.969020][ T5020] CPU0 CPU1 [ 48.974372][ T5020] ---- ---- [ 48.979728][ T5020] lock(&tree->tree_lock); [ 48.984260][ T5020] lock(&HFSPLUS_I(inode)->extents_lock); [ 48.992590][ T5020] lock(&tree->tree_lock); [ 48.999599][ T5020] lock(&HFSPLUS_I(inode)->extents_lock); [ 49.005413][ T5020] [ 49.005413][ T5020] *** DEADLOCK *** [ 49.005413][ T5020] [ 49.013734][ T5020] 4 locks held by syz-executor317/5020: [ 49.019270][ T5020] #0: ffff88807ceb6410 (sb_writers#9){.+.+}-{0:0}, at: do_renameat2+0x3d5/0xdc0 [ 49.028507][ T5020] #1: ffff8880734e9e00 (&type->i_mutex_dir_key#6/1){+.+.}-{3:3}, at: do_renameat2+0xb25/0xdc0 [ 49.039557][ T5020] #2: ffff8880734ea4c0 (&type->i_mutex_dir_key#6){++++}-{3:3}, at: lock_two_inodes+0x1b2/0x1e0 [ 49.050025][ T5020] #3: ffff8880793d20b0 (&tree->tree_lock){+.+.}-{3:3}, at: hfsplus_find_init+0x1a2/0x200 [ 49.060006][ T5020] [ 49.060006][ T5020] stack backtrace: [ 49.065881][ T5020] CPU: 0 PID: 5020 Comm: syz-executor317 Not tainted 6.5.0-rc7-syzkaller-00018-g89bf6209cad6 #0 [ 49.076296][ T5020] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023 [ 49.086344][ T5020] Call Trace: [ 49.089650][ T5020] [ 49.092576][ T5020] dump_stack_lvl+0xd9/0x1b0 [ 49.097164][ T5020] check_noncircular+0x311/0x3f0 [ 49.102098][ T5020] ? print_circular_bug+0x750/0x750 [ 49.107294][ T5020] ? print_shortest_lock_dependencies_backwards+0x1b0/0x1b0 [ 49.114580][ T5020] __lock_acquire+0x2e3d/0x5de0 [ 49.119430][ T5020] ? lockdep_hardirqs_on_prepare+0x410/0x410 [ 49.125408][ T5020] lock_acquire+0x1ae/0x510 [ 49.129906][ T5020] ? hfsplus_file_extend+0x1c5/0xf90 [ 49.135274][ T5020] ? lock_sync+0x190/0x190 [ 49.139713][ T5020] ? preempt_count_sub+0x150/0x150 [ 49.145182][ T5020] __mutex_lock+0x181/0x1340 [ 49.149782][ T5020] ? hfsplus_file_extend+0x1c5/0xf90 [ 49.155147][ T5020] ? hfsplus_file_extend+0x1c5/0xf90 [ 49.160687][ T5020] ? mutex_lock_io_nested+0x11a0/0x11a0 [ 49.166247][ T5020] ? hfsplus_file_extend+0x1c5/0xf90 [ 49.171700][ T5020] hfsplus_file_extend+0x1c5/0xf90 [ 49.177686][ T5020] ? hfsplus_free_fork+0x820/0x820 [ 49.182818][ T5020] ? mutex_lock_io_nested+0x11a0/0x11a0 [ 49.188385][ T5020] hfsplus_bmap_reserve+0x318/0x410 [ 49.193581][ T5020] hfsplus_rename_cat+0x2ad/0x1240 [ 49.199385][ T5020] ? hfsplus_delete_cat+0xdd0/0xdd0 [ 49.204657][ T5020] ? save_trace+0x4e/0xb30 [ 49.209063][ T5020] ? _find_first_zero_bit+0x94/0xb0 [ 49.214278][ T5020] ? lockdep_unlock+0x11b/0x290 [ 49.219139][ T5020] ? find_held_lock+0x2d/0x110 [ 49.223982][ T5020] ? down_write_nested+0x153/0x200 [ 49.229087][ T5020] ? up_read+0x20/0x20 [ 49.233144][ T5020] ? do_raw_spin_lock+0x12e/0x2b0 [ 49.238188][ T5020] ? spin_bug+0x1d0/0x1d0 [ 49.242582][ T5020] hfsplus_rename+0x118/0x200 [ 49.247434][ T5020] ? lock_two_inodes+0x1b2/0x1e0 [ 49.252721][ T5020] vfs_rename+0x13e0/0x1c30 [ 49.257218][ T5020] ? vfs_mkobj+0x5e0/0x5e0 [ 49.261687][ T5020] ? do_raw_spin_unlock+0x173/0x230 [ 49.266894][ T5020] ? bpf_lsm_path_rename+0x9/0x10 [ 49.272035][ T5020] ? security_path_rename+0x15e/0x230 [ 49.277409][ T5020] do_renameat2+0xc3c/0xdc0 [ 49.281994][ T5020] ? __ia32_sys_link+0xa0/0xa0 [ 49.286834][ T5020] ? reacquire_held_locks+0x4b0/0x4b0 [ 49.292226][ T5020] ? preempt_count_sub+0x150/0x150 [ 49.297360][ T5020] ? __check_object_size+0x323/0x740 [ 49.302729][ T5020] ? strncpy_from_user+0x214/0x300 [ 49.307925][ T5020] ? getname_flags.part.0+0x1d5/0x4d0 [ 49.313406][ T5020] __x64_sys_renameat2+0xeb/0x130 [ 49.318432][ T5020] do_syscall_64+0x38/0xb0 [ 49.322862][ T5020] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 49.328752][ T5020] RIP: 0033:0x7fc0701fc7b9 [ 49.333182][ T5020] 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 renameat2(7, "./file0", 7, "./bus", 0) = 0 exit_group(0) = ? +++ exited with 0 +++ [ 49.352870]