[....] Starting enhanced syslogd: rsyslogd[ 12.133408] audit: type=1400 audit(1518158284.270:4): avc: denied { syslog } for pid=3643 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.15.225' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 19.635996] [ 19.637639] ====================================================== [ 19.643927] [ INFO: possible circular locking dependency detected ] [ 19.650299] 4.9.80-g20c8a00 #38 Not tainted [ 19.654583] ------------------------------------------------------- [ 19.660950] syzkaller034981/3798 is trying to acquire lock: [ 19.666628] (&bdev->bd_mutex){+.+.+.}, at: [] blkdev_reread_part+0x1e/0x40 [ 19.675606] but task is already holding lock: [ 19.680237] (&lo->lo_ctl_mutex#2){+.+.+.}, at: [] lo_compat_ioctl+0x109/0x140 [ 19.689594] which lock already depends on the new lock. [ 19.689594] [ 19.696572] [ 19.696572] the existing dependency chain (in reverse order) is: [ 19.704158] -> #2 (&lo->lo_ctl_mutex#2){+.+.+.}: [ 19.709634] lock_acquire+0x12e/0x410 [ 19.713923] mutex_lock_nested+0xbb/0x870 [ 19.718557] lo_release+0x85/0x160 [ 19.722585] __blkdev_put+0x5f7/0x7e0 [ 19.726872] blkdev_put+0x85/0x550 [ 19.730900] blkdev_close+0x8b/0xb0 [ 19.735012] __fput+0x28c/0x6e0 [ 19.738784] ____fput+0x15/0x20 [ 19.742550] task_work_run+0x115/0x190 [ 19.746925] exit_to_usermode_loop+0xfc/0x120 [ 19.751905] syscall_return_slowpath+0x1a0/0x1e0 [ 19.757149] entry_SYSCALL_64_fastpath+0xe6/0xe8 [ 19.762387] -> #1 (loop_index_mutex){+.+.+.}: [ 19.767490] lock_acquire+0x12e/0x410 [ 19.771777] mutex_lock_nested+0xbb/0x870 [ 19.776411] lo_open+0x1b/0xa0 [ 19.780091] __blkdev_get+0x261/0xd50 [ 19.784375] blkdev_get+0x33b/0x960 [ 19.788490] blkdev_open+0x1a5/0x250 [ 19.792691] do_dentry_open+0x607/0xc60 [ 19.797150] vfs_open+0x105/0x220 [ 19.801089] path_openat+0x5ac/0x2910 [ 19.805374] do_filp_open+0x197/0x290 [ 19.809665] do_sys_open+0x366/0x620 [ 19.813864] SyS_open+0x2d/0x40 [ 19.817632] entry_SYSCALL_64_fastpath+0x29/0xe8 [ 19.822871] -> #0 (&bdev->bd_mutex){+.+.+.}: [ 19.827889] __lock_acquire+0x2bf9/0x3640 [ 19.832522] lock_acquire+0x12e/0x410 [ 19.836810] mutex_lock_nested+0xbb/0x870 [ 19.841447] blkdev_reread_part+0x1e/0x40 [ 19.846083] loop_reread_partitions+0x78/0xe0 [ 19.851063] loop_set_status+0x995/0xfc0 [ 19.855609] loop_set_status_compat+0x9a/0x100 [ 19.860681] lo_compat_ioctl+0x114/0x140 [ 19.865230] compat_blkdev_ioctl+0x3e3/0x3bc0 [ 19.870213] compat_SyS_ioctl+0x15f/0x2050 [ 19.874936] do_fast_syscall_32+0x2f7/0x890 [ 19.879743] entry_SYSENTER_compat+0x74/0x83 [ 19.884635] [ 19.884635] other info that might help us debug this: [ 19.884635] [ 19.892741] Chain exists of: &bdev->bd_mutex --> loop_index_mutex --> &lo->lo_ctl_mutex#2 [ 19.902260] Possible unsafe locking scenario: [ 19.902260] [ 19.908282] CPU0 CPU1 [ 19.912917] ---- ---- [ 19.917547] lock(&lo->lo_ctl_mutex#2); [ 19.921913] lock(loop_index_mutex); [ 19.928425] lock(&lo->lo_ctl_mutex#2); [ 19.935305] lock(&bdev->bd_mutex); [ 19.939220] [ 19.939220] *** DEADLOCK *** [ 19.939220] [ 19.945243] 1 lock held by syzkaller034981/3798: [ 19.949963] #0: (&lo->lo_ctl_mutex#2){+.+.+.}, at: [] lo_compat_ioctl+0x109/0x140 [ 19.959867] [ 19.959867] stack backtrace: [ 19.964331] CPU: 0 PID: 3798 Comm: syzkaller034981 Not tainted 4.9.80-g20c8a00 #38 [ 19.972005] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 19.981328] ffff8801d7477768 ffffffff81d94b69 ffffffff85386410 ffffffff85385840 [ 19.989290] ffffffff853b32f0 ffff8801d95fe8d8 ffff8801d95fe000 ffff8801d74777b0 [ 19.997244] ffffffff81238641 ffff8801d95fe8d8 00000000d95fe8b0 ffff8801d95fe8d8 [ 20.005206] Call Trace: [ 20.007762] [] dump_stack+0xc1/0x128 [ 20.013094] [] print_circular_bug+0x271/0x310 [ 20.019206] [] __lock_acquire+0x2bf9/0x3640 [ 20.025146] [] ? save_stack+0xa3/0xd0 [ 20.030565] [] ? save_stack_trace+0x16/0x20 [ 20.036503] [] ? debug_check_no_locks_freed+0x2c0/0x2c0 [ 20.043480] [] ? __lock_acquire+0x629/0x3640 [ 20.049507] [] ? trace_hardirqs_on_caller+0x38b/0x590 [ 20.056315] [] ? __lock_is_held+0xa1/0xf0 [ 20.062079] [] lock_acquire+0x12e/0x410 [ 20.067673] [] ? blkdev_reread_part+0x1e/0x40 [ 20.073782] [] ? blkdev_reread_part+0x1e/0x40 [ 20.079896] [] mutex_lock_nested+0xbb/0x870 [ 20.085833] [] ? blkdev_reread_part+0x1e/0x40 [ 20.091944] [] ? mutex_lock_killable_nested+0x960/0x960 [ 20.098923] [] ? __wake_up+0x1e/0x50 [ 20.104257] [] ? _raw_spin_unlock_irqrestore+0x5a/0x70 [ 20.111149] [] ? trace_hardirqs_on_caller+0x38b/0x590 [ 20.117955] [] blkdev_reread_part+0x1e/0x40 [ 20.123892] [] loop_reread_partitions+0x78/0xe0 [ 20.130175] [] loop_set_status+0x995/0xfc0 [ 20.136026] [] loop_set_status_compat+0x9a/0x100 [ 20.142395] [] ? loop_set_status+0xfc0/0xfc0 [ 20.148418] [] lo_compat_ioctl+0x114/0x140 [ 20.154268] [] ? lo_ioctl+0x1990/0x1990 [ 20.159860] [] compat_blkdev_ioctl+0x3e3/0x3bc0 [ 20.166145] [] ? cfq_dispatch_requests+0x2f40/0x2f40 [ 20.172863] [] ? __do_page_fault+0x5ec/0xd40 [ 20.178889] [] ? security_file_ioctl+0x89/0xb0 [ 20.185088] [] com