./strace-static-x86_64 -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f ./syz-executor2958023872 <...> Warning: Permanently added '10.128.10.58' (ED25519) to the list of known hosts. execve("./syz-executor2958023872", ["./syz-executor2958023872"], 0x7ffe6a702080 /* 10 vars */) = 0 brk(NULL) = 0x555555966000 brk(0x555555966d00) = 0x555555966d00 arch_prctl(ARCH_SET_FS, 0x555555966380) = 0 set_tid_address(0x555555966650) = 5018 set_robust_list(0x555555966660, 24) = 0 rseq(0x555555966ca0, 0x20, 0, 0x53053053) = 0 prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0 readlink("/proc/self/exe", "/root/syz-executor2958023872", 4096) = 28 getrandom("\x77\xf9\x82\x8c\xd6\x98\x37\x5e", 8, GRND_NONBLOCK) = 8 brk(NULL) = 0x555555966d00 brk(0x555555987d00) = 0x555555987d00 brk(0x555555988000) = 0x555555988000 mprotect(0x7f9870584000, 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) = 0x7f98680d3000 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(0x7f98680d3000, 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 [ 39.814177][ T5018] memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL, pid=5018 'syz-executor295' [ 39.832153][ T5018] loop0: detected capacity change from 0 to 1024 openat2(4, "./bus", {flags=O_RDONLY|O_TRUNC|O_CLOEXEC|FASYNC, resolve=RESOLVE_BENEATH}, 24) = 8 [ 39.865404][ T27] audit: type=1800 audit(1689360151.906:2): pid=5018 uid=0 auid=4294967295 ses=4294967295 subj=unconfined op=collect_data cause=failed comm="syz-executor295" name="bus" dev="loop0" ino=18 res=0 errno=0 [ 39.880562][ T5018] [ 39.888765][ T5018] ====================================================== [ 39.895765][ T5018] WARNING: possible circular locking dependency detected [ 39.902761][ T5018] 6.5.0-rc1-syzkaller-00152-g4b810bf037e5 #0 Not tainted [ 39.909768][ T5018] ------------------------------------------------------ [ 39.916764][ T5018] syz-executor295/5018 is trying to acquire lock: [ 39.923156][ T5018] ffff8880769c87c8 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_extend+0x1c5/0xf90 [ 39.934121][ T5018] [ 39.934121][ T5018] but task is already holding lock: [ 39.941466][ T5018] ffff8880282c20b0 (&tree->tree_lock){+.+.}-{3:3}, at: hfsplus_find_init+0x1a2/0x200 [ 39.951025][ T5018] [ 39.951025][ T5018] which lock already depends on the new lock. [ 39.951025][ T5018] [ 39.961518][ T5018] [ 39.961518][ T5018] the existing dependency chain (in reverse order) is: [ 39.970513][ T5018] [ 39.970513][ T5018] -> #1 (&tree->tree_lock){+.+.}-{3:3}: [ 39.978233][ T5018] __mutex_lock+0x181/0x1340 [ 39.983350][ T5018] hfsplus_file_truncate+0xecf/0x1120 [ 39.989228][ T5018] hfsplus_setattr+0x1eb/0x310 [ 39.994497][ T5018] notify_change+0x670/0x1160 [ 39.999681][ T5018] do_truncate+0x15c/0x220 [ 40.004601][ T5018] path_openat+0x23f1/0x29c0 [ 40.009699][ T5018] do_filp_open+0x1de/0x430 [ 40.014709][ T5018] do_sys_openat2+0x176/0x1e0 [ 40.019893][ T5018] __do_sys_openat2+0x1a4/0x2a0 [ 40.025252][ T5018] do_syscall_64+0x38/0xb0 [ 40.030170][ T5018] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 40.036576][ T5018] [ 40.036576][ T5018] -> #0 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}: [ 40.045592][ T5018] __lock_acquire+0x2e3d/0x5de0 [ 40.050954][ T5018] lock_acquire+0x1ae/0x510 [ 40.055966][ T5018] __mutex_lock+0x181/0x1340 [ 40.061063][ T5018] hfsplus_file_extend+0x1c5/0xf90 [ 40.066699][ T5018] hfsplus_bmap_reserve+0x318/0x410 [ 40.072420][ T5018] hfsplus_rename_cat+0x2ad/0x1240 [ 40.078044][ T5018] hfsplus_rename+0x118/0x200 [ 40.083228][ T5018] vfs_rename+0x13e0/0x1c30 [ 40.088239][ T5018] do_renameat2+0xc3c/0xdc0 [ 40.093333][ T5018] __x64_sys_renameat2+0xeb/0x130 [ 40.098862][ T5018] do_syscall_64+0x38/0xb0 [ 40.103781][ T5018] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 40.110207][ T5018] [ 40.110207][ T5018] other info that might help us debug this: [ 40.110207][ T5018] [ 40.120412][ T5018] Possible unsafe locking scenario: [ 40.120412][ T5018] [ 40.127839][ T5018] CPU0 CPU1 [ 40.133182][ T5018] ---- ---- [ 40.138527][ T5018] lock(&tree->tree_lock); [ 40.143011][ T5018] lock(&HFSPLUS_I(inode)->extents_lock); [ 40.151319][ T5018] lock(&tree->tree_lock); [ 40.158321][ T5018] lock(&HFSPLUS_I(inode)->extents_lock); [ 40.164109][ T5018] [ 40.164109][ T5018] *** DEADLOCK *** [ 40.164109][ T5018] [ 40.172230][ T5018] 4 locks held by syz-executor295/5018: [ 40.177753][ T5018] #0: ffff8880282c4410 (sb_writers#9){.+.+}-{0:0}, at: do_renameat2+0x3d5/0xdc0 [ 40.186886][ T5018] #1: ffff8880769c9e00 (&type->i_mutex_dir_key#6/1){+.+.}-{3:3}, at: do_renameat2+0xb25/0xdc0 [ 40.197323][ T5018] #2: ffff88807c8c8300 (&type->i_mutex_dir_key#6){++++}-{3:3}, at: lock_two_inodes+0x1b2/0x1e0 [ 40.207752][ T5018] #3: ffff8880282c20b0 (&tree->tree_lock){+.+.}-{3:3}, at: hfsplus_find_init+0x1a2/0x200 [ 40.217663][ T5018] [ 40.217663][ T5018] stack backtrace: [ 40.223528][ T5018] CPU: 0 PID: 5018 Comm: syz-executor295 Not tainted 6.5.0-rc1-syzkaller-00152-g4b810bf037e5 #0 [ 40.233926][ T5018] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/03/2023 [ 40.243968][ T5018] Call Trace: [ 40.247229][ T5018] [ 40.250148][ T5018] dump_stack_lvl+0xd9/0x1b0 [ 40.254725][ T5018] check_noncircular+0x311/0x3f0 [ 40.259655][ T5018] ? print_circular_bug+0x750/0x750 [ 40.264843][ T5018] ? print_shortest_lock_dependencies_backwards+0x1b0/0x1b0 [ 40.272137][ T5018] __lock_acquire+0x2e3d/0x5de0 [ 40.277020][ T5018] ? lockdep_hardirqs_on_prepare+0x410/0x410 [ 40.283002][ T5018] lock_acquire+0x1ae/0x510 [ 40.287502][ T5018] ? hfsplus_file_extend+0x1c5/0xf90 [ 40.292777][ T5018] ? lock_sync+0x190/0x190 [ 40.297183][ T5018] ? preempt_count_sub+0x150/0x150 [ 40.302291][ T5018] __mutex_lock+0x181/0x1340 [ 40.306874][ T5018] ? hfsplus_file_extend+0x1c5/0xf90 [ 40.312148][ T5018] ? hfsplus_file_extend+0x1c5/0xf90 [ 40.317418][ T5018] ? mutex_lock_io_nested+0x11a0/0x11a0 [ 40.322979][ T5018] ? hfsplus_file_extend+0x1c5/0xf90 [ 40.328337][ T5018] hfsplus_file_extend+0x1c5/0xf90 [ 40.333437][ T5018] ? hfsplus_free_fork+0x820/0x820 [ 40.338532][ T5018] ? mutex_lock_io_nested+0x11a0/0x11a0 [ 40.344070][ T5018] hfsplus_bmap_reserve+0x318/0x410 [ 40.349254][ T5018] hfsplus_rename_cat+0x2ad/0x1240 [ 40.354351][ T5018] ? hfsplus_delete_cat+0xdd0/0xdd0 [ 40.359555][ T5018] ? save_trace+0x4e/0xb30 [ 40.363960][ T5018] ? _find_first_zero_bit+0x94/0xb0 [ 40.369151][ T5018] ? lockdep_unlock+0x11b/0x290 [ 40.374003][ T5018] ? find_held_lock+0x2d/0x110 [ 40.378757][ T5018] ? down_write_nested+0x153/0x200 [ 40.383856][ T5018] ? up_read+0x20/0x20 [ 40.387920][ T5018] ? do_raw_spin_lock+0x12e/0x2b0 [ 40.392937][ T5018] ? spin_bug+0x1d0/0x1d0 [ 40.397255][ T5018] hfsplus_rename+0x118/0x200 [ 40.401920][ T5018] ? lock_two_inodes+0x1b2/0x1e0 [ 40.406844][ T5018] vfs_rename+0x13e0/0x1c30 [ 40.411338][ T5018] ? vfs_mkobj+0x5e0/0x5e0 [ 40.415744][ T5018] ? do_raw_spin_unlock+0x173/0x230 [ 40.420939][ T5018] ? bpf_lsm_path_rename+0x9/0x10 [ 40.426041][ T5018] ? security_path_rename+0x15e/0x230 [ 40.432100][ T5018] do_renameat2+0xc3c/0xdc0 [ 40.436599][ T5018] ? __ia32_sys_link+0xa0/0xa0 [ 40.441345][ T5018] ? reacquire_held_locks+0x4b0/0x4b0 [ 40.446731][ T5018] ? preempt_count_sub+0x150/0x150 [ 40.451835][ T5018] ? __check_object_size+0x323/0x740 [ 40.457105][ T5018] ? strncpy_from_user+0x214/0x300 [ 40.462203][ T5018] ? getname_flags.part.0+0x1d5/0x4d0 [ 40.467560][ T5018] __x64_sys_renameat2+0xeb/0x130 [ 40.472577][ T5018] do_syscall_64+0x38/0xb0 [ 40.476978][ T5018] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 40.482869][ T5018] RIP: 0033:0x7f98705107b9 [ 40.487274][ T5018] 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 [ 40.506955][ T5018] RSP: 002b:00007fffbdad5488 EFLAGS: 00000246 ORIG_RAX: 000000000000013c renameat2(7, "./file0", 7, "./bus", 0) = 0 exit_group(0) = ? +++ exited with 0 +++ [ 40.515358][ T5018] RAX: fffffffffff