[....] Starting enhanced syslogd: rsyslogd[ 17.420071] audit: type=1400 audit(1517407057.506:5): avc: denied { syslog } for pid=4049 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: [ 20.426333] audit: type=1400 audit(1517407060.513:6): avc: denied { map } for pid=4187 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.202' (ECDSA) to the list of known hosts. executing program [ 26.747822] audit: type=1400 audit(1517407066.834:7): avc: denied { map } for pid=4201 comm="syzkaller869929" path="/root/syzkaller869929271" 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 [ 26.836065] [ 26.837704] ====================================================== [ 26.843994] WARNING: possible circular locking dependency detected [ 26.850287] 4.15.0+ #288 Not tainted [ 26.853966] ------------------------------------------------------ [ 26.860252] syzkaller869929/4201 is trying to acquire lock: [ 26.865930] (rtnl_mutex){+.+.}, at: [<000000006c9fec4e>] rtnl_lock+0x17/0x20 [ 26.873183] [ 26.873183] but task is already holding lock: [ 26.879122] (sk_lock-AF_INET){+.+.}, at: [<00000000738a31be>] ip_setsockopt+0x8c/0xb0 [ 26.887149] [ 26.887149] which lock already depends on the new lock. [ 26.887149] [ 26.895431] [ 26.895431] the existing dependency chain (in reverse order) is: [ 26.903019] [ 26.903019] -> #1 (sk_lock-AF_INET){+.+.}: [ 26.908724] lock_sock_nested+0xc2/0x110 [ 26.913281] do_ip_setsockopt.isra.12+0x1d9/0x32e0 [ 26.919335] ip_setsockopt+0x3a/0xb0 [ 26.923539] tcp_setsockopt+0x82/0xd0 [ 26.927828] sock_common_setsockopt+0x95/0xd0 [ 26.932812] SyS_setsockopt+0x189/0x360 [ 26.937277] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 26.942518] [ 26.942518] -> #0 (rtnl_mutex){+.+.}: [ 26.947772] lock_acquire+0x1d5/0x580 [ 26.952064] __mutex_lock+0x16f/0x1a80 [ 26.956440] mutex_lock_nested+0x16/0x20 [ 26.960990] rtnl_lock+0x17/0x20 [ 26.964850] register_netdevice_notifier+0xad/0x860 [ 26.970355] tee_tg_check+0x1a0/0x280 [ 26.974646] xt_check_target+0x22c/0x7d0 [ 26.979198] find_check_entry.isra.8+0x8c8/0xcb0 [ 26.984443] translate_table+0xed1/0x1610 [ 26.989080] do_ipt_set_ctl+0x370/0x5f0 [ 26.993542] nf_setsockopt+0x67/0xc0 [ 26.997743] ip_setsockopt+0xa1/0xb0 [ 27.001947] sctp_setsockopt+0x2a0/0x5de0 [ 27.006586] sock_common_setsockopt+0x95/0xd0 [ 27.011573] SyS_setsockopt+0x189/0x360 [ 27.016037] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 27.021280] [ 27.021280] other info that might help us debug this: [ 27.021280] [ 27.029392] Possible unsafe locking scenario: [ 27.029392] [ 27.035416] CPU0 CPU1 [ 27.040048] ---- ---- [ 27.044680] lock(sk_lock-AF_INET); [ 27.048361] lock(rtnl_mutex); [ 27.054127] lock(sk_lock-AF_INET); [ 27.060324] lock(rtnl_mutex); [ 27.063569] [ 27.063569] *** DEADLOCK *** [ 27.063569] [ 27.069595] 1 lock held by syzkaller869929/4201: [ 27.074314] #0: (sk_lock-AF_INET){+.+.}, at: [<00000000738a31be>] ip_setsockopt+0x8c/0xb0 [ 27.082783] [ 27.082783] stack backtrace: [ 27.087250] CPU: 1 PID: 4201 Comm: syzkaller869929 Not tainted 4.15.0+ #288 [ 27.094315] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 27.103637] Call Trace: [ 27.106199] dump_stack+0x194/0x257 [ 27.109795] ? arch_local_irq_restore+0x53/0x53 [ 27.114439] print_circular_bug.isra.38+0x2cd/0x2dc [ 27.119424] ? save_trace+0xe0/0x2b0 [ 27.123106] __lock_acquire+0x30a8/0x3e00 [ 27.127222] ? print_irqtrace_events+0x270/0x270 [ 27.131951] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 27.137112] ? print_irqtrace_events+0x270/0x270 [ 27.141836] ? __lock_acquire+0x664/0x3e00 [ 27.146040] ? check_noncircular+0x20/0x20 [ 27.150244] ? print_irqtrace_events+0x270/0x270 [ 27.154968] ? __lock_acquire+0x664/0x3e00 [ 27.159177] ? find_held_lock+0x35/0x1d0 [ 27.163213] ? check_noncircular+0x20/0x20 [ 27.167418] ? __lock_acquire+0x664/0x3e00 [ 27.171620] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 27.176778] ? __lock_acquire+0x664/0x3e00 [ 27.180985] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 27.186146] lock_acquire+0x1d5/0x580 [ 27.189920] ? lock_acquire+0x1d5/0x580 [ 27.193863] ? rtnl_lock+0x17/0x20 [ 27.197371] ? lock_release+0xa40/0xa40 [ 27.201316] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 27.207171] ? rcu_note_context_switch+0x710/0x710 [ 27.212071] ? find_held_lock+0x35/0x1d0 [ 27.216102] ? __might_sleep+0x95/0x190 [ 27.220045] ? rtnl_lock+0x17/0x20 [ 27.223559] __mutex_lock+0x16f/0x1a80 [ 27.227419] ? rtnl_lock+0x17/0x20 [ 27.230930] ? lock_downgrade+0x980/0x980 [ 27.235052] ? rtnl_lock+0x17/0x20 [ 27.238562] ? check_noncircular+0x20/0x20 [ 27.242765] ? find_held_lock+0x35/0x1d0 [ 27.246797] ? mutex_lock_io_nested+0x1900/0x1900 [ 27.251609] ? is_bpf_text_address+0x7b/0x120 [ 27.256075] ? print_irqtrace_events+0x270/0x270 [ 27.260801] ? depot_save_stack+0x3b5/0x490 [ 27.265092] ? lock_downgrade+0x980/0x980 [ 27.269218] ? lock_release+0xa40/0xa40 [ 27.273170] ? mark_held_locks+0xaf/0x100 [ 27.277286] ? _raw_spin_unlock_irqrestore+0x31/0xba [ 27.282357] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 27.287342] ? trace_hardirqs_on+0xd/0x10 [ 27.291459] ? depot_save_stack+0x3b5/0x490 [ 27.295751] ? save_stack+0xa3/0xd0 [ 27.299345] ? save_stack+0x43/0xd0 [ 27.302941] ? kasan_kmalloc+0xad/0xe0 [ 27.306803] ? kmem_cache_alloc_trace+0x136/0x750 [ 27.311613] ? tee_tg_check+0xed/0x280 [ 27.315467] ? xt_check_target+0x22c/0x7d0 [ 27.319670] ? find_check_entry.isra.8+0x8c8/0xcb0 [ 27.324568] ? translate_table+0xed1/0x1610 [ 27.328856] ? do_ipt_set_ctl+0x370/0x5f0 [ 27.332979] ? nf_setsockopt+0x67/0xc0 [ 27.336834] ? ip_setsockopt+0xa1/0xb0 [ 27.340690] ? sctp_setsockopt+0x2a0/0x5de0 [ 27.344981] ? sock_common_setsockopt+0x95/0xd0 [ 27.349618] ? SyS_setsockopt+0x189/0x360 [ 27.353736] ? entry_SYSCALL_64_fastpath+0x29/0xa0 [ 27.358635] mutex_lock_nested+0x16/0x20 [ 27.362667] ? print_irqtrace_events+0x270/0x270 [ 27.367397] ? mutex_lock_nested+0x16/0x20 [ 27.371599] rtnl_lock+0x17/0x20 [ 27.374934] register_netdevice_notifier+0xad/0x860 [ 27.379924] ? __dev_close_many+0x330/0x330 [ 27.384218] ? __lock_is_held+0xb6/0x140 [ 27.388248] ? tee_tg_check+0xed/0x280 [ 27.392113] ? rcu_read_lock_sched_held+0x108/0x120 [ 27.397098] ? kmem_cache_alloc_trace+0x456/0x750 [ 27.401911] ? __kernel_text_address+0xd/0x40 [ 27.406373] ? wait_for_completion+0x770/0x770 [ 27.410925] tee_tg_check+0x1a0/0x280 [ 27.414699] ? tee_tg4+0x170/0x170 [ 27.418209] xt_check_target+0x22c/0x7d0 [ 27.422242] ? xt_target_seq_next+0x30/0x30 [ 27.426532] ? mutex_unlock+0xd/0x10 [ 27.430218] ? mutex_unlock+0xd/0x10 [ 27.433908] ? xt_find_target+0x17b/0x1e0 [ 27.438027] find_check_entry.isra.8+0x8c8/0xcb0 [ 27.442754] ? ipt_do_table+0x1950/0x1950 [ 27.446871] ? mark_held_locks+0xaf/0x100 [ 27.450990] ? kfree+0xf0/0x260 [ 27.454244] ? trace_hardirqs_on+0xd/0x10 [ 27.458360] translate_table+0xed1/0x1610 [ 27.462481] ? alloc_counters.isra.11+0x7d0/0x7d0 [ 27.467293] ? kasan_check_write+0x14/0x20 [ 27.471499] ? _copy_from_user+0x99/0x110 [ 27.475632] do_ipt_set_ctl+0x370/0x5f0 [ 27.479574] ? translate_compat_table+0x1b90/0x1b90 [ 27.484571] ? mutex_unlock+0xd/0x10 [ 27.488254] ? nf_sockopt_find.constprop.0+0x1a7/0x220 [ 27.493502] nf_setsockopt+0x67/0xc0 [ 27.497183] ip_setsockopt+0xa1/0xb0 [ 27.500872] sctp_setsockopt+0x2a0/0x5de0 [ 27.504989] ? __free_insn_slot+0x5c0/0x5c0 [ 27.509278] ? sctp_setsockopt_paddr_thresholds+0x550/0x550 [ 27.514961] ? rcutorture_record_progress+0x10/0x10 [ 27.519949] ? is_bpf_text_address+0xa4/0x120 [ 27.524414] ? __lock_acquire+0x664/0x3e00 [ 27.528617] ? unwind_get_return_address+0x61/0xa0 [ 27.533521] ? __save_stack_trace+0x7e/0xd0 [ 27.537814] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 27.542972] ? save_stack+0xa3/0xd0 [ 27.546578] ? check_noncircular+0x20/0x20 [ 27.550784] ? kasan_kmalloc+0xad/0xe0 [ 27.554639] ? kasan_slab_alloc+0x12/0x20 [ 27.558756] ? kmem_cache_alloc+0x12e/0x760 [ 27.563049] ? selinux_file_alloc_security+0xae/0x190 [ 27.568211] ? security_file_alloc+0x6d/0xa0 [ 27.572589] ? get_empty_filp+0x189/0x4f0 [ 27.576703] ? alloc_file+0x26/0x390 [ 27.580393] ? sock_alloc_file+0x1f3/0x560 [ 27.584593] ? sock_map_fd+0x34/0x90 [ 27.588274] ? SyS_socket+0x125/0x1d0 [ 27.592042] ? entry_SYSCALL_64_fastpath+0x29/0xa0 [ 27.596941] ? kasan_slab_alloc+0x12/0x20 [ 27.601055] ? kmem_cache_alloc+0x12e/0x760 [ 27.605342] ? get_empty_filp+0xfb/0x4f0 [ 27.609372] ? alloc_file+0x26/0x390 [ 27.613051] ? sock_alloc_file+0x1f3/0x560 [ 27.617259] ? find_held_lock+0x35/0x1d0 [ 27.621300] ? avc_has_perm+0x35e/0x680 [ 27.625245] ? lock_downgrade+0x980/0x980 [ 27.629362] ? debug_mutex_init+0x1c/0x60 [ 27.633480] ? lock_release+0xa40/0xa40 [ 27.637422] ? __lockdep_init_map+0xe4/0x650 [ 27.641796] ? check_noncircular+0x20/0x20 [ 27.646004] ? avc_has_perm+0x43e/0x680 [ 27.649945] ? avc_has_perm_noaudit+0x520/0x520 [ 27.654585] ? __fd_install+0x25f/0x740 [ 27.658529] ? lock_downgrade+0x980/0x980 [ 27.662649] ? __lock_is_held+0xb6/0x140 [ 27.666683] ? sock_has_perm+0x2a4/0x420 [ 27.670713] ? selinux_secmark_relabel_packet+0xc0/0xc0 [ 27.676047] ? selinux_netlbl_socket_setsockopt+0x10c/0x460 [ 27.681728] ? selinux_netlbl_sock_rcv_skb+0x730/0x730 [ 27.686982] ? alloc_file+0x27e/0x390 [ 27.690755] sock_common_setsockopt+0x95/0xd0 [ 27.695220] SyS_setsockopt+0x189/0x360 [ 27.699163] ? SyS_recv+0x40/0x40 [ 27.702589] ? entry_SYSCALL_64_fastpath+0x5/0xa0 [ 27.707401] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 27.712387] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 27.717123] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 27.721847] RIP: 0033:0x440ae9 [ 27.725005] RSP: 002b:00007ffff696cf78 EFLAGS: 00000207 ORIG_RAX: 0000000000000036 [ 27.732683] RAX: ffffffffffffffda RBX: ffffffffffffffff RCX: 0000000000440ae9 [