[....] Starting enhanced syslogd: rsyslogd[ 13.014579] audit: type=1400 audit(1518219332.057:4): avc: denied { syslog } for pid=3652 comm="rsyslogd" capability=34 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=capability2 permissive=1 [?25l[?1c7[ ok 8[?25h[?0c. [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. Starting mcstransd: [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.0.38' (ECDSA) to the list of known hosts. executing program executing program syzkaller login: [ 24.832172] [ 24.833821] ====================================================== [ 24.840103] [ INFO: possible circular locking dependency detected ] [ 24.846475] 4.9.80-g20c8a00 #38 Not tainted [ 24.850762] ------------------------------------------------------- [ 24.857134] syzkaller158231/3808 is trying to acquire lock: [ 24.862809] (&bdev->bd_mutex){+.+.+.}, at: [] blkdev_reread_part+0x1e/0x40 [ 24.871802] but task is already holding lock: [ 24.876437] (&lo->lo_ctl_mutex#2){+.+.+.}, at: [] lo_compat_ioctl+0x109/0x140 [ 24.885799] which lock already depends on the new lock. [ 24.885799] [ 24.892783] [ 24.892783] the existing dependency chain (in reverse order) is: [ 24.900370] -> #2 (&lo->lo_ctl_mutex#2){+.+.+.}: [ 24.905863] lock_acquire+0x12e/0x410 [ 24.910157] mutex_lock_nested+0xbb/0x870 [ 24.914800] lo_release+0x85/0x160 [ 24.918833] __blkdev_put+0x5f7/0x7e0 [ 24.923126] blkdev_put+0x85/0x550 [ 24.927157] blkdev_close+0x8b/0xb0 [ 24.931273] __fput+0x28c/0x6e0 [ 24.935046] ____fput+0x15/0x20 [ 24.938817] task_work_run+0x115/0x190 [ 24.943197] exit_to_usermode_loop+0xfc/0x120 [ 24.948184] syscall_return_slowpath+0x1a0/0x1e0 [ 24.953433] entry_SYSCALL_64_fastpath+0xe6/0xe8 [ 24.958677] -> #1 (loop_index_mutex){+.+.+.}: [ 24.963791] lock_acquire+0x12e/0x410 [ 24.968083] mutex_lock_nested+0xbb/0x870 [ 24.972719] lo_open+0x1b/0xa0 [ 24.976403] __blkdev_get+0x261/0xd50 [ 24.980693] blkdev_get+0x33b/0x960 [ 24.984812] blkdev_open+0x1a5/0x250 [ 24.989016] do_dentry_open+0x607/0xc60 [ 24.993480] vfs_open+0x105/0x220 [ 24.997424] path_openat+0x5ac/0x2910 [ 25.001712] do_filp_open+0x197/0x290 [ 25.006002] do_sys_open+0x366/0x620 [ 25.010205] SyS_open+0x2d/0x40 [ 25.013976] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 25.019218] -> #0 (&bdev->bd_mutex){+.+.+.}: [ 25.024252] __lock_acquire+0x2bf9/0x3640 [ 25.028892] lock_acquire+0x12e/0x410 [ 25.033186] mutex_lock_nested+0xbb/0x870 [ 25.037833] blkdev_reread_part+0x1e/0x40 [ 25.042483] loop_reread_partitions+0x78/0xe0 [ 25.047472] loop_set_status+0x995/0xfc0 [ 25.052025] loop_set_status_compat+0x9a/0x100 [ 25.057099] lo_compat_ioctl+0x114/0x140 [ 25.061656] compat_blkdev_ioctl+0x3e3/0x3bc0 [ 25.066644] compat_SyS_ioctl+0x15f/0x2050 [ 25.071371] do_fast_syscall_32+0x2f7/0x890 [ 25.076184] entry_SYSENTER_compat+0x74/0x83 [ 25.081083] [ 25.081083] other info that might help us debug this: [ 25.081083] [ 25.089204] Chain exists of: &bdev->bd_mutex --> loop_index_mutex --> &lo->lo_ctl_mutex#2 [ 25.098750] Possible unsafe locking scenario: [ 25.098750] [ 25.104776] CPU0 CPU1 [ 25.109412] ---- ---- [ 25.114046] lock(&lo->lo_ctl_mutex#2); [ 25.118427] lock(loop_index_mutex); [ 25.124949] lock(&lo->lo_ctl_mutex#2); [ 25.131844] lock(&bdev->bd_mutex); [ 25.135760] [ 25.135760] *** DEADLOCK *** [ 25.135760] [ 25.141790] 1 lock held by syzkaller158231/3808: [ 25.146510] #0: (&lo->lo_ctl_mutex#2){+.+.+.}, at: [] lo_compat_ioctl+0x109/0x140 [ 25.156429] [ 25.156429] stack backtrace: [ 25.160897] CPU: 1 PID: 3808 Comm: syzkaller158231 Not tainted 4.9.80-g20c8a00 #38 [ 25.168575] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.177901] ffff8801d754f768 ffffffff81d94b69 ffffffff85386410 ffffffff85385840 [ 25.185877] ffffffff853b3140 ffff8801b31468d8 ffff8801b3146000 ffff8801d754f7b0 [ 25.193852] ffffffff81238641 ffff8801b31468d8 00000000b31468b0 ffff8801b31468d8 [ 25.201819] Call Trace: [ 25.204376] [] dump_stack+0xc1/0x128 [ 25.209710] [] print_circular_bug+0x271/0x310 [ 25.215827] [] __lock_acquire+0x2bf9/0x3640 [ 25.221773] [] ? save_stack+0xa3/0xd0 [ 25.227200] [] ? save_stack_trace+0x16/0x20 [ 25.233146] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 25.240128] [] ? __lock_acquire+0x629/0x3640 [ 25.246166] [] ? trace_hardirqs_on_caller+0x38b/0x590 [ 25.252981] [] ? __lock_is_held+0xa1/0xf0 [ 25.258746] [] lock_acquire+0x12e/0x410 [ 25.264342] [] ? blkdev_reread_part+0x1e/0x40 [ 25.270460] [] ? blkdev_reread_part+0x1e/0x40 [ 25.276583] [] mutex_lock_nested+0xbb/0x870 [ 25.282528] [] ? blkdev_reread_part+0x1e/0x40 [ 25.288649] [] ? mutex_lock_killable_nested+0x960/0x960 [ 25.295647] [] ? __wake_up+0x1e/0x50 [ 25.300981] [] ? _raw_spin_unlock_irqrestore+0x5a/0x70 [ 25.307881] [] ? trace_hardirqs_on_caller+0x38b/0x590 [ 25.314695] [] blkdev_reread_part+0x1e/0x40 [ 25.320638] [] loop_reread_partitions+0x78/0xe0 [ 25.326930] [] loop_set_status+0x995/0xfc0 [ 25.332790] [] loop_set_status_compat+0x9a/0x100 [ 25.339172] [] ? loop_set_status+0xfc0/0xfc0 [ 25.345201] [] lo_compat_ioctl+0x114/0x140 [ 25.351056] [] ? lo_ioctl+0x1990/0x1990 [ 25.356657] [] compat_blkdev_ioctl+0x3e3/0x3bc0 [ 25.362955] [] ? cfq_dispatch_requests+0x2f40/0x2f40 [ 25.369680] [] ? __do_page_fault+0x5ec/0xd40 [ 25.375715] [] ? security_file_ioctl+0x89/0xb0 executing program executing program [ 25.381924] [] compat_SyS_ioctl+0x15f/0x2050 [ 25.387958] [] ? cfq_dispatch_requests+0x2f40/0x2f40 [ 25.394689] [] ? do_ioctl+0x60/0x60 [ 25.399936] [] do_fast_syscall_32+0x2f7/0x890 [ 25.406055] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 25.412784] [] entry_SYSENTER_compat+0x74/0x83 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