./strace-static-x86_64 -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f ./syz-executor813187936 <...> Warning: Permanently added '10.128.0.22' (ED25519) to the list of known hosts. execve("./syz-executor813187936", ["./syz-executor813187936"], 0x7ffcd91f5be0 /* 10 vars */) = 0 brk(NULL) = 0x555573d14000 brk(0x555573d14d00) = 0x555573d14d00 arch_prctl(ARCH_SET_FS, 0x555573d14380) = 0 set_tid_address(0x555573d14650) = 5231 set_robust_list(0x555573d14660, 24) = 0 rseq(0x555573d14ca0, 0x20, 0, 0x53053053) = 0 prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0 readlink("/proc/self/exe", "/root/syz-executor813187936", 4096) = 27 getrandom("\xfb\x96\xe0\x08\x82\x26\x6a\x9d", 8, GRND_NONBLOCK) = 8 brk(NULL) = 0x555573d14d00 brk(0x555573d35d00) = 0x555573d35d00 brk(0x555573d36000) = 0x555573d36000 mprotect(0x7f355e366000, 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 unshare(CLONE_NEWPID) = 0 clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD./strace-static-x86_64: Process 5232 attached [pid 5232] set_robust_list(0x555573d14660, 24 [pid 5231] <... clone resumed>, child_tidptr=0x555573d14650) = 5232 [pid 5232] <... set_robust_list resumed>) = 0 [pid 5232] prctl(PR_SET_PDEATHSIG, SIGKILL) = 0 [pid 5232] setsid() = 1 [pid 5232] prlimit64(0, RLIMIT_AS, {rlim_cur=204800*1024, rlim_max=204800*1024}, NULL) = 0 [pid 5232] prlimit64(0, RLIMIT_MEMLOCK, {rlim_cur=32768*1024, rlim_max=32768*1024}, NULL) = 0 [pid 5232] prlimit64(0, RLIMIT_FSIZE, {rlim_cur=139264*1024, rlim_max=139264*1024}, NULL) = 0 [pid 5232] prlimit64(0, RLIMIT_STACK, {rlim_cur=1024*1024, rlim_max=1024*1024}, NULL) = 0 [pid 5232] prlimit64(0, RLIMIT_CORE, {rlim_cur=131072*1024, rlim_max=131072*1024}, NULL) = 0 [pid 5232] prlimit64(0, RLIMIT_NOFILE, {rlim_cur=256, rlim_max=256}, NULL) = 0 [pid 5232] unshare(CLONE_NEWNS) = 0 [pid 5232] mount(NULL, "/", NULL, MS_REC|MS_PRIVATE, NULL) = 0 [pid 5232] unshare(CLONE_NEWIPC) = 0 [pid 5232] unshare(CLONE_NEWCGROUP) = 0 [pid 5232] unshare(CLONE_NEWUTS) = 0 [pid 5232] unshare(CLONE_SYSVSEM) = 0 [pid 5232] openat(AT_FDCWD, "/proc/sys/kernel/shmmax", O_WRONLY|O_CLOEXEC) = 3 [pid 5232] write(3, "16777216", 8) = 8 [pid 5232] close(3) = 0 [pid 5232] openat(AT_FDCWD, "/proc/sys/kernel/shmall", O_WRONLY|O_CLOEXEC) = 3 [pid 5232] write(3, "536870912", 9) = 9 [pid 5232] close(3) = 0 [pid 5232] openat(AT_FDCWD, "/proc/sys/kernel/shmmni", O_WRONLY|O_CLOEXEC) = 3 [pid 5232] write(3, "1024", 4) = 4 [pid 5232] close(3) = 0 [pid 5232] openat(AT_FDCWD, "/proc/sys/kernel/msgmax", O_WRONLY|O_CLOEXEC) = 3 [pid 5232] write(3, "8192", 4) = 4 [pid 5232] close(3) = 0 [pid 5232] openat(AT_FDCWD, "/proc/sys/kernel/msgmni", O_WRONLY|O_CLOEXEC) = 3 [pid 5232] write(3, "1024", 4) = 4 [pid 5232] close(3) = 0 [pid 5232] openat(AT_FDCWD, "/proc/sys/kernel/msgmnb", O_WRONLY|O_CLOEXEC) = 3 [pid 5232] write(3, "1024", 4) = 4 [pid 5232] close(3) = 0 [pid 5232] openat(AT_FDCWD, "/proc/sys/kernel/sem", O_WRONLY|O_CLOEXEC) = 3 [pid 5232] write(3, "1024 1048576 500 1024", 21) = 21 [pid 5232] close(3) = 0 [pid 5232] getpid() = 1 [pid 5232] capget({version=_LINUX_CAPABILITY_VERSION_3, pid=1}, {effective=1<mmap_lock){++++}-{3:3}, at: upgrade_mmap_lock_carefully+0xb6/0x160 [ 70.879656][ T5232] [ 70.879656][ T5232] but task is already holding lock: [ 70.887022][ T5232] ffff888022786b48 (&sb->s_type->i_mutex_key#12){+.+.}-{3:3}, at: shmem_file_write_iter+0x80/0x120 [ 70.897761][ T5232] [ 70.897761][ T5232] which lock already depends on the new lock. [ 70.897761][ T5232] [ 70.908180][ T5232] [ 70.908180][ T5232] the existing dependency chain (in reverse order) is: [ 70.917488][ T5232] [ 70.917488][ T5232] -> #1 (&sb->s_type->i_mutex_key#12){+.+.}-{3:3}: [ 70.926222][ T5232] lock_acquire+0x1ed/0x550 [ 70.931261][ T5232] down_write+0x99/0x220 [ 70.936037][ T5232] process_measurement+0x439/0x1fb0 [ 70.941806][ T5232] ima_file_mmap+0x13d/0x2b0 [ 70.946935][ T5232] security_mmap_file+0x7e7/0xa40 [ 70.952502][ T5232] __se_sys_remap_file_pages+0x6e6/0xa50 [ 70.958662][ T5232] do_syscall_64+0xf3/0x230 [ 70.963699][ T5232] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 70.970133][ T5232] [ 70.970133][ T5232] -> #0 (&mm->mmap_lock){++++}-{3:3}: [ 70.977815][ T5232] validate_chain+0x18ef/0x5920 [ 70.983194][ T5232] __lock_acquire+0x1384/0x2050 [ 70.988586][ T5232] lock_acquire+0x1ed/0x550 [ 70.993628][ T5232] down_write_killable+0xab/0x260 [ 70.999181][ T5232] upgrade_mmap_lock_carefully+0xb6/0x160 [ 71.005626][ T5232] lock_mm_and_find_vma+0x107/0x2f0 [ 71.011365][ T5232] exc_page_fault+0x1bf/0x8c0 [ 71.016594][ T5232] asm_exc_page_fault+0x26/0x30 [ 71.021983][ T5232] fault_in_readable+0x165/0x2b0 [ 71.027453][ T5232] fault_in_iov_iter_readable+0x229/0x280 [ 71.033719][ T5232] generic_perform_write+0x259/0x6d0 [ 71.039529][ T5232] shmem_file_write_iter+0xf9/0x120 [ 71.045253][ T5232] vfs_write+0xa6d/0xc90 [ 71.050107][ T5232] ksys_write+0x183/0x2b0 [ 71.055129][ T5232] do_syscall_64+0xf3/0x230 [ 71.060362][ T5232] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 71.066871][ T5232] [ 71.066871][ T5232] other info that might help us debug this: [ 71.066871][ T5232] [ 71.077108][ T5232] Possible unsafe locking scenario: [ 71.077108][ T5232] [ 71.084566][ T5232] CPU0 CPU1 [ 71.090042][ T5232] ---- ---- [ 71.095494][ T5232] lock(&sb->s_type->i_mutex_key#12); [ 71.100983][ T5232] lock(&mm->mmap_lock); [ 71.108279][ T5232] lock(&sb->s_type->i_mutex_key#12); [ 71.116291][ T5232] lock(&mm->mmap_lock); [ 71.120622][ T5232] [ 71.120622][ T5232] *** DEADLOCK *** [ 71.120622][ T5232] [ 71.128760][ T5232] 2 locks held by syz-executor813/5232: [ 71.134381][ T5232] #0: ffff88807b202420 (sb_writers#5){.+.+}-{0:0}, at: vfs_write+0x224/0xc90 [ 71.143289][ T5232] #1: ffff888022786b48 (&sb->s_type->i_mutex_key#12){+.+.}-{3:3}, at: shmem_file_write_iter+0x80/0x120 [ 71.154466][ T5232] [ 71.154466][ T5232] stack backtrace: [ 71.160364][ T5232] CPU: 0 UID: 0 PID: 5232 Comm: syz-executor813 Not tainted 6.12.0-rc1-syzkaller-00031-ge32cde8d2bd7 #0 [ 71.171488][ T5232] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 [ 71.181727][ T5232] Call Trace: [ 71.185006][ T5232] [ 71.187938][ T5232] dump_stack_lvl+0x241/0x360 [ 71.192631][ T5232] ? __pfx_dump_stack_lvl+0x10/0x10 [ 71.197828][ T5232] ? __pfx__printk+0x10/0x10 [ 71.202446][ T5232] print_circular_bug+0x13a/0x1b0 [ 71.207474][ T5232] check_noncircular+0x36a/0x4a0 [ 71.212412][ T5232] ? __pfx_validate_chain+0x10/0x10 [ 71.217698][ T5232] ? __pfx_check_noncircular+0x10/0x10 [ 71.223158][ T5232] ? lockdep_lock+0x123/0x2b0 [ 71.227839][ T5232] ? validate_chain+0x11e/0x5920 [ 71.232796][ T5232] validate_chain+0x18ef/0x5920 [ 71.237647][ T5232] ? __pfx_validate_chain+0x10/0x10 [ 71.242849][ T5232] ? validate_chain+0x11e/0x5920 [ 71.247797][ T5232] ? __pfx_validate_chain+0x10/0x10 [ 71.253098][ T5232] ? __pfx_validate_chain+0x10/0x10 [ 71.258317][ T5232] ? mark_lock+0x9a/0x360 [ 71.262663][ T5232] ? __lock_acquire+0x1384/0x2050 [ 71.267787][ T5232] ? mark_lock+0x9a/0x360 [ 71.272123][ T5232] __lock_acquire+0x1384/0x2050 [ 71.277000][ T5232] lock_acquire+0x1ed/0x550 [ 71.281519][ T5232] ? upgrade_mmap_lock_carefully+0xb6/0x160 [ 71.287420][ T5232] ? __pfx_lock_acquire+0x10/0x10 [ 71.292449][ T5232] ? __pfx___might_resched+0x10/0x10 [ 71.297786][ T5232] ? cmp_ex_search+0x74/0xa0 [ 71.302381][ T5232] ? bsearch+0x98/0xc0 [ 71.306456][ T5232] down_write_killable+0xab/0x260 [ 71.311485][ T5232] ? upgrade_mmap_lock_carefully+0xb6/0x160 [ 71.317477][ T5232] ? upgrade_mmap_lock_carefully+0xb6/0x160 [ 71.323396][ T5232] ? __pfx_down_write_killable+0x10/0x10 [ 71.329032][ T5232] ? fault_in_readable+0x165/0x2b0 [ 71.334260][ T5232] ? find_vma+0xf9/0x170 [ 71.338529][ T5232] ? __pfx_find_vma+0x10/0x10 [ 71.343312][ T5232] ? fault_in_readable+0x165/0x2b0 [ 71.348462][ T5232] upgrade_mmap_lock_carefully+0xb6/0x160 [ 71.354334][ T5232] lock_mm_and_find_vma+0x107/0x2f0 [ 71.359634][ T5232] exc_page_fault+0x1bf/0x8c0 [ 71.364410][ T5232] ? reacquire_held_locks+0x3eb/0x690 [ 71.369813][ T5232] asm_exc_page_fault+0x26/0x30 [ 71.374717][ T5232] RIP: 0010:fault_in_readable+0x165/0x2b0 [ 71.380837][ T5232] Code: b3 ff 4c 8d b3 ff 0f 00 00 48 89 d8 4d 01 e6 49 81 e6 00 f0 ff ff 49 39 c6 72 6b e8 65 ca b3 ff 4c 39 f3 74 6e 4c 89 64 24 10 <44> 8a 23 43 0f b6 04 2f 84 c0 75 18 44 88 64 24 40 48 81 c3 00 10 [ 71.400467][ T5232] RSP: 0018:ffffc90003c3fa40 EFLAGS: 00050287 [ 71.406536][ T5232] RAX: ffffffff81e1114b RBX: 0000000020001000 RCX: ffff88801cf78000 [ 71.414526][ T5232] RDX: 0000000000000000 RSI: 0000000000000100 RDI: 0000000000000000 [ 71.422529][ T5232] RBP: ffffc90003c3faf8 R08: ffffffff81e110e8 R09: ffffffff84b94759 [ 71.430499][ T5232] R10: 0000000000000002 R11: ffff88801cf78000 R12: 000000000000fecc [ 71.438726][ T5232] R13: dffffc0000000000 R14: 0000000020010000 R15: 1ffff92000787f50 [ 71.446714][ T5232] ? fault_in_iov_iter_readable+0x49/0x280 [ 71.452527][ T5232] ? fault_in_readable+0xf8/0x2b0 [ 71.457557][ T5232] ? fault_in_readable+0x15b/0x2b0 [ 71.462693][ T5232] ? __pfx_fault_in_readable+0x10/0x10 [ 71.468181][ T5232] ? inode_to_bdi+0x69/0xf0 [ 71.472694][ T5232] fault_in_iov_iter_readable+0x229/0x280 [ 71.478417][ T5232] generic_perform_write+0x259/0x6d0 [ 71.483733][ T5232] ? __pfx_generic_perform_write+0x10/0x10 [ 71.489538][ T5232] ? mnt_put_write_access_file+0xbf/0x100 [ 71.495269][ T5232] ? file_update_time+0x3be/0x430 [ 71.500316][ T5232] shmem_file_write_iter+0xf9/0x120 [ 71.505523][ T5232] vfs_write+0xa6d/0xc90 [ 71.509760][ T5232] ? __pfx_shmem_file_write_iter+0x10/0x10 [ 71.515611][ T5232] ? __pfx_vfs_write+0x10/0x10 [ 71.520376][ T5232] ? _raw_spin_unlock_irq+0x2e/0x50 [ 71.525928][ T5232] ? fdget_pos+0x265/0x320 [ 71.530350][ T5232] ksys_write+0x183/0x2b0 [ 71.534690][ T5232] ? __pfx_ksys_write+0x10/0x10 [ 71.539536][ T5232] ? do_syscall_64+0x100/0x230 [ 71.544299][ T5232] do_syscall_64+0xf3/0x230 [ 71.548817][ T5232] ? clear_bhb_loop+0x35/0x90 [ 71.553491][ T5232] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 71.559477][ T5232] RIP: 0033:0x7f355e2f2a19 [ 71.564164][ T5232] Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 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 [ 71.584218][ T5232] RSP: 002b:00007ffdd6291a88 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 71.593257][ T5232] RAX: ffffffffffffffda RBX: 00007f355e33c11f RCX: 00007f355e2f2a19 [ 71.601863][ T5232] RDX: 000000000000fecc RSI: 0000000020000100 RDI: 0000000000000003 [pid 5232] write(3, "\x23\x21\x20\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"..., 65228) = 65228 [pid 5232] exit_group(1) = ? [pid 5232] +++ exited with 1 +++ --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=5232, si_uid=0, si_status=1, si_utime=0, si_stime=28 /* 0.28 s */} --- exit_group(0) = ? [ 71.610111][ T5232] RBP: 00007f355e33c0fd R08: 0000000000000000 R09: 0000000000000000 [ 71.618183][ T5232] R10: 0000000020005000 R11: 0000000000000246 R12: 00007f355e34113c [ 71.626176][ T5232] R13: 00007f355e33c082 R14: 0000000000000001 R15: 0000000000000001 [ 71.634256][ T5232] +++ exited with 0 +++