./strace-static-x86_64 -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f ./syz-executor2060866381 <...> Warning: Permanently added '10.128.1.100' (ECDSA) to the list of known hosts. execve("./syz-executor2060866381", ["./syz-executor2060866381"], 0x7ffdf7377b80 /* 10 vars */) = 0 brk(NULL) = 0x5555559a7000 brk(0x5555559a7c40) = 0x5555559a7c40 arch_prctl(ARCH_SET_FS, 0x5555559a7300) = 0 uname({sysname="Linux", nodename="syzkaller", ...}) = 0 readlink("/proc/self/exe", "/root/syz-executor2060866381", 4096) = 28 brk(0x5555559c8c40) = 0x5555559c8c40 brk(0x5555559c9000) = 0x5555559c9000 mprotect(0x7f736bfa2000, 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) = 0x7f7363aca000 write(3, "\xeb\x52\x90\x4e\x54\x46\x53\x20\x20\x20\x20\x00\x08\x01\x00\x00\x00\x00\x00\x00\x00\xf8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x80\x00\xff\x03\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\xff\x01\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x02\x00\x00\x00\xbb\x02\x87\x1c\xc7\xbb\xb3\x5e\x00\x00\x00\x00\x0e\x1f\xbe\x71\x7c\xac\x22\xc0\x74\x0b\x56\xb4\x0e\xbb\x07\x00"..., 2097152) = 2097152 munmap(0x7f7363aca000, 2097152) = 0 openat(AT_FDCWD, "/dev/loop0", O_RDWR) = 4 ioctl(4, LOOP_SET_FD, 3) = 0 close(3) = 0 mkdir("./file1", 0777) = 0 mount("/dev/loop0", "./file1", "ntfs3", MS_NODEV|MS_SYNCHRONOUS, "") = 0 openat(AT_FDCWD, "./file1", O_RDONLY|O_DIRECTORY) = 3 chdir("./file1") = 0 ioctl(4, LOOP_CLR_FD) = 0 close(4) = 0 [ 39.452035][ T5000] memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL, pid=5000 'syz-executor206' [ 39.479925][ T5000] loop0: detected capacity change from 0 to 4096 [ 39.490423][ T5000] ntfs3: loop0: Different NTFS sector size (2048) and media sector size (512). [ 39.524230][ T5000] ntfs3: loop0: ino=1b, "file0" ntfs_iget5 [ 39.530336][ T5000] [ 39.532659][ T5000] ============================================ [ 39.538793][ T5000] WARNING: possible recursive locking detected [ 39.544912][ T5000] 6.4.0-rc6-syzkaller-00195-g40f71e7cd3c6 #0 Not tainted [ 39.551906][ T5000] -------------------------------------------- [ 39.558035][ T5000] syz-executor206/5000 is trying to acquire lock: [ 39.564417][ T5000] ffff888077710100 (&ni->ni_lock#2){+.+.}-{3:3}, at: ntfs_set_state+0x1d5/0x700 [ 39.573458][ T5000] [ 39.573458][ T5000] but task is already holding lock: [ 39.580795][ T5000] ffff888077717700 (&ni->ni_lock#2){+.+.}-{3:3}, at: ni_write_inode+0x1c0/0x30e0 [ 39.589905][ T5000] [ 39.589905][ T5000] other info that might help us debug this: [ 39.597939][ T5000] Possible unsafe locking scenario: [ 39.597939][ T5000] [ 39.605362][ T5000] CPU0 [ 39.608617][ T5000] ---- [ 39.611877][ T5000] lock(&ni->ni_lock#2); [ 39.616187][ T5000] lock(&ni->ni_lock#2); [ 39.620509][ T5000] [ 39.620509][ T5000] *** DEADLOCK *** [ 39.620509][ T5000] [ 39.628626][ T5000] May be due to missing lock nesting notation [ 39.628626][ T5000] [ 39.637006][ T5000] 3 locks held by syz-executor206/5000: [ 39.642525][ T5000] #0: ffff88807d56e460 (sb_writers#9){.+.+}-{0:0}, at: vfs_truncate+0xee/0x4c0 [ 39.651551][ T5000] #1: ffff8880777179a0 (&sb->s_type->i_mutex_key#15){+.+.}-{3:3}, at: do_truncate+0x131/0x200 [ 39.661890][ T5000] #2: ffff888077717700 (&ni->ni_lock#2){+.+.}-{3:3}, at: ni_write_inode+0x1c0/0x30e0 [ 39.671437][ T5000] [ 39.671437][ T5000] stack backtrace: [ 39.677299][ T5000] CPU: 0 PID: 5000 Comm: syz-executor206 Not tainted 6.4.0-rc6-syzkaller-00195-g40f71e7cd3c6 #0 [ 39.687686][ T5000] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023 [ 39.697720][ T5000] Call Trace: [ 39.700976][ T5000] [ 39.703885][ T5000] dump_stack_lvl+0xd9/0x150 [ 39.708465][ T5000] __lock_acquire+0x13eb/0x5f30 [ 39.713322][ T5000] ? io_schedule_timeout+0x150/0x150 [ 39.718587][ T5000] ? _find_first_zero_bit+0x94/0xb0 [ 39.723770][ T5000] ? lockdep_hardirqs_on_prepare+0x410/0x410 [ 39.729752][ T5000] ? __lock_acquire+0x28bf/0x5f30 [ 39.734770][ T5000] lock_acquire+0x1b1/0x520 [ 39.739263][ T5000] ? ntfs_set_state+0x1d5/0x700 [ 39.744101][ T5000] ? lock_sync+0x190/0x190 [ 39.748505][ T5000] __mutex_lock+0x12f/0x1350 [ 39.753075][ T5000] ? ntfs_set_state+0x1d5/0x700 [ 39.757910][ T5000] ? current_time+0x79/0x2c0 [ 39.762483][ T5000] ? lock_downgrade+0x690/0x690 [ 39.767323][ T5000] ? ntfs_set_state+0x1d5/0x700 [ 39.772169][ T5000] ? mutex_lock_io_nested+0x11a0/0x11a0 [ 39.777695][ T5000] ? mark_held_locks+0x9f/0xe0 [ 39.782443][ T5000] ? ktime_get_coarse_real_ts64+0x1bb/0x200 [ 39.788326][ T5000] ? lockdep_hardirqs_on+0x7d/0x100 [ 39.793512][ T5000] ? ktime_get_coarse_real_ts64+0x1bb/0x200 [ 39.799475][ T5000] ? ktime_get_coarse_real_ts64+0x15e/0x200 [ 39.805351][ T5000] ntfs_set_state+0x1d5/0x700 [ 39.810012][ T5000] ? do_raw_spin_unlock+0x175/0x230 [ 39.815280][ T5000] ? ntfs_update_mftmirr+0x6a0/0x6a0 [ 39.820552][ T5000] ? make_bad_inode+0xb5/0x1f0 [ 39.825303][ T5000] ntfs_iget5+0x240/0x3670 [ 39.829701][ T5000] ? mi_enum_attr+0x376/0x720 [ 39.834362][ T5000] ? mi_find_attr+0x1e5/0x240 [ 39.839020][ T5000] ? ntfs_write_end+0x980/0x980 [ 39.843848][ T5000] ? ni_load_mi+0x100/0x100 [ 39.848368][ T5000] ? ww_mutex_unlock+0x2f0/0x2f0 [ 39.853298][ T5000] ni_write_inode+0x1893/0x30e0 [ 39.858129][ T5000] ? lock_downgrade+0x690/0x690 [ 39.862981][ T5000] ? ni_is_dirty+0x180/0x180 [ 39.867548][ T5000] ? ktime_get_coarse_real_ts64+0x1bb/0x200 [ 39.873508][ T5000] ? ktime_get_coarse_real_ts64+0x15e/0x200 [ 39.879384][ T5000] ? up_write+0x1b4/0x520 [ 39.883720][ T5000] ntfs3_setattr+0x756/0xc30 [ 39.888456][ T5000] ? ktime_get_coarse_real_ts64+0xb0/0x200 [ 39.894245][ T5000] ? ntfs_extend+0x5c0/0x5c0 [ 39.898832][ T5000] ? from_vfsuid+0x170/0x170 [ 39.903417][ T5000] ? ntfs_extend+0x5c0/0x5c0 [ 39.907983][ T5000] notify_change+0xb2c/0x1180 [ 39.912642][ T5000] ? do_truncate+0x143/0x200 [ 39.917211][ T5000] do_truncate+0x143/0x200 [ 39.921606][ T5000] ? file_open_root+0x460/0x460 [ 39.926432][ T5000] ? common_perm_cond+0x22f/0x830 [ 39.931438][ T5000] ? inode_permission.part.0+0xb5/0x520 [ 39.936981][ T5000] ? __mnt_want_write+0x1fe/0x2e0 [ 39.941983][ T5000] vfs_truncate+0x3df/0x4c0 [ 39.946465][ T5000] do_sys_truncate.part.0+0x11e/0x140 [ 39.951820][ T5000] ? vfs_truncate+0x4c0/0x4c0 [ 39.956475][ T5000] ? _raw_spin_unlock_irq+0x23/0x50 [ 39.961655][ T5000] ? lockdep_hardirqs_on+0x7d/0x100 [ 39.966835][ T5000] ? _raw_spin_unlock_irq+0x2e/0x50 [ 39.972014][ T5000] __x64_sys_truncate+0x6d/0xa0 [ 39.976847][ T5000] do_syscall_64+0x39/0xb0 [ 39.981244][ T5000] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 39.987119][ T5000] RIP: 0033:0x7f736bf16799 [ 39.991509][ T5000] 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 [ 40.011119][ T5000] RSP: 002b:00007ffe73c703f8 EFLAGS: 00000246 ORIG_RAX: 000000000000004c truncate("./file0/file0", 3) = 0 exit_group(0) = ? +++ exited with 0 +++ [ 40.019518][ T5000] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f73