[?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. [ 18.713162] audit: type=1400 audit(1517285052.275:6): avc: denied { map } for pid=4144 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 Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.0.13' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 25.039413] audit: type=1400 audit(1517285058.602:7): avc: denied { map } for pid=4158 comm="syzkaller192193" path="/root/syzkaller192193822" 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 [ 25.124082] [ 25.125725] ====================================================== [ 25.132006] WARNING: possible circular locking dependency detected [ 25.138290] 4.15.0+ #285 Not tainted [ 25.141969] ------------------------------------------------------ [ 25.148255] syzkaller192193/4158 is trying to acquire lock: [ 25.153931] (rtnl_mutex){+.+.}, at: [<00000000c611bf06>] rtnl_lock+0x17/0x20 [ 25.161183] [ 25.161183] but task is already holding lock: [ 25.167119] (sk_lock-AF_INET){+.+.}, at: [<00000000484c5552>] ip_setsockopt+0x8c/0xb0 [ 25.175161] [ 25.175161] which lock already depends on the new lock. [ 25.175161] [ 25.183445] [ 25.183445] the existing dependency chain (in reverse order) is: [ 25.191031] [ 25.191031] -> #1 (sk_lock-AF_INET){+.+.}: [ 25.196725] lock_sock_nested+0xc2/0x110 [ 25.201279] do_ip_getsockopt+0x1b3/0x2170 [ 25.206003] ip_getsockopt+0x90/0x220 [ 25.210293] tcp_getsockopt+0x82/0xd0 [ 25.214586] sock_common_getsockopt+0x95/0xd0 [ 25.219571] SyS_getsockopt+0x178/0x340 [ 25.224038] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 25.229283] [ 25.229283] -> #0 (rtnl_mutex){+.+.}: [ 25.234538] lock_acquire+0x1d5/0x580 [ 25.238837] __mutex_lock+0x16f/0x1a80 [ 25.243215] mutex_lock_nested+0x16/0x20 [ 25.247770] rtnl_lock+0x17/0x20 [ 25.251628] register_netdevice_notifier+0xad/0x860 [ 25.257142] tee_tg_check+0x1a0/0x280 [ 25.261435] xt_check_target+0x22c/0x7d0 [ 25.265985] find_check_entry.isra.8+0x8c8/0xcb0 [ 25.271233] translate_table+0xed1/0x1610 [ 25.275868] do_ipt_set_ctl+0x370/0x5f0 [ 25.280335] nf_setsockopt+0x67/0xc0 [ 25.284548] ip_setsockopt+0xa1/0xb0 [ 25.288751] raw_setsockopt+0xb7/0xd0 [ 25.293048] sock_common_setsockopt+0x95/0xd0 [ 25.298036] SyS_setsockopt+0x189/0x360 [ 25.302506] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 25.307747] [ 25.307747] other info that might help us debug this: [ 25.307747] [ 25.315859] Possible unsafe locking scenario: [ 25.315859] [ 25.321883] CPU0 CPU1 [ 25.326514] ---- ---- [ 25.331145] lock(sk_lock-AF_INET); [ 25.334828] lock(rtnl_mutex); [ 25.340593] lock(sk_lock-AF_INET); [ 25.346789] lock(rtnl_mutex); [ 25.350038] [ 25.350038] *** DEADLOCK *** [ 25.350038] [ 25.356070] 1 lock held by syzkaller192193/4158: [ 25.360794] #0: (sk_lock-AF_INET){+.+.}, at: [<00000000484c5552>] ip_setsockopt+0x8c/0xb0 [ 25.369264] [ 25.369264] stack backtrace: [ 25.373729] CPU: 0 PID: 4158 Comm: syzkaller192193 Not tainted 4.15.0+ #285 [ 25.380802] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 25.390142] Call Trace: [ 25.392705] dump_stack+0x194/0x257 [ 25.396301] ? arch_local_irq_restore+0x53/0x53 [ 25.400941] print_circular_bug.isra.37+0x2cd/0x2dc [ 25.405925] ? save_trace+0xe0/0x2b0 [ 25.409609] __lock_acquire+0x30a8/0x3e00 [ 25.413728] ? print_irqtrace_events+0x270/0x270 [ 25.418455] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 25.423616] ? print_irqtrace_events+0x270/0x270 [ 25.428338] ? __lock_acquire+0x664/0x3e00 [ 25.432544] ? print_irqtrace_events+0x270/0x270 [ 25.437268] ? __lock_acquire+0x664/0x3e00 [ 25.441469] ? find_held_lock+0x35/0x1d0 [ 25.445500] ? check_noncircular+0x20/0x20 [ 25.449703] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 25.454866] ? check_noncircular+0x20/0x20 [ 25.459072] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 25.464232] lock_acquire+0x1d5/0x580 [ 25.468003] ? lock_acquire+0x1d5/0x580 [ 25.471952] ? rtnl_lock+0x17/0x20 [ 25.475460] ? lock_release+0xa40/0xa40 [ 25.479403] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 25.485256] ? rcu_note_context_switch+0x710/0x710 [ 25.490153] ? __might_sleep+0x95/0x190 [ 25.494097] ? rtnl_lock+0x17/0x20 [ 25.497607] __mutex_lock+0x16f/0x1a80 [ 25.501462] ? rtnl_lock+0x17/0x20 [ 25.504966] ? lock_downgrade+0x980/0x980 [ 25.509082] ? rtnl_lock+0x17/0x20 [ 25.512591] ? mutex_lock_io_nested+0x1900/0x1900 [ 25.517401] ? is_bpf_text_address+0x7b/0x120 [ 25.521863] ? print_irqtrace_events+0x270/0x270 [ 25.526593] ? depot_save_stack+0x3b5/0x490 [ 25.530883] ? lock_downgrade+0x980/0x980 [ 25.535000] ? lock_release+0xa40/0xa40 [ 25.538955] ? mark_held_locks+0xaf/0x100 [ 25.543075] ? _raw_spin_unlock_irqrestore+0x31/0xba [ 25.548150] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 25.553132] ? trace_hardirqs_on+0xd/0x10 [ 25.557249] ? depot_save_stack+0x3b5/0x490 [ 25.561542] ? save_stack+0xa3/0xd0 [ 25.565137] ? save_stack+0x43/0xd0 [ 25.568729] ? kasan_kmalloc+0xad/0xe0 [ 25.572583] ? kmem_cache_alloc_trace+0x136/0x750 [ 25.577392] ? tee_tg_check+0xed/0x280 [ 25.581249] ? xt_check_target+0x22c/0x7d0 [ 25.585451] ? find_check_entry.isra.8+0x8c8/0xcb0 [ 25.590348] ? translate_table+0xed1/0x1610 [ 25.594637] ? do_ipt_set_ctl+0x370/0x5f0 [ 25.598750] ? nf_setsockopt+0x67/0xc0 [ 25.602604] ? ip_setsockopt+0xa1/0xb0 [ 25.606457] ? raw_setsockopt+0xb7/0xd0 [ 25.610397] ? sock_common_setsockopt+0x95/0xd0 [ 25.615033] ? SyS_setsockopt+0x189/0x360 [ 25.619147] ? entry_SYSCALL_64_fastpath+0x29/0xa0 [ 25.624043] mutex_lock_nested+0x16/0x20 [ 25.628068] ? mutex_lock_nested+0x16/0x20 [ 25.632269] rtnl_lock+0x17/0x20 [ 25.635604] register_netdevice_notifier+0xad/0x860 [ 25.640586] ? __dev_close_many+0x330/0x330 [ 25.644876] ? __lock_is_held+0xb6/0x140 [ 25.648905] ? tee_tg_check+0xed/0x280 [ 25.652759] ? rcu_read_lock_sched_held+0x108/0x120 [ 25.657741] ? kmem_cache_alloc_trace+0x456/0x750 [ 25.662552] ? __kernel_text_address+0xd/0x40 [ 25.667017] ? wait_for_completion+0x770/0x770 [ 25.671570] tee_tg_check+0x1a0/0x280 [ 25.675336] ? tee_tg4+0x170/0x170 [ 25.678843] xt_check_target+0x22c/0x7d0 [ 25.682873] ? xt_target_seq_next+0x30/0x30 [ 25.687165] ? save_stack+0xa3/0xd0 [ 25.690761] ? kasan_slab_free+0x71/0xc0 [ 25.694793] ? kfree+0xd6/0x260 [ 25.698041] ? kvfree+0x36/0x60 [ 25.701289] ? mutex_unlock+0xd/0x10 [ 25.704971] ? xt_find_target+0x17b/0x1e0 [ 25.709091] find_check_entry.isra.8+0x8c8/0xcb0 [ 25.713817] ? ipt_do_table+0x1860/0x1860 [ 25.717932] ? mark_held_locks+0xaf/0x100 [ 25.722048] ? kfree+0xf0/0x260 [ 25.725294] ? trace_hardirqs_on+0xd/0x10 [ 25.729409] translate_table+0xed1/0x1610 [ 25.733529] ? alloc_counters.isra.11+0x7d0/0x7d0 [ 25.738337] ? kasan_check_write+0x14/0x20 [ 25.742540] ? _copy_from_user+0x99/0x110 [ 25.746657] do_ipt_set_ctl+0x370/0x5f0 [ 25.750597] ? translate_compat_table+0x1b90/0x1b90 [ 25.755581] ? mutex_unlock+0xd/0x10 [ 25.759263] ? nf_sockopt_find.constprop.0+0x1a7/0x220 [ 25.764510] nf_setsockopt+0x67/0xc0 [ 25.768193] ip_setsockopt+0xa1/0xb0 [ 25.771876] raw_setsockopt+0xb7/0xd0 [ 25.775646] sock_common_setsockopt+0x95/0xd0 [ 25.780110] SyS_setsockopt+0x189/0x360 [ 25.784056] ? SyS_recv+0x40/0x40 [ 25.787479] ? entry_SYSCALL_64_fastpath+0x5/0xa0 [ 25.792290] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 25.797276] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 25.802002] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 25.806731] RIP: 0033:0x440a09 [ 25.809891] RSP: 002b:00007ffeabca0a38 EFLAGS: 00000207 ORIG_RAX: 0000000000000036 [ 25.817566] RAX: ffffffffffffffda RBX: ffffffffffffffff RCX: 0000000000440a09 [ 25.824804] RDX: 0000000