Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.1.120' (ECDSA) to the list of known hosts. executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program syzkaller login: [ 73.878450][ T8596] [ 73.880815][ T8596] ====================================================== [ 73.887862][ T8596] WARNING: possible circular locking dependency detected [ 73.894899][ T8596] 5.13.0-rc6-syzkaller #0 Not tainted [ 73.900269][ T8596] ------------------------------------------------------ [ 73.907283][ T8596] systemd-udevd/8596 is trying to acquire lock: [ 73.913624][ T8596] ffffffff8ca6dd28 (loop_ctl_mutex){+.+.}-{3:3}, at: loop_probe+0xc7/0x150 [ 73.922237][ T8596] [ 73.922237][ T8596] but task is already holding lock: [ 73.929579][ T8596] ffffffff8c7e02a8 (major_names_lock){+.+.}-{3:3}, at: blk_request_module+0x25/0x1d0 [ 73.939085][ T8596] [ 73.939085][ T8596] which lock already depends on the new lock. [ 73.939085][ T8596] [ 73.949466][ T8596] [ 73.949466][ T8596] the existing dependency chain (in reverse order) is: [ 73.958559][ T8596] [ 73.958559][ T8596] -> #3 (major_names_lock){+.+.}-{3:3}: [ 73.966280][ T8596] __mutex_lock+0x139/0x10c0 [ 73.971392][ T8596] __register_blkdev+0x2b/0x3e0 [ 73.976748][ T8596] register_mtd_blktrans+0x85/0x3c0 [ 73.982454][ T8596] do_one_initcall+0x103/0x650 [ 73.987722][ T8596] kernel_init_freeable+0x6c4/0x74d [ 73.993445][ T8596] kernel_init+0xd/0x1b8 [ 73.998192][ T8596] ret_from_fork+0x1f/0x30 [ 74.003113][ T8596] [ 74.003113][ T8596] -> #2 (mtd_table_mutex){+.+.}-{3:3}: [ 74.010735][ T8596] __mutex_lock+0x139/0x10c0 [ 74.015834][ T8596] blktrans_open+0x69/0x600 [ 74.020844][ T8596] __blkdev_get+0x182/0xa30 [ 74.025868][ T8596] blkdev_get_by_dev+0x200/0x660 [ 74.031316][ T8596] blkdev_open+0x154/0x2b0 [ 74.036237][ T8596] do_dentry_open+0x4b9/0x11b0 [ 74.041508][ T8596] path_openat+0x1c0e/0x27e0 [ 74.046606][ T8596] do_filp_open+0x190/0x3d0 [ 74.051631][ T8596] do_sys_openat2+0x16d/0x420 [ 74.056825][ T8596] __x64_sys_open+0x119/0x1c0 [ 74.062007][ T8596] do_syscall_64+0x3a/0xb0 [ 74.066932][ T8596] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 74.073507][ T8596] [ 74.073507][ T8596] -> #1 (&bdev->bd_mutex){+.+.}-{3:3}: [ 74.081127][ T8596] __mutex_lock+0x139/0x10c0 [ 74.086227][ T8596] del_gendisk+0x24b/0xa00 [ 74.091151][ T8596] loop_control_ioctl+0x3e7/0x4c0 [ 74.096691][ T8596] __do_compat_sys_ioctl+0x1c7/0x290 [ 74.102480][ T8596] __do_fast_syscall_32+0x67/0xe0 [ 74.108012][ T8596] do_fast_syscall_32+0x2f/0x70 [ 74.113367][ T8596] entry_SYSENTER_compat_after_hwframe+0x4d/0x5c [ 74.120199][ T8596] [ 74.120199][ T8596] -> #0 (loop_ctl_mutex){+.+.}-{3:3}: [ 74.127738][ T8596] __lock_acquire+0x2a17/0x5230 [ 74.133116][ T8596] lock_acquire+0x1ab/0x740 [ 74.138130][ T8596] __mutex_lock+0x139/0x10c0 [ 74.143251][ T8596] loop_probe+0xc7/0x150 [ 74.148015][ T8596] blk_request_module+0x111/0x1d0 [ 74.153564][ T8596] blkdev_get_no_open+0x1d8/0x250 [ 74.159140][ T8596] blkdev_get_by_dev+0x76/0x660 [ 74.164529][ T8596] blkdev_open+0x154/0x2b0 [ 74.169452][ T8596] do_dentry_open+0x4b9/0x11b0 [ 74.174726][ T8596] path_openat+0x1c0e/0x27e0 [ 74.179845][ T8596] do_filp_open+0x190/0x3d0 [ 74.185216][ T8596] do_sys_openat2+0x16d/0x420 [ 74.190399][ T8596] __x64_sys_open+0x119/0x1c0 [ 74.195598][ T8596] do_syscall_64+0x3a/0xb0 [ 74.200534][ T8596] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 74.206936][ T8596] [ 74.206936][ T8596] other info that might help us debug this: [ 74.206936][ T8596] [ 74.217236][ T8596] Chain exists of: [ 74.217236][ T8596] loop_ctl_mutex --> mtd_table_mutex --> major_names_lock [ 74.217236][ T8596] [ 74.230244][ T8596] Possible unsafe locking scenario: [ 74.230244][ T8596] [ 74.237684][ T8596] CPU0 CPU1 [ 74.243031][ T8596] ---- ---- [ 74.248391][ T8596] lock(major_names_lock); [ 74.252874][ T8596] lock(mtd_table_mutex); [ 74.259814][ T8596] lock(major_names_lock); [ 74.266814][ T8596] lock(loop_ctl_mutex); [ 74.271123][ T8596] [ 74.271123][ T8596] *** DEADLOCK *** [ 74.271123][ T8596] [ 74.279256][ T8596] 1 lock held by systemd-udevd/8596: [ 74.284539][ T8596] #0: ffffffff8c7e02a8 (major_names_lock){+.+.}-{3:3}, at: blk_request_module+0x25/0x1d0 [ 74.294464][ T8596] [ 74.294464][ T8596] stack backtrace: [ 74.300334][ T8596] CPU: 0 PID: 8596 Comm: systemd-udevd Not tainted 5.13.0-rc6-syzkaller #0 [ 74.308920][ T8596] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 74.318958][ T8596] Call Trace: [ 74.322244][ T8596] dump_stack+0x141/0x1d7 [ 74.326579][ T8596] check_noncircular+0x25f/0x2e0 [ 74.331608][ T8596] ? print_circular_bug+0x1e0/0x1e0 [ 74.336806][ T8596] ? mark_lock+0xef/0x17b0 [ 74.341227][ T8596] ? lockdep_lock+0xc6/0x200 [ 74.345801][ T8596] ? call_rcu_zapped+0xb0/0xb0 [ 74.350550][ T8596] ? tomoyo_check_open_permission+0x172/0x380 [ 74.356616][ T8596] ? security_file_open+0x52/0x4f0 [ 74.361721][ T8596] __lock_acquire+0x2a17/0x5230 [ 74.366683][ T8596] ? lockdep_hardirqs_on_prepare+0x400/0x400 [ 74.372690][ T8596] lock_acquire+0x1ab/0x740 [ 74.377217][ T8596] ? loop_probe+0xc7/0x150 [ 74.381747][ T8596] ? lock_release+0x720/0x720 [ 74.386418][ T8596] __mutex_lock+0x139/0x10c0 [ 74.391087][ T8596] ? loop_probe+0xc7/0x150 [ 74.395493][ T8596] ? loop_probe+0xc7/0x150 [ 74.399906][ T8596] ? mutex_lock_io_nested+0xf20/0xf20 [ 74.405267][ T8596] ? __mutex_lock+0x5d5/0x10c0 [ 74.410052][ T8596] ? blk_request_module+0x25/0x1d0 [ 74.415156][ T8596] ? find_held_lock+0x2d/0x110 [ 74.419924][ T8596] ? mutex_lock_io_nested+0xf20/0xf20 [ 74.425303][ T8596] ? ilookup+0xb3/0x230 [ 74.429450][ T8596] loop_probe+0xc7/0x150 [ 74.433712][ T8596] ? loop_control_ioctl+0x4c0/0x4c0 [ 74.438917][ T8596] ? find_inode_fast+0x16f/0x220 [ 74.443843][ T8596] ? do_raw_spin_unlock+0x171/0x230 [ 74.449051][ T8596] ? loop_control_ioctl+0x4c0/0x4c0 [ 74.454237][ T8596] blk_request_module+0x111/0x1d0 [ 74.459251][ T8596] blkdev_get_no_open+0x1d8/0x250 [ 74.464277][ T8596] blkdev_get_by_dev+0x76/0x660 [ 74.469128][ T8596] blkdev_open+0x154/0x2b0 [ 74.473546][ T8596] do_dentry_open+0x4b9/0x11b0 [ 74.478297][ T8596] ? blkdev_get_by_dev+0x660/0x660 [ 74.483402][ T8596] ? may_open+0x1f6/0x420 [ 74.487747][ T8596] path_openat+0x1c0e/0x27e0 [ 74.492323][ T8596] ? path_lookupat+0x850/0x850 [ 74.497112][ T8596] ? lockdep_hardirqs_on_prepare+0x400/0x400 [ 74.503124][ T8596] do_filp_open+0x190/0x3d0 [ 74.507622][ T8596] ? may_open_dev+0xf0/0xf0 [ 74.512135][ T8596] ? do_raw_spin_lock+0x120/0x2b0 [ 74.517256][ T8596] ? rwlock_bug.part.0+0x90/0x90 [ 74.522184][ T8596] ? __sanitizer_cov_trace_const_cmp8+0x1d/0x70 [ 74.528492][ T8596] ? _find_next_bit+0x1e3/0x260 [ 74.533454][ T8596] ? _raw_spin_unlock+0x24/0x40 [ 74.538292][ T8596] ? alloc_fd+0x2e6/0x660 [ 74.542679][ T8596] do_sys_openat2+0x16d/0x420 [ 74.547345][ T8596] ? build_open_flags+0x6f0/0x6f0 [ 74.552355][ T8596] ? __context_tracking_exit+0xb8/0xe0 [ 74.557900][ T8596] __x64_sys_open+0x119/0x1c0 [ 74.562624][ T8596] ? do_sys_open+0x140/0x140 [ 74.567201][ T8596] ? __secure_computing+0x104/0x360 [ 74.572394][ T8596] do_syscall_64+0x3a/0xb0 [ 74.576829][ T8596] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 74.582722][ T8596] RIP: 0033:0x7fc0a1f64840 [ 74.587144][ T8596] Code: 73 01 c3 48 8b 0d 68 77 20 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 83 3d 89 bb 20 00 00 75 10 b8 02 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 1e f6 ff ff 48 89 04 24 [ 74.606744][ T8596] RSP: 002b:00007ffe4dcb6c28 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 [ 74.615583][ T8596] RAX: ffffffffffffffda RBX: 00005647c06a0810 RCX: 00007fc0a1f64840 [ 74.623562][ T8596] RDX: 00005647bfc80fe3 RSI: 00000000000a0800 RDI: 00005647c06a51b0 [ 74.631538][ T8596] RBP: 00007ffe4dcb6da0 R08: 00005647bfc80670 R09: 0000000000000010 [ 74.639503][ T8596] R10: 00005647bfc80d0c R11: 0000000000000246 R12: 00007ffe4dcb6cf0 [ 74.647485][ T8596] R13: 00005647c06a6e10 R14: 0000000000000003 R15: 000000000000000e executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program