./strace-static-x86_64 -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f ./syz-executor1070717611 <...> DUID 00:04:f8:b5:8a:47:ae:09:95:3a:43:2d:d7:42:86:31:94:89 forked to background, child pid 4660 [ 30.571373][ T4661] 8021q: adding VLAN 0 to HW filter on device bond0 [ 30.583587][ T4661] eql: remember to turn off Van-Jacobson compression on your slave devices Starting sshd: OK syzkaller syzkaller login: [ 44.679433][ T4850] scp (4850) used greatest stack depth: 20192 bytes left Warning: Permanently added '10.128.0.186' (ECDSA) to the list of known hosts. execve("./syz-executor1070717611", ["./syz-executor1070717611"], 0x7ffd97766cd0 /* 10 vars */) = 0 brk(NULL) = 0x555555b81000 brk(0x555555b81c40) = 0x555555b81c40 arch_prctl(ARCH_SET_FS, 0x555555b81300) = 0 uname({sysname="Linux", nodename="syzkaller", ...}) = 0 readlink("/proc/self/exe", "/root/syz-executor1070717611", 4096) = 28 brk(0x555555ba2c40) = 0x555555ba2c40 brk(0x555555ba3000) = 0x555555ba3000 mprotect(0x7fc6e99ac000, 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) = 0x7fc6e14f2000 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(0x7fc6e14f2000, 524288) = 0 openat(AT_FDCWD, "/dev/loop0", O_RDWR) = 4 ioctl(4, LOOP_SET_FD, 3) = 0 close(3) = 0 mkdir("./file0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", 0777) = 0 mount("/dev/loop0", "./file0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "hfsplus", MS_SILENT, "") = 0 openat(AT_FDCWD, "./file0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") = 0 [ 54.853837][ T4997] memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL, pid=4997 'syz-executor107' [ 54.871941][ T4997] loop0: detected capacity change from 0 to 1024 [ 54.910452][ T4997] [ 54.912818][ T4997] ====================================================== [ 54.919960][ T4997] WARNING: possible circular locking dependency detected [ 54.926971][ T4997] 6.4.0-rc6-syzkaller-00049-g62d8779610bb #0 Not tainted [ 54.934346][ T4997] ------------------------------------------------------ [ 54.941345][ T4997] syz-executor107/4997 is trying to acquire lock: [ 54.947741][ T4997] ffff88807c9e40b0 (&tree->tree_lock){+.+.}-{3:3}, at: hfsplus_file_truncate+0x811/0xb40 [ 54.957559][ T4997] [ 54.957559][ T4997] but task is already holding lock: [ 54.964907][ T4997] ffff88802b5707c8 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_truncate+0x2da/0xb40 [ 54.976032][ T4997] [ 54.976032][ T4997] which lock already depends on the new lock. [ 54.976032][ T4997] [ 54.986417][ T4997] [ 54.986417][ T4997] the existing dependency chain (in reverse order) is: [ 54.995410][ T4997] [ 54.995410][ T4997] -> #1 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}: [ 55.004437][ T4997] lock_acquire+0x1e3/0x520 [ 55.010399][ T4997] __mutex_lock_common+0x1d8/0x2530 [ 55.016115][ T4997] mutex_lock_nested+0x1b/0x20 [ 55.021657][ T4997] hfsplus_file_extend+0x1d6/0x1b10 [ 55.027365][ T4997] hfsplus_bmap_reserve+0x105/0x4e0 [ 55.033156][ T4997] hfsplus_rename_cat+0x1d3/0x1090 [ 55.038774][ T4997] hfsplus_unlink+0x308/0x7f0 [ 55.043955][ T4997] vfs_unlink+0x35d/0x5f0 [ 55.048786][ T4997] do_unlinkat+0x4a7/0x950 [ 55.053704][ T4997] __x64_sys_unlink+0x49/0x50 [ 55.058882][ T4997] do_syscall_64+0x41/0xc0 [ 55.063795][ T4997] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 55.070719][ T4997] [ 55.070719][ T4997] -> #0 (&tree->tree_lock){+.+.}-{3:3}: [ 55.078530][ T4997] validate_chain+0x166b/0x58f0 [ 55.083899][ T4997] __lock_acquire+0x1316/0x2070 [ 55.089259][ T4997] lock_acquire+0x1e3/0x520 [ 55.094271][ T4997] __mutex_lock_common+0x1d8/0x2530 [ 55.099974][ T4997] mutex_lock_nested+0x1b/0x20 [ 55.105331][ T4997] hfsplus_file_truncate+0x811/0xb40 [ 55.111380][ T4997] hfsplus_setattr+0x1bd/0x280 [ 55.116833][ T4997] notify_change+0xc8b/0xf40 [ 55.121946][ T4997] do_truncate+0x220/0x300 [ 55.126868][ T4997] path_openat+0x294e/0x3170 [ 55.131963][ T4997] do_filp_open+0x234/0x490 [ 55.136970][ T4997] do_sys_openat2+0x13f/0x500 [ 55.142149][ T4997] __x64_sys_creat+0x123/0x160 [ 55.147414][ T4997] do_syscall_64+0x41/0xc0 [ 55.152331][ T4997] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 55.158725][ T4997] [ 55.158725][ T4997] other info that might help us debug this: [ 55.158725][ T4997] [ 55.168934][ T4997] Possible unsafe locking scenario: [ 55.168934][ T4997] [ 55.176410][ T4997] CPU0 CPU1 [ 55.181756][ T4997] ---- ---- [ 55.187104][ T4997] lock(&HFSPLUS_I(inode)->extents_lock); [ 55.192896][ T4997] lock(&tree->tree_lock); [ 55.199905][ T4997] lock(&HFSPLUS_I(inode)->extents_lock); [ 55.208226][ T4997] lock(&tree->tree_lock); [ 55.213862][ T4997] [ 55.213862][ T4997] *** DEADLOCK *** [ 55.213862][ T4997] [ 55.222006][ T4997] 3 locks held by syz-executor107/4997: [ 55.227621][ T4997] #0: ffff88807c9e2460 (sb_writers#9){.+.+}-{0:0}, at: mnt_want_write+0x3f/0x90 [ 55.236747][ T4997] #1: ffff88802b5709c0 (&sb->s_type->i_mutex_key#14){+.+.}-{3:3}, at: do_truncate+0x20c/0x300 [ 55.247078][ T4997] #2: ffff88802b5707c8 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_truncate+0x2da/0xb40 [ 55.258617][ T4997] [ 55.258617][ T4997] stack backtrace: [ 55.264481][ T4997] CPU: 1 PID: 4997 Comm: syz-executor107 Not tainted 6.4.0-rc6-syzkaller-00049-g62d8779610bb #0 [ 55.274963][ T4997] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023 [ 55.285013][ T4997] Call Trace: [ 55.288291][ T4997] [ 55.291219][ T4997] dump_stack_lvl+0x1e7/0x2d0 [ 55.295912][ T4997] ? nf_tcp_handle_invalid+0x650/0x650 [ 55.301366][ T4997] ? print_circular_bug+0x12b/0x1a0 [ 55.306552][ T4997] check_noncircular+0x2fe/0x3b0 [ 55.311824][ T4997] ? add_chain_block+0x850/0x850 [ 55.316840][ T4997] ? add_chain_block+0x850/0x850 [ 55.321761][ T4997] ? lockdep_lock+0x123/0x2b0 [ 55.326428][ T4997] ? add_chain_block+0x850/0x850 [ 55.331347][ T4997] ? _find_first_zero_bit+0xd4/0x100 [ 55.336699][ T4997] validate_chain+0x166b/0x58f0 [ 55.341538][ T4997] ? reacquire_held_locks+0x660/0x660 [ 55.346899][ T4997] ? reacquire_held_locks+0x660/0x660 [ 55.352250][ T4997] ? look_up_lock_class+0x77/0x140 [ 55.357352][ T4997] ? register_lock_class+0x104/0x990 [ 55.362617][ T4997] ? mark_lock+0x9a/0x340 [ 55.366926][ T4997] ? is_dynamic_key+0x1f0/0x1f0 [ 55.371755][ T4997] ? mark_lock+0x9a/0x340 [ 55.376064][ T4997] __lock_acquire+0x1316/0x2070 [ 55.380989][ T4997] lock_acquire+0x1e3/0x520 [ 55.385471][ T4997] ? hfsplus_file_truncate+0x811/0xb40 [ 55.390912][ T4997] ? read_lock_is_recursive+0x20/0x20 [ 55.396266][ T4997] ? __might_sleep+0xc0/0xc0 [ 55.400838][ T4997] __mutex_lock_common+0x1d8/0x2530 [ 55.406014][ T4997] ? hfsplus_file_truncate+0x811/0xb40 [ 55.411455][ T4997] ? hfsplus_file_truncate+0x811/0xb40 [ 55.416906][ T4997] ? mutex_lock_io_nested+0x60/0x60 [ 55.422102][ T4997] ? hfsplus_free_extents+0x47e/0xae0 [ 55.427455][ T4997] mutex_lock_nested+0x1b/0x20 [ 55.432207][ T4997] hfsplus_file_truncate+0x811/0xb40 [ 55.437474][ T4997] ? hfsplus_add_extent+0x880/0x880 [ 55.442653][ T4997] ? unmap_mapping_range+0xf8/0x290 [ 55.447838][ T4997] ? unmap_mapping_pages+0x180/0x180 [ 55.453102][ T4997] ? current_time+0x1e0/0x300 [ 55.457760][ T4997] ? truncate_setsize+0xcf/0xf0 [ 55.462590][ T4997] hfsplus_setattr+0x1bd/0x280 [ 55.467337][ T4997] ? hfsplus_fileattr_set+0x330/0x330 [ 55.472689][ T4997] notify_change+0xc8b/0xf40 [ 55.477268][ T4997] do_truncate+0x220/0x300 [ 55.481665][ T4997] ? put_page_bootmem+0x2e0/0x2e0 [ 55.486668][ T4997] ? ima_bprm_check+0x2b0/0x2b0 [ 55.491503][ T4997] path_openat+0x294e/0x3170 [ 55.496079][ T4997] ? do_filp_open+0x490/0x490 [ 55.500737][ T4997] do_filp_open+0x234/0x490 [ 55.505217][ T4997] ? vfs_tmpfile+0x4a0/0x4a0 [ 55.509794][ T4997] ? _raw_spin_unlock+0x28/0x40 [ 55.514737][ T4997] ? alloc_fd+0x59c/0x640 [ 55.519615][ T4997] do_sys_openat2+0x13f/0x500 [ 55.524285][ T4997] ? do_sys_open+0x230/0x230 [ 55.528859][ T4997] ? _raw_spin_unlock_irq+0x2e/0x50 [ 55.534044][ T4997] ? ptrace_notify+0x278/0x380 [ 55.538798][ T4997] __x64_sys_creat+0x123/0x160 [ 55.543546][ T4997] ? __x64_compat_sys_openat+0x290/0x290 [ 55.549163][ T4997] ? syscall_enter_from_user_mode+0x32/0x230 [ 55.555124][ T4997] ? syscall_enter_from_user_mode+0x8c/0x230 [ 55.561085][ T4997] do_syscall_64+0x41/0xc0 [ 55.565484][ T4997] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 55.571358][ T4997] RIP: 0033:0x7fc6e993e839 [ 55.575751][ T4997] Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 51 14 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 c0 ff ff ff f7 d8 64 89 01 48 [ 55.595336][ T4997] RSP: 002b:00007ffc42740728 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 [ 55.603739][ T4997] RAX: ffffffffffffffda RBX: 00007fc6e9982060 RCX: 00007fc6e993e839 creat("./file1", 0332) = 5 exit_group(0) = ? +++ exited with 0 +++ [ 55.611702][ T499