[....] Starting enhanced syslogd: rsyslogd[ 18.379248] audit: type=1400 audit(1536220215.757:4): avc: denied { syslog } for pid=2111 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.10.22' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 31.421255] [ 31.422933] ====================================================== [ 31.429222] [ INFO: possible circular locking dependency detected ] [ 31.435734] 4.4.154+ #32 Not tainted [ 31.439421] ------------------------------------------------------- [ 31.445925] syz-executor637/2264 is trying to acquire lock: [ 31.451607] (sel_mutex){+.+.+.}, at: [] sel_read_policy+0x59/0x110 [ 31.460041] [ 31.460041] but task is already holding lock: [ 31.466110] (sb_writers#4){.+.+.+}, at: [] do_sendfile+0x89a/0xb80 [ 31.474743] [ 31.474743] which lock already depends on the new lock. [ 31.474743] [ 31.483151] [ 31.483151] the existing dependency chain (in reverse order) is: [ 31.490745] -> #4 (sb_writers#4){.+.+.+}: [ 31.495627] [] lock_acquire+0x15e/0x450 [ 31.501867] [] __sb_start_write+0x1ae/0x310 [ 31.508633] [] ext4_lazyinit_thread+0x1a7/0x750 [ 31.515573] [] kthread+0x268/0x300 [ 31.521380] [] ret_from_fork+0x55/0x80 [ 31.527537] -> #3 (&eli->li_list_mtx){+.+...}: [ 31.532750] [] lock_acquire+0x15e/0x450 [ 31.539185] [] mutex_lock_nested+0xbb/0x840 [ 31.545775] [] ext4_register_li_request+0x304/0x6c0 [ 31.553189] [] ext4_remount+0x1368/0x1bb0 [ 31.559600] [] do_remount_sb2+0x428/0x7d0 [ 31.566107] [] do_mount+0x101e/0x28f0 [ 31.572167] [] SyS_mount+0x191/0x1c0 [ 31.578140] [] entry_SYSCALL_64_fastpath+0x1e/0x9a [ 31.585342] -> #2 (&ext4_li_mtx){+.+.+.}: [ 31.590112] [] lock_acquire+0x15e/0x450 [ 31.596476] [] mutex_lock_nested+0xbb/0x840 [ 31.603170] [] ext4_register_li_request+0x87/0x6c0 [ 31.610370] [] ext4_remount+0x1368/0x1bb0 [ 31.616994] [] do_remount_sb2+0x428/0x7d0 [ 31.623409] [] do_mount+0x101e/0x28f0 [ 31.629554] [] SyS_mount+0x191/0x1c0 [ 31.635532] [] entry_SYSCALL_64_fastpath+0x1e/0x9a [ 31.642732] -> #1 (&type->s_umount_key#34){++++++}: [ 31.648500] [] lock_acquire+0x15e/0x450 [ 31.654751] [] down_read+0x42/0x60 [ 31.660562] [] iterate_supers+0xe1/0x260 [ 31.666998] [] selinux_complete_init+0x2f/0x31 [ 31.673853] [] security_load_policy+0x886/0x9b0 [ 31.680786] [] sel_write_load+0x191/0xfc0 [ 31.687194] [] __vfs_write+0x11c/0x3e0 [ 31.693344] [] vfs_write+0x17e/0x4e0 [ 31.699352] [] SyS_write+0xd9/0x1c0 [ 31.705372] [] entry_SYSCALL_64_fastpath+0x1e/0x9a [ 31.712566] -> #0 (sel_mutex){+.+.+.}: [ 31.717183] [] __lock_acquire+0x3b6e/0x5ba0 [ 31.723775] [] lock_acquire+0x15e/0x450 [ 31.730016] [] mutex_lock_nested+0xbb/0x840 [ 31.736603] [] sel_read_policy+0x59/0x110 [ 31.743090] [] do_loop_readv_writev+0x148/0x1e0 [ 31.750033] [] do_readv_writev+0x581/0x6f0 [ 31.756534] [] vfs_readv+0x78/0xb0 [ 31.762340] [] default_file_splice_read+0x4fb/0x8d0 [ 31.769696] [] do_splice_to+0xf7/0x140 [ 31.775857] [] splice_direct_to_actor+0x242/0x830 [ 31.782962] [] do_splice_direct+0x1a3/0x270 [ 31.789553] [] do_sendfile+0x4e4/0xb80 [ 31.795706] [] SyS_sendfile64+0xc3/0x150 [ 31.802032] [] do_fast_syscall_32+0x31e/0x8b0 [ 31.808803] [] sysenter_flags_fixed+0xd/0x1a [ 31.815477] [ 31.815477] other info that might help us debug this: [ 31.815477] [ 31.823600] Chain exists of: sel_mutex --> &eli->li_list_mtx --> sb_writers#4 [ 31.832124] Possible unsafe locking scenario: [ 31.832124] [ 31.838273] CPU0 CPU1 [ 31.842915] ---- ---- [ 31.847610] lock(sb_writers#4); [ 31.851401] lock(&eli->li_list_mtx); [ 31.858014] lock(sb_writers#4); [ 31.864371] lock(sel_mutex); [ 31.867774] [ 31.867774] *** DEADLOCK *** [ 31.867774] [ 31.873808] 1 lock held by syz-executor637/2264: [ 31.878534] #0: (sb_writers#4){.+.+.+}, at: [] do_sendfile+0x89a/0xb80 [ 31.887822] [ 31.887822] stack backtrace: [ 31.892295] CPU: 0 PID: 2264 Comm: syz-executor637 Not tainted 4.4.154+ #32 [ 31.899367] 0000000000000000 6724c3dca7ea76cc ffff8801ca84f068 ffffffff81a54fed [ 31.907350] ffffffff83abea60 ffffffff83ab2190 ffffffff83aae830 ffff8801cb3da0a8 [ 31.915423] ffff8801cb3d97c0 ffff8801ca84f0b0 ffffffff81391d2f 0000000000000001 [ 31.923409] Call Trace: [ 31.925973] [] dump_stack+0xc1/0x124 [ 31.931313] [] print_circular_bug.cold.34+0x2f7/0x432 [ 31.938124] [] __lock_acquire+0x3b6e/0x5ba0 [ 31.944073] [] ? save_stack_trace+0x26/0x50 [ 31.950021] [] ? kasan_kmalloc.part.1+0x62/0xf0 [ 31.956424] [] ? kasan_kmalloc+0xaf/0xc0 [ 31.962111] [] ? trace_hardirqs_on+0x10/0x10 [ 31.968146] [] ? check_irq_usage+0xb1/0xe0 [ 31.974059] [] lock_acquire+0x15e/0x450 [ 31.979674] [] ? sel_read_policy+0x59/0x110 [ 31.985630] [] ? sel_read_policy+0x59/0x110 [ 31.991583] [] mutex_lock_nested+0xbb/0x840 [ 31.997530] [] ? sel_read_policy+0x59/0x110 [ 32.003476] [] ? mutex_trylock+0x3e0/0x3e0 [ 32.009341] [] ? __check_object_size+0x217/0x327 [ 32.015725] [] ? __fsnotify_inode_delete+0x30/0x30 [ 32.022280] [] ? __fsnotify_update_child_dentry_flags.part.0+0x300/0x300 [ 32.030747] [] sel_read_policy+0x59/0x110 [ 32.036520] [] do_loop_readv_writev+0x148/0x1e0 [ 32.042915] [] ? security_file_permission+0x8f/0x1e0 [ 32.049688] [] ? sel_fill_super+0x6c0/0x6c0 [ 32.055642] [] ? sel_fill_super+0x6c0/0x6c0 [ 32.061599] [] do_readv_writev+0x581/0x6f0 [ 32.067459] [] ? vfs_write+0x4e0/0x4e0 [ 32.073086] [] ? __alloc_pages_direct_compact+0x220/0x220 [ 32.080252] [] vfs_readv+0x78/0xb0 [ 32.085466] [] default_file_splice_read+0x4fb/0x8d0 [ 32.092123] [] ? generic_file_splice_read+0x1c0/0x1c0 [ 32.098944] [] ? mark_held_locks+0xc7/0x130 [ 32.104891] [] ? depot_save_stack+0x20b/0x5eb [ 32.111057] [] ? page_cache_pipe_buf_release+0x70/0x70 [ 32.117967] [] ? _raw_spin_unlock_irqrestore+0x45/0x70 [ 32.124875] [] ? kasan_kmalloc.part.1+0xc9/0xf0 [ 32.131217] [] ? save_stack_trace+0x26/0x50 [ 32.137174] [] ? kasan_kmalloc.part.1+0x62/0xf0 [ 32.143472] [] ? kasan_kmalloc+0xaf/0xc0 [ 32.149170] [] ? __kmalloc+0x13d/0x330 [ 32.154733] [] ? alloc_pipe_info+0x340/0x410 [ 32.160773] [] ? splice_direct_to_actor+0x661/0x830 [ 32.167418] [] ? do_splice_direct+0x1a3/0x270 [ 32.173544] [] ? do_sendfile+0x4e4/0xb80 [ 32.179233] [] ? SyS_sendfile64+0xc3/0x150 [ 32.185191] [] ? do_fast_syscall_32+0x31e/0x8b0 [ 32.191507] [] ? sysenter_flags_fixed+0xd/0x1a [ 32.197812] [] ? avc_has_perm+0x15a/0x3a0 [ 32.203591] [] ? fsnotify+0x866/0x10c0 [ 32.209215] [] ? avc_has_perm+0x1cc/0x3a0 [ 32.215003] [] ? security_file_permission+0x8f/0x1e0 [ 32.221732] [] ? generic_file_splice_read+0x1c0/0x1c0 [ 32.228545] [] do_splice_to+0xf7/0x140 [ 32.234055] [] splice_direct_to_actor+0x242/0x830 [ 32.240525] [] ? trace_hardirqs_on+0x10/0x10 [ 32.246568] [] ? pipe_to_sendpage+0x330/0x330 [ 32.252689] [] ? do_splice_to+0x140/0x140 [ 32.258462] [] ? security_file_permission+0x8f/0x1e0 [ 32.265197] [] ? rw_verify_area+0x100/0x2f0 [ 32.271158] [] do_splice_direct+0x1a3/0x270 [ 32.277102] [] ? splice_direct_to_actor+0x830/0x830 [ 32.283741] [] ? rcu_sync_lockdep_assert+0x73/0xb0 [ 32.290299] [] ? __sb_start_write+0x14f/0x310 [ 32.296421] [] do_sendfile+0x4e4/0xb80 [ 32.301933] [] ? __compat_sys_pwritev64+0x170/0x170 [ 32.308582] [] ? __might_fault+0x114/0x1d0 [ 32.314530] [] SyS_sendfile64+0xc3/0x150 executing program executing program [ 32.320243] [] ? SyS_sendfile+0x160/0x160 [ 32.326157] [] ? do_fast_syscall_32+0xdb/0x8b0 [ 32.332435] [] ? SyS_sendfile+0x160/0x160 [ 32.338265] [] do_fast_syscall_32+0x31e/0x8b0 [ 32.344394] [] 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 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program