[....] Starting enhanced syslogd: rsyslogd[ 17.411065] audit: type=1400 audit(1517423714.047:5): avc: denied { syslog } for pid=4019 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 syzkaller login: [ 22.255570] audit: type=1400 audit(1517423718.892:6): avc: denied { map } for pid=4158 comm="bash" path="/bin/bash" dev="sda1" ino=1457 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 Warning: Permanently added '10.128.15.218' (ECDSA) to the list of known hosts. executing program [ 28.591743] audit: type=1400 audit(1517423725.228:7): avc: denied { map } for pid=4171 comm="syzkaller595593" path="/root/syzkaller595593601" dev="sda1" ino=16481 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1 executing program [ 28.672143] xt_CT: netfilter: NOTRACK target is deprecated, use CT instead or upgrade iptables [ 28.745306] [ 28.746960] ====================================================== [ 28.753244] WARNING: possible circular locking dependency detected [ 28.759530] 4.15.0+ #288 Not tainted [ 28.763209] ------------------------------------------------------ [ 28.769494] syzkaller595593/4171 is trying to acquire lock: [ 28.775170] (rtnl_mutex){+.+.}, at: [<00000000b848abec>] rtnl_lock+0x17/0x20 [ 28.782427] [ 28.782427] but task is already holding lock: [ 28.788363] (&xt[i].mutex){+.+.}, at: [<00000000f7f70091>] xt_find_table_lock+0x40/0x3d0 [ 28.796668] [ 28.796668] which lock already depends on the new lock. [ 28.796668] [ 28.804953] [ 28.804953] the existing dependency chain (in reverse order) is: [ 28.812540] [ 28.812540] -> #2 (&xt[i].mutex){+.+.}: [ 28.817966] __mutex_lock+0x16f/0x1a80 [ 28.822358] mutex_lock_nested+0x16/0x20 [ 28.826907] xt_find_target+0x44/0x1e0 [ 28.831282] xt_request_find_target+0x2c/0xb0 [ 28.836268] find_check_entry.isra.7+0x669/0xcf0 [ 28.841510] translate_table+0xf52/0x1690 [ 28.846145] do_ip6t_set_ctl+0x370/0x5f0 [ 28.850702] nf_setsockopt+0x67/0xc0 [ 28.854907] ipv6_setsockopt+0x115/0x150 [ 28.859459] sctp_setsockopt+0x2a0/0x5de0 [ 28.864098] sock_common_setsockopt+0x95/0xd0 [ 28.869081] SyS_setsockopt+0x189/0x360 [ 28.873548] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 28.878788] [ 28.878788] -> #1 (sk_lock-AF_INET6){+.+.}: [ 28.884562] lock_sock_nested+0xc2/0x110 [ 28.889112] do_ipv6_setsockopt.isra.8+0x3c5/0x39d0 [ 28.894615] ipv6_setsockopt+0xd7/0x150 [ 28.899076] udpv6_setsockopt+0x45/0x80 [ 28.903540] sock_common_setsockopt+0x95/0xd0 [ 28.908618] SyS_setsockopt+0x189/0x360 [ 28.913088] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 28.918328] [ 28.918328] -> #0 (rtnl_mutex){+.+.}: [ 28.923608] lock_acquire+0x1d5/0x580 [ 28.927896] __mutex_lock+0x16f/0x1a80 [ 28.932271] mutex_lock_nested+0x16/0x20 [ 28.936828] rtnl_lock+0x17/0x20 [ 28.940686] unregister_netdevice_notifier+0x91/0x4e0 [ 28.946365] tee_tg_destroy+0x61/0xc0 [ 28.950667] cleanup_entry+0x218/0x350 [ 28.955044] __do_replace+0x7d7/0xa90 [ 28.959333] do_ipt_set_ctl+0x40f/0x5f0 [ 28.963797] nf_setsockopt+0x67/0xc0 [ 28.967999] ip_setsockopt+0xa1/0xb0 [ 28.972206] sctp_setsockopt+0x2a0/0x5de0 [ 28.976849] sock_common_setsockopt+0x95/0xd0 [ 28.981838] SyS_setsockopt+0x189/0x360 [ 28.986305] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 28.991551] [ 28.991551] other info that might help us debug this: [ 28.991551] [ 28.999663] Chain exists of: [ 28.999663] rtnl_mutex --> sk_lock-AF_INET6 --> &xt[i].mutex [ 28.999663] [ 29.009950] Possible unsafe locking scenario: [ 29.009950] [ 29.015976] CPU0 CPU1 [ 29.020629] ---- ---- [ 29.025278] lock(&xt[i].mutex); [ 29.028701] lock(sk_lock-AF_INET6); [ 29.034987] lock(&xt[i].mutex); [ 29.040926] lock(rtnl_mutex); [ 29.044174] [ 29.044174] *** DEADLOCK *** [ 29.044174] [ 29.050213] 2 locks held by syzkaller595593/4171: [ 29.055202] #0: (sk_lock-AF_INET){+.+.}, at: [<000000004c4b29f0>] ip_setsockopt+0x8c/0xb0 [ 29.063675] #1: (&xt[i].mutex){+.+.}, at: [<00000000f7f70091>] xt_find_table_lock+0x40/0x3d0 [ 29.072402] [ 29.072402] stack backtrace: [ 29.076871] CPU: 0 PID: 4171 Comm: syzkaller595593 Not tainted 4.15.0+ #288 [ 29.083937] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 29.093258] Call Trace: [ 29.095839] dump_stack+0x194/0x257 [ 29.099438] ? arch_local_irq_restore+0x53/0x53 [ 29.104089] print_circular_bug.isra.38+0x2cd/0x2dc [ 29.109075] ? save_trace+0xe0/0x2b0 [ 29.112760] __lock_acquire+0x30a8/0x3e00 [ 29.116876] ? print_irqtrace_events+0x270/0x270 [ 29.121606] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 29.126765] ? __lock_acquire+0x664/0x3e00 [ 29.130970] ? __lock_acquire+0x664/0x3e00 [ 29.135174] ? __lock_acquire+0x664/0x3e00 [ 29.139384] ? __lock_acquire+0x664/0x3e00 [ 29.143603] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 29.148765] ? rtnl_lock+0x17/0x20 [ 29.152275] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 29.157432] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 29.162605] lock_acquire+0x1d5/0x580 [ 29.166373] ? lock_acquire+0x1d5/0x580 [ 29.170315] ? rtnl_lock+0x17/0x20 [ 29.173825] ? lock_release+0xa40/0xa40 [ 29.177771] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 29.183629] ? rcu_note_context_switch+0x710/0x710 [ 29.188533] ? __lock_acquire+0x664/0x3e00 [ 29.192761] ? __might_sleep+0x95/0x190 [ 29.196702] ? rtnl_lock+0x17/0x20 [ 29.200210] __mutex_lock+0x16f/0x1a80 [ 29.204074] ? rtnl_lock+0x17/0x20 [ 29.207581] ? rtnl_lock+0x17/0x20 [ 29.211093] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 29.216252] ? mutex_lock_io_nested+0x1900/0x1900 [ 29.221066] ? rcutorture_record_progress+0x10/0x10 [ 29.226057] ? is_bpf_text_address+0xa4/0x120 [ 29.231435] ? kernel_text_address+0x102/0x140 [ 29.235992] ? __kernel_text_address+0xd/0x40 [ 29.240459] ? unwind_get_return_address+0x61/0xa0 [ 29.245358] ? __save_stack_trace+0x7e/0xd0 [ 29.249652] ? depot_save_stack+0x12c/0x490 [ 29.253953] ? check_noncircular+0x20/0x20 [ 29.258157] ? save_stack+0x43/0xd0 [ 29.261750] ? kasan_kmalloc+0xad/0xe0 [ 29.265604] ? __kmalloc+0x162/0x760 [ 29.269285] ? xt_replace_table+0x641/0x9d0 [ 29.273575] ? __do_replace+0x313/0xa90 [ 29.277515] ? do_ipt_set_ctl+0x40f/0x5f0 [ 29.281633] ? nf_setsockopt+0x67/0xc0 [ 29.285488] ? ip_setsockopt+0xa1/0xb0 [ 29.289344] ? sctp_setsockopt+0x2a0/0x5de0 [ 29.293638] ? sock_common_setsockopt+0x95/0xd0 [ 29.298275] ? SyS_setsockopt+0x189/0x360 [ 29.302392] ? entry_SYSCALL_64_fastpath+0x29/0xa0 [ 29.307293] ? pcpu_chunk_relocate+0x315/0x770 [ 29.311846] ? print_irqtrace_events+0x270/0x270 [ 29.316571] ? free_percpu+0x229/0x830 [ 29.320426] ? lock_downgrade+0x980/0x980 [ 29.324542] ? __lock_is_held+0xb6/0x140 [ 29.328573] ? lock_release+0xa40/0xa40 [ 29.332518] ? _find_next_bit+0xee/0x120 [ 29.336547] ? tee_tg6+0x170/0x170 [ 29.340055] mutex_lock_nested+0x16/0x20 [ 29.344086] ? mutex_lock_nested+0x16/0x20 [ 29.348292] rtnl_lock+0x17/0x20 [ 29.351634] unregister_netdevice_notifier+0x91/0x4e0 [ 29.356793] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 29.361776] ? trace_hardirqs_on+0xd/0x10 [ 29.365891] ? register_netdevice_notifier+0x860/0x860 [ 29.371149] ? free_modinfo_version+0x70/0x70 [ 29.375620] ? __alloc_percpu+0x30/0x30 [ 29.379565] ? find_next_bit+0x27/0x30 [ 29.383430] ? cpumask_next+0x24/0x30 [ 29.387201] ? __lock_is_held+0xb6/0x140 [ 29.391236] ? tee_tg6+0x170/0x170 [ 29.394746] tee_tg_destroy+0x61/0xc0 [ 29.398521] cleanup_entry+0x218/0x350 [ 29.402376] ? cleanup_match+0x220/0x220 [ 29.406404] ? find_next_bit+0x27/0x30 [ 29.410261] __do_replace+0x7d7/0xa90 [ 29.414030] ? compat_table_info+0x470/0x470 [ 29.418410] ? kasan_check_write+0x14/0x20 [ 29.422620] ? _copy_from_user+0x99/0x110 [ 29.426736] do_ipt_set_ctl+0x40f/0x5f0 [ 29.430678] ? translate_compat_table+0x1b90/0x1b90 [ 29.435664] ? mutex_unlock+0xd/0x10 [ 29.439354] ? nf_sockopt_find.constprop.0+0x1a7/0x220 [ 29.444602] nf_setsockopt+0x67/0xc0 [ 29.448306] ip_setsockopt+0xa1/0xb0 [ 29.451990] sctp_setsockopt+0x2a0/0x5de0 [ 29.456107] ? __free_insn_slot+0x5c0/0x5c0 [ 29.460398] ? sctp_setsockopt_paddr_thresholds+0x550/0x550 [ 29.466080] ? rcutorture_record_progress+0x10/0x10 [ 29.471069] ? is_bpf_text_address+0xa4/0x120 [ 29.475532] ? __lock_acquire+0x664/0x3e00 [ 29.479737] ? unwind_get_return_address+0x61/0xa0 [ 29.484637] ? __save_stack_trace+0x7e/0xd0 [ 29.488927] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 29.494086] ? save_stack+0xa3/0xd0 [ 29.497681] ? check_noncircular+0x20/0x20 [ 29.501881] ? kasan_kmalloc+0xad/0xe0 [ 29.505739] ? kasan_slab_alloc+0x12/0x20 [ 29.509855] ? kmem_cache_alloc+0x12e/0x760 [ 29.514144] ? selinux_file_alloc_security+0xae/0x190 [ 29.519306] ? security_file_alloc+0x6d/0xa0 [ 29.523687] ? get_empty_filp+0x189/0x4f0 [ 29.527801] ? alloc_file+0x26/0x390 [ 29.531480] ? sock_alloc_file+0x1f3/0x560 [ 29.535682] ? sock_map_fd+0x34/0x90 [ 29.539363] ? SyS_socket+0x125/0x1d0 [ 29.543133] ? entry_SYSCALL_64_fastpath+0x29/0xa0 [ 29.548031] ? kasan_slab_alloc+0x12/0x20 [ 29.552156] ? kmem_cache_alloc+0x12e/0x760 [ 29.556445] ? get_empty_filp+0xfb/0x4f0 [ 29.560471] ? alloc_file+0x26/0x390 [ 29.564153] ? sock_alloc_file+0x1f3/0x560 [ 29.568358] ? find_held_lock+0x35/0x1d0 [ 29.572394] ? avc_has_perm+0x35e/0x680 [ 29.576349] ? lock_downgrade+0x980/0x980 [ 29.580473] ? debug_mutex_init+0x1c/0x60 [ 29.584593] ? lock_release+0xa40/0xa40 [ 29.588543] ? __lockdep_init_map+0xe4/0x650 [ 29.592931] ? check_noncircular+0x20/0x20 [ 29.597145] ? avc_has_perm+0x43e/0x680 [ 29.601089] ? avc_has_perm_noaudit+0x520/0x520 [ 29.605730] ? __fd_install+0x25f/0x740 [ 29.609674] ? lock_downgrade+0x980/0x980 [ 29.613796] ? __lock_is_held+0xb6/0x140 [ 29.617829] ? sock_has_perm+0x2a4/0x420 [ 29.621859] ? selinux_secmark_relabel_packet+0xc0/0xc0 [ 29.627190] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 29.632870] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 29.638115] ? alloc_file+0x27e/0x390 [ 29.641889] sock_common_setsockopt+0x95/0xd0 [ 29.646356] SyS_setsockopt+0x189/0x360 [ 29.650298] ? SyS_recv+0x40/0x40 [ 29.653736] ? entry_SYSCALL_64_fastpath+0x5/0xa0 [ 29.658550] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 29.663536] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 29.668266] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 29.672992] RIP: 0033:0x441ea9 [ 29.676152] RSP: 002b:00007ffc104fd928 EFLAGS: 00000203 ORIG_RAX: 0000000000000036 [ 29.684001] RAX: ffffffffffffffda RBX: ffffffffffffffff RCX: 0000000000441ea9 [ 29.691240] RDX: 0000000000000040 RSI: 0000000000000000 RDI: 0000000000000008 executing program [ 29.698479] RBP: 00000000006cc018 R08: 00000000000002e0 R09: 0000000000000000 [ 29.705717] R10: 000000002002ccf8 R11: 0000000000000203 R12: 00000000004037d0 [ 29.712957] R13: 0000000000403860 R14: 0000000000000000 R15: 0000000000000000 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program