./strace-static-x86_64 -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f ./syz-executor4044273660 <...> Warning: Permanently added '10.128.10.6' (ECDSA) to the list of known hosts. execve("./syz-executor4044273660", ["./syz-executor4044273660"], 0x7ffeda559870 /* 10 vars */) = 0 brk(NULL) = 0x555556d94000 brk(0x555556d94c40) = 0x555556d94c40 arch_prctl(ARCH_SET_FS, 0x555556d94300) = 0 uname({sysname="Linux", nodename="syzkaller", ...}) = 0 readlink("/proc/self/exe", "/root/syz-executor4044273660", 4096) = 28 brk(0x555556db5c40) = 0x555556db5c40 brk(0x555556db6000) = 0x555556db6000 mprotect(0x7f35bada6000, 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) = 0x7f35b28ec000 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(0x7f35b28ec000, 524288) = 0 openat(AT_FDCWD,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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") = 0 ioctl(4, LOOP_CLR_FD) = 0 close(4) = 0 mknodat(AT_FDCWD, "./file0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", 000) = 0 open("./file0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", O_RDONLY) = 4 unlink("./file0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") = 0 [ 43.623034][ T4999] memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL, pid=4999 'syz-executor404' [ 43.640828][ T4999] loop0: detected capacity change from 0 to 1024 [ 43.669370][ T4999] [ 43.671732][ T4999] ====================================================== [ 43.678757][ T4999] WARNING: possible circular locking dependency detected [ 43.685774][ T4999] 6.4.0-syzkaller-01406-ge8f75c0270d9 #0 Not tainted [ 43.692464][ T4999] ------------------------------------------------------ [ 43.699459][ T4999] syz-executor404/4999 is trying to acquire lock: [ 43.705849][ T4999] ffff8880222a20b0 (&tree->tree_lock){+.+.}-{3:3}, at: hfsplus_file_truncate+0xe93/0x10e0 [ 43.715763][ T4999] [ 43.715763][ T4999] but task is already holding lock: [ 43.723100][ T4999] ffff88807d1107c8 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_truncate+0x205/0x10e0 [ 43.734296][ T4999] [ 43.734296][ T4999] which lock already depends on the new lock. [ 43.734296][ T4999] [ 43.744694][ T4999] [ 43.744694][ T4999] the existing dependency chain (in reverse order) is: [ 43.753705][ T4999] [ 43.753705][ T4999] -> #1 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}: [ 43.762718][ T4999] __mutex_lock+0x12f/0x1350 [ 43.767852][ T4999] hfsplus_file_extend+0x1bf/0xf90 [ 43.773497][ T4999] hfsplus_bmap_reserve+0x31c/0x410 [ 43.779210][ T4999] hfsplus_rename_cat+0x271/0x1270 [ 43.784837][ T4999] hfsplus_unlink+0x4ad/0x830 [ 43.790024][ T4999] vfs_unlink+0x355/0x930 [ 43.794861][ T4999] do_unlinkat+0x3e3/0x680 [ 43.799787][ T4999] __x64_sys_unlink+0xca/0x110 [ 43.805057][ T4999] do_syscall_64+0x39/0xb0 [ 43.809984][ T4999] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 43.816390][ T4999] [ 43.816390][ T4999] -> #0 (&tree->tree_lock){+.+.}-{3:3}: [ 43.824104][ T4999] __lock_acquire+0x2fcd/0x5f30 [ 43.829472][ T4999] lock_acquire+0x1b1/0x520 [ 43.834488][ T4999] __mutex_lock+0x12f/0x1350 [ 43.839592][ T4999] hfsplus_file_truncate+0xe93/0x10e0 [ 43.845507][ T4999] hfsplus_setattr+0x1f2/0x320 [ 43.850801][ T4999] notify_change+0xb2c/0x1180 [ 43.856000][ T4999] do_truncate+0x143/0x200 [ 43.860937][ T4999] path_openat+0x2047/0x2710 [ 43.866049][ T4999] do_filp_open+0x1ba/0x410 [ 43.871063][ T4999] do_sys_openat2+0x16d/0x510 [ 43.876274][ T4999] __x64_sys_creat+0xcd/0x120 [ 43.881466][ T4999] do_syscall_64+0x39/0xb0 [ 43.886396][ T4999] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 43.892805][ T4999] [ 43.892805][ T4999] other info that might help us debug this: [ 43.892805][ T4999] [ 43.903023][ T4999] Possible unsafe locking scenario: [ 43.903023][ T4999] [ 43.910458][ T4999] CPU0 CPU1 [ 43.915805][ T4999] ---- ---- [ 43.921153][ T4999] lock(&HFSPLUS_I(inode)->extents_lock); [ 43.926952][ T4999] lock(&tree->tree_lock); [ 43.933962][ T4999] lock(&HFSPLUS_I(inode)->extents_lock); [ 43.942269][ T4999] lock(&tree->tree_lock); [ 43.946752][ T4999] [ 43.946752][ T4999] *** DEADLOCK *** [ 43.946752][ T4999] [ 43.954874][ T4999] 3 locks held by syz-executor404/4999: [ 43.960396][ T4999] #0: ffff8880222a0460 (sb_writers#9){.+.+}-{0:0}, at: path_openat+0x1959/0x2710 [ 43.969619][ T4999] #1: ffff88807d1109c0 (&sb->s_type->i_mutex_key#15){+.+.}-{3:3}, at: do_truncate+0x131/0x200 [ 43.979965][ T4999] #2: ffff88807d1107c8 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_truncate+0x205/0x10e0 [ 43.991610][ T4999] [ 43.991610][ T4999] stack backtrace: [ 43.997480][ T4999] CPU: 1 PID: 4999 Comm: syz-executor404 Not tainted 6.4.0-syzkaller-01406-ge8f75c0270d9 #0 [ 44.007534][ T4999] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023 [ 44.017585][ T4999] Call Trace: [ 44.020853][ T4999] [ 44.023774][ T4999] dump_stack_lvl+0xd9/0x150 [ 44.028360][ T4999] check_noncircular+0x25f/0x2e0 [ 44.033288][ T4999] ? register_lock_class+0xbe/0x1120 [ 44.038562][ T4999] ? print_circular_bug+0x730/0x730 [ 44.043751][ T4999] __lock_acquire+0x2fcd/0x5f30 [ 44.048593][ T4999] ? lockdep_hardirqs_on_prepare+0x410/0x410 [ 44.054567][ T4999] ? find_held_lock+0x2d/0x110 [ 44.059315][ T4999] lock_acquire+0x1b1/0x520 [ 44.063810][ T4999] ? hfsplus_file_truncate+0xe93/0x10e0 [ 44.069347][ T4999] ? lock_sync+0x190/0x190 [ 44.073761][ T4999] __mutex_lock+0x12f/0x1350 [ 44.078344][ T4999] ? hfsplus_file_truncate+0xe93/0x10e0 [ 44.083886][ T4999] ? hfsplus_file_truncate+0xe93/0x10e0 [ 44.089425][ T4999] ? _raw_spin_unlock+0x28/0x40 [ 44.094264][ T4999] ? mutex_lock_io_nested+0x11a0/0x11a0 [ 44.099804][ T4999] ? hfsplus_block_free+0x2e3/0x530 [ 44.104994][ T4999] ? hfsplus_free_extents+0x152/0x510 [ 44.110377][ T4999] hfsplus_file_truncate+0xe93/0x10e0 [ 44.115740][ T4999] ? hfsplus_get_block+0x9b0/0x9b0 [ 44.120848][ T4999] ? unmap_mapping_pages+0x280/0x280 [ 44.126122][ T4999] ? setattr_prepare+0x140/0x9b0 [ 44.131053][ T4999] hfsplus_setattr+0x1f2/0x320 [ 44.135809][ T4999] ? hfsplus_file_fsync+0x5d0/0x5d0 [ 44.140997][ T4999] notify_change+0xb2c/0x1180 [ 44.145670][ T4999] ? do_truncate+0x143/0x200 [ 44.150250][ T4999] do_truncate+0x143/0x200 [ 44.154657][ T4999] ? file_open_root+0x460/0x460 [ 44.159495][ T4999] ? common_perm_cond+0x22f/0x830 [ 44.164504][ T4999] ? hfsplus_getattr+0x2e0/0x2e0 [ 44.169433][ T4999] path_openat+0x2047/0x2710 [ 44.174102][ T4999] ? path_lookupat+0x840/0x840 [ 44.178853][ T4999] do_filp_open+0x1ba/0x410 [ 44.183346][ T4999] ? may_open_dev+0xf0/0xf0 [ 44.187870][ T4999] ? find_held_lock+0x2d/0x110 [ 44.192621][ T4999] ? do_raw_spin_lock+0x124/0x2b0 [ 44.197633][ T4999] ? spin_bug+0x1c0/0x1c0 [ 44.202038][ T4999] ? _raw_spin_unlock+0x28/0x40 [ 44.206904][ T4999] ? alloc_fd+0x2e4/0x750 [ 44.211242][ T4999] do_sys_openat2+0x16d/0x510 [ 44.215933][ T4999] ? ptrace_stop.part.0+0x60f/0x8e0 [ 44.221135][ T4999] ? find_held_lock+0x2d/0x110 [ 44.225891][ T4999] ? build_open_flags+0x720/0x720 [ 44.230915][ T4999] ? ptrace_notify+0xfe/0x140 [ 44.235584][ T4999] ? lock_downgrade+0x690/0x690 [ 44.240426][ T4999] __x64_sys_creat+0xcd/0x120 [ 44.245098][ T4999] ? __x64_compat_sys_openat+0x1f0/0x1f0 [ 44.250724][ T4999] ? _raw_spin_unlock_irq+0x2e/0x50 [ 44.255908][ T4999] ? ptrace_notify+0xfe/0x140 [ 44.260578][ T4999] ? syscall_trace_enter.constprop.0+0xb0/0x1e0 [ 44.266811][ T4999] do_syscall_64+0x39/0xb0 [ 44.271219][ T4999] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 44.277100][ T4999] RIP: 0033:0x7f35bad38869 [ 44.281536][ T4999] 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 [ 44.301145][ T4999] RSP: 002b:00007ffd25854c88 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 [ 44.309546][ T4999] RAX: ffffffffffffffda RBX: 00007f35bad7c060 RCX: 00007f35bad38869 creat("./file1", 000) = 5 exit_group(0) = ? +++ exited with 0 +++ [ 44.317502][ T4999] RDX: 00007f35bad38869 RSI: 000000