[....] Starting enhanced syslogd: rsyslogd[ 13.621315] audit: type=1400 audit(1539878948.780:4): avc: denied { syslog } for pid=1922 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 mcstransd: [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] 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.68' (ECDSA) to the list of known hosts. executing program executing program syzkaller login: [ 51.442684] [ 51.444335] ====================================================== [ 51.450625] [ INFO: possible circular locking dependency detected ] [ 51.457006] 4.4.161+ #1 Not tainted [ 51.460620] ------------------------------------------------------- [ 51.467001] syz-executor112/2090 is trying to acquire lock: [ 51.472687] (&bdev->bd_mutex){+.+.+.}, at: [] blkdev_reread_part+0x1e/0x40 [ 51.481835] [ 51.481835] but task is already holding lock: [ 51.487788] (&lo->lo_ctl_mutex#2){+.+...}, at: [] lo_compat_ioctl+0x110/0x140 [ 51.497310] [ 51.497310] which lock already depends on the new lock. [ 51.497310] [ 51.505599] [ 51.505599] the existing dependency chain (in reverse order) is: [ 51.513209] -> #2 (&lo->lo_ctl_mutex#2){+.+...}: [ 51.518750] [] lock_acquire+0x15e/0x450 [ 51.525000] [] mutex_lock_nested+0xbb/0x8d0 [ 51.531608] [] lo_release+0x85/0x1a0 [ 51.537607] [] __blkdev_put+0x636/0x840 [ 51.543854] [] blkdev_put+0x85/0x560 [ 51.549846] [] blkdev_close+0x8b/0xb0 [ 51.555912] [] __fput+0x235/0x6f0 [ 51.561654] [] ____fput+0x15/0x20 [ 51.567384] [] task_work_run+0x10f/0x190 [ 51.573805] [] exit_to_usermode_loop+0x13d/0x160 [ 51.580841] [] syscall_return_slowpath+0x254/0x2d0 [ 51.588046] [] int_ret_from_sys_call+0x25/0xa3 [ 51.594901] -> #1 (loop_index_mutex){+.+.+.}: [ 51.600068] [] lock_acquire+0x15e/0x450 [ 51.606317] [] mutex_lock_nested+0xbb/0x8d0 [ 51.612927] [] lo_open+0x1b/0xa0 [ 51.618581] [] __blkdev_get+0x2ae/0xdf0 [ 51.624825] [] blkdev_get+0x2da/0x920 [ 51.630952] [] blkdev_open+0x1a5/0x250 [ 51.637119] [] do_dentry_open+0x38d/0xbd0 [ 51.643548] [] vfs_open+0x12a/0x210 [ 51.649442] [] path_openat+0x50c/0x39a0 [ 51.655687] [] do_filp_open+0x197/0x270 [ 51.661944] [] do_sys_open+0x31c/0x610 [ 51.668099] [] SyS_open+0x2d/0x40 [ 51.673830] [] entry_SYSCALL_64_fastpath+0x1e/0x9a [ 51.681031] -> #0 (&bdev->bd_mutex){+.+.+.}: [ 51.686079] [] __lock_acquire+0x3e6c/0x5f10 [ 51.692669] [] lock_acquire+0x15e/0x450 [ 51.698910] [] mutex_lock_nested+0xbb/0x8d0 [ 51.705610] [] blkdev_reread_part+0x1e/0x40 [ 51.712206] [] loop_reread_partitions+0x7c/0x90 [ 51.719151] [] loop_set_status+0xa7e/0xfe0 [ 51.725661] [] loop_set_status_compat+0x9a/0xf0 [ 51.732616] [] lo_compat_ioctl+0x11b/0x140 [ 51.739132] [] compat_blkdev_ioctl+0x3a4/0x3546 [ 51.746074] [] compat_SyS_ioctl+0x4af/0x2220 [ 51.752757] [] do_fast_syscall_32+0x31e/0xa80 [ 51.759530] [] sysenter_flags_fixed+0xd/0x1a [ 51.766217] [ 51.766217] other info that might help us debug this: [ 51.766217] [ 51.774344] Chain exists of: &bdev->bd_mutex --> loop_index_mutex --> &lo->lo_ctl_mutex#2 [ 51.783930] Possible unsafe locking scenario: [ 51.783930] [ 51.789960] CPU0 CPU1 [ 51.794599] ---- ---- [ 51.799242] lock(&lo->lo_ctl_mutex#2); [ 51.803640] lock(loop_index_mutex); [ 51.810231] lock(&lo->lo_ctl_mutex#2); [ 51.817171] lock(&bdev->bd_mutex); [ 51.821112] [ 51.821112] *** DEADLOCK *** [ 51.821112] [ 51.827158] 1 lock held by syz-executor112/2090: [ 51.831886] #0: (&lo->lo_ctl_mutex#2){+.+...}, at: [] lo_compat_ioctl+0x110/0x140 [ 51.841969] [ 51.841969] stack backtrace: [ 51.846444] CPU: 0 PID: 2090 Comm: syz-executor112 Not tainted 4.4.161+ #1 [ 51.853433] 0000000000000000 0d8a8ea2c3f694a0 ffff8801d42f7608 ffffffff81a9969d [ 51.861433] ffffffff83a99850 ffffffff83abf110 ffffffff83a98ad0 ffff8800b6b220a8 [ 51.869434] ffff8800b6b217c0 ffff8801d42f7650 ffffffff813a856a 0000000000000001 [ 51.877435] Call Trace: [ 51.880000] [] dump_stack+0xc1/0x124 [ 51.885344] [] print_circular_bug.cold.34+0x2f7/0x432 [ 51.892164] [] __lock_acquire+0x3e6c/0x5f10 [ 51.898110] [] ? trace_hardirqs_on+0x10/0x10 [ 51.904145] [] ? pick_next_task_fair+0x7ef/0x2180 [ 51.910617] [] ? trace_hardirqs_on+0x10/0x10 [ 51.916653] [] ? __lock_acquire+0xa85/0x5f10 [ 51.922689] [] lock_acquire+0x15e/0x450 [ 51.928290] [] ? blkdev_reread_part+0x1e/0x40 [ 51.934412] [] ? blkdev_reread_part+0x1e/0x40 [ 51.940548] [] mutex_lock_nested+0xbb/0x8d0 [ 51.946511] [] ? blkdev_reread_part+0x1e/0x40 [ 51.952647] [] ? mutex_trylock+0x3e0/0x3e0 [ 51.958526] [] ? _raw_spin_unlock_irqrestore+0x5a/0x70 [ 51.965434] [] ? trace_hardirqs_on_caller+0x38b/0x590 [ 51.972250] [] blkdev_reread_part+0x1e/0x40 [ 51.978201] [] loop_reread_partitions+0x7c/0x90 [ 51.984498] [] loop_set_status+0xa7e/0xfe0 [ 51.990363] [] loop_set_status_compat+0x9a/0xf0 [ 51.996661] [] ? loop_set_status+0xfe0/0xfe0 [ 52.002700] [] ? kasan_slab_free+0xac/0x190 [ 52.008650] [] lo_compat_ioctl+0x11b/0x140 [ 52.014510] [] ? lo_ioctl+0x16b0/0x16b0 [ 52.020117] [] compat_blkdev_ioctl+0x3a4/0x3546 [ 52.026416] [] ? _raw_spin_unlock_irqrestore+0x5a/0x70 [ 52.033321] [] ? cfq_merged_request+0x100/0x100 [ 52.039616] [] ? _raw_spin_unlock_irqrestore+0x45/0x70 [ 52.046519] [] ? debug_check_no_obj_freed+0x2ca/0x890 [ 52.053336] [] ? security_file_ioctl+0x8f/0xc0 [ 52.059585] [] ? cfq_merged_request+0x100/0x100 [ 52.065887] [] compat_SyS_ioctl+0x4af/0x2220 [ 52.071929] [] ? compat_SyS_ppoll+0x420/0x420 [ 52.078051] [] ? kmem_cache_free+0x2b2/0x340 [ 52.084089] [] ? putname+0xe0/0x110 [ 52.089350] [] ? do_sys_open+0x21c/0x610 executing program [ 52.095036] [] ? filp_open+0x70/0x70 [ 52.100385] [] ? __do_page_fault+0x2b6/0x7e0 [ 52.106424] [] ? do_fast_syscall_32+0xdb/0xa80 [ 52.112645] [] ? compat_SyS_ppoll+0x420/0x420 [ 52.118828] [] do_fast_syscall_32+0x31e/0xa80 [ 52.124957] [] sysenter_flags_fixed+0xd/0x1a executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program