[?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. [ 17.546786] audit: type=1400 audit(1517314220.287: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.28' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 29.966540] audit: type=1400 audit(1517314232.707:7): avc: denied { map } for pid=4160 comm="syzkaller801148" path="/root/syzkaller801148048" 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 [ 30.043063] [ 30.044732] ====================================================== [ 30.051013] WARNING: possible circular locking dependency detected [ 30.057298] 4.15.0+ #286 Not tainted [ 30.060976] ------------------------------------------------------ [ 30.067257] syzkaller801148/4160 is trying to acquire lock: [ 30.072930] (rtnl_mutex){+.+.}, at: [<000000008cafc937>] rtnl_lock+0x17/0x20 [ 30.080189] [ 30.080189] but task is already holding lock: [ 30.086131] (sk_lock-AF_INET){+.+.}, at: [<0000000011c2680c>] ip_setsockopt+0x8c/0xb0 [ 30.094158] [ 30.094158] which lock already depends on the new lock. [ 30.094158] [ 30.102438] [ 30.102438] the existing dependency chain (in reverse order) is: [ 30.110023] [ 30.110023] -> #1 (sk_lock-AF_INET){+.+.}: [ 30.115707] lock_sock_nested+0xc2/0x110 [ 30.120256] do_ip_getsockopt+0x1b3/0x2170 [ 30.124977] ip_getsockopt+0x90/0x220 [ 30.129281] udp_getsockopt+0x45/0x80 [ 30.133576] sock_common_getsockopt+0x95/0xd0 [ 30.138571] SyS_getsockopt+0x178/0x340 [ 30.143386] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 30.148628] [ 30.148628] -> #0 (rtnl_mutex){+.+.}: [ 30.153886] lock_acquire+0x1d5/0x580 [ 30.158173] __mutex_lock+0x16f/0x1a80 [ 30.162550] mutex_lock_nested+0x16/0x20 [ 30.167101] rtnl_lock+0x17/0x20 [ 30.170955] register_netdevice_notifier+0xad/0x860 [ 30.176457] tee_tg_check+0x1a0/0x280 [ 30.180747] xt_check_target+0x22c/0x7d0 [ 30.185297] find_check_entry.isra.8+0x8c8/0xcb0 [ 30.190544] translate_table+0xed1/0x1610 [ 30.195179] do_ipt_set_ctl+0x370/0x5f0 [ 30.199640] nf_setsockopt+0x67/0xc0 [ 30.203842] ip_setsockopt+0xa1/0xb0 [ 30.208044] raw_setsockopt+0xb7/0xd0 [ 30.212333] sock_common_setsockopt+0x95/0xd0 [ 30.217316] SyS_setsockopt+0x189/0x360 [ 30.221780] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 30.227019] [ 30.227019] other info that might help us debug this: [ 30.227019] [ 30.235128] Possible unsafe locking scenario: [ 30.235128] [ 30.241148] CPU0 CPU1 [ 30.245780] ---- ---- [ 30.250422] lock(sk_lock-AF_INET); [ 30.254101] lock(rtnl_mutex); [ 30.259871] lock(sk_lock-AF_INET); [ 30.266070] lock(rtnl_mutex); [ 30.269317] [ 30.269317] *** DEADLOCK *** [ 30.269317] [ 30.275341] 1 lock held by syzkaller801148/4160: [ 30.280063] #0: (sk_lock-AF_INET){+.+.}, at: [<0000000011c2680c>] ip_setsockopt+0x8c/0xb0 [ 30.288534] [ 30.288534] stack backtrace: [ 30.293001] CPU: 0 PID: 4160 Comm: syzkaller801148 Not tainted 4.15.0+ #286 [ 30.300469] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 30.309796] Call Trace: [ 30.312358] dump_stack+0x194/0x257 [ 30.315953] ? arch_local_irq_restore+0x53/0x53 [ 30.320592] print_circular_bug.isra.37+0x2cd/0x2dc [ 30.325573] ? save_trace+0xe0/0x2b0 [ 30.329256] __lock_acquire+0x30a8/0x3e00 [ 30.333372] ? print_irqtrace_events+0x270/0x270 [ 30.338096] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 30.343260] ? print_irqtrace_events+0x270/0x270 [ 30.347981] ? __lock_acquire+0x664/0x3e00 [ 30.352184] ? print_irqtrace_events+0x270/0x270 [ 30.356916] ? __lock_acquire+0x664/0x3e00 [ 30.361117] ? find_held_lock+0x35/0x1d0 [ 30.365146] ? check_noncircular+0x20/0x20 [ 30.369347] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 30.374507] ? debug_check_no_locks_freed+0x3c0/0x3c0 [ 30.379664] lock_acquire+0x1d5/0x580 [ 30.383429] ? lock_acquire+0x1d5/0x580 [ 30.387374] ? rtnl_lock+0x17/0x20 [ 30.390882] ? lock_release+0xa40/0xa40 [ 30.394824] ? trace_event_raw_event_sched_switch+0x800/0x800 [ 30.400674] ? rcu_note_context_switch+0x710/0x710 [ 30.405571] ? __might_sleep+0x95/0x190 [ 30.409513] ? rtnl_lock+0x17/0x20 [ 30.413028] __mutex_lock+0x16f/0x1a80 [ 30.416881] ? rtnl_lock+0x17/0x20 [ 30.420388] ? lock_downgrade+0x980/0x980 [ 30.424502] ? rtnl_lock+0x17/0x20 [ 30.428010] ? mutex_lock_io_nested+0x1900/0x1900 [ 30.432822] ? is_bpf_text_address+0x7b/0x120 [ 30.437289] ? print_irqtrace_events+0x270/0x270 [ 30.442017] ? depot_save_stack+0x3b5/0x490 [ 30.446308] ? lock_downgrade+0x980/0x980 [ 30.450425] ? lock_release+0xa40/0xa40 [ 30.454365] ? mark_held_locks+0xaf/0x100 [ 30.458480] ? _raw_spin_unlock_irqrestore+0x31/0xba [ 30.463557] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 30.468538] ? trace_hardirqs_on+0xd/0x10 [ 30.472654] ? depot_save_stack+0x3b5/0x490 [ 30.476946] ? save_stack+0xa3/0xd0 [ 30.480541] ? save_stack+0x43/0xd0 [ 30.484151] ? kasan_kmalloc+0xad/0xe0 [ 30.488216] ? kmem_cache_alloc_trace+0x136/0x750 [ 30.493031] ? tee_tg_check+0xed/0x280 [ 30.496885] ? xt_check_target+0x22c/0x7d0 [ 30.501086] ? find_check_entry.isra.8+0x8c8/0xcb0 [ 30.505981] ? translate_table+0xed1/0x1610 [ 30.510278] ? do_ipt_set_ctl+0x370/0x5f0 [ 30.514402] ? nf_setsockopt+0x67/0xc0 [ 30.518260] ? ip_setsockopt+0xa1/0xb0 [ 30.522114] ? raw_setsockopt+0xb7/0xd0 [ 30.526065] ? sock_common_setsockopt+0x95/0xd0 [ 30.530701] ? SyS_setsockopt+0x189/0x360 [ 30.534824] ? entry_SYSCALL_64_fastpath+0x29/0xa0 [ 30.539724] mutex_lock_nested+0x16/0x20 [ 30.543751] ? mutex_lock_nested+0x16/0x20 [ 30.547953] rtnl_lock+0x17/0x20 [ 30.551287] register_netdevice_notifier+0xad/0x860 [ 30.556275] ? __dev_close_many+0x330/0x330 [ 30.560578] ? __lock_is_held+0xb6/0x140 [ 30.564610] ? tee_tg_check+0xed/0x280 [ 30.568467] ? rcu_read_lock_sched_held+0x108/0x120 [ 30.573448] ? kmem_cache_alloc_trace+0x456/0x750 [ 30.578259] ? __kernel_text_address+0xd/0x40 [ 30.582721] ? wait_for_completion+0x770/0x770 [ 30.587281] tee_tg_check+0x1a0/0x280 [ 30.591059] ? tee_tg4+0x170/0x170 [ 30.594569] xt_check_target+0x22c/0x7d0 [ 30.598599] ? xt_target_seq_next+0x30/0x30 [ 30.602907] ? save_stack+0xa3/0xd0 [ 30.606520] ? kasan_slab_free+0x71/0xc0 [ 30.610550] ? kfree+0xd6/0x260 [ 30.613799] ? kvfree+0x36/0x60 [ 30.617068] ? mutex_unlock+0xd/0x10 [ 30.620749] ? xt_find_target+0x17b/0x1e0 [ 30.624866] find_check_entry.isra.8+0x8c8/0xcb0 [ 30.629591] ? ipt_do_table+0x1860/0x1860 [ 30.633709] ? mark_held_locks+0xaf/0x100 [ 30.637833] ? kfree+0xf0/0x260 [ 30.641082] ? trace_hardirqs_on+0xd/0x10 [ 30.645199] translate_table+0xed1/0x1610 [ 30.649319] ? alloc_counters.isra.11+0x7d0/0x7d0 [ 30.654134] ? kasan_check_write+0x14/0x20 [ 30.658340] ? _copy_from_user+0x99/0x110 [ 30.662455] do_ipt_set_ctl+0x370/0x5f0 [ 30.666397] ? translate_compat_table+0x1b90/0x1b90 [ 30.671403] ? mutex_unlock+0xd/0x10 [ 30.675089] ? nf_sockopt_find.constprop.0+0x1a7/0x220 [ 30.680336] nf_setsockopt+0x67/0xc0 [ 30.684020] ip_setsockopt+0xa1/0xb0 [ 30.687703] raw_setsockopt+0xb7/0xd0 [ 30.691475] sock_common_setsockopt+0x95/0xd0 [ 30.695943] SyS_setsockopt+0x189/0x360 [ 30.699885] ? SyS_recv+0x40/0x40 [ 30.703309] ? entry_SYSCALL_64_fastpath+0x5/0xa0 [ 30.708124] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 30.713110] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 30.717835] entry_SYSCALL_64_fastpath+0x29/0xa0 [ 30.722561] RIP: 0033:0x440c39 [ 30.725718] RSP: 002b:00007ffcf314f6c8 EFLAGS: 00000207 ORIG_RAX: 0000000000000036 [ 30.733396] RAX: ffffffffffffffda RBX: ffffffffffffffff RCX: 0000000000440c39 [ 30.740637] RDX: 0000000000000040 RSI: 0000000000000000 RDI: 00