[ OK ] Reached target Graphical Interface. Starting Update UTMP about System Runlevel Changes... [ OK ] Started Update UTMP about System Runlevel Changes. Starting Load/Save RF Kill Switch Status... [ OK ] Started Load/Save RF Kill Switch Status. Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.0.91' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 28.317580] IPVS: ftp: loaded support on port[0] = 21 [ 28.354908] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 28.382267] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 28.400073] [ 28.401706] ====================================================== [ 28.408116] WARNING: possible circular locking dependency detected [ 28.414574] 4.14.238-syzkaller #0 Not tainted [ 28.419044] ------------------------------------------------------ [ 28.425424] syz-executor881/8000 is trying to acquire lock: [ 28.431112] (&table[i].mutex){+.+.}, at: [] nf_tables_netdev_event+0x10d/0x4d0 [ 28.440105] [ 28.440105] but task is already holding lock: [ 28.446048] (rtnl_mutex){+.+.}, at: [] tun_chr_close+0x34/0x60 [ 28.453661] [ 28.453661] which lock already depends on the new lock. [ 28.453661] [ 28.461946] [ 28.461946] the existing dependency chain (in reverse order) is: [ 28.469536] [ 28.469536] -> #2 (rtnl_mutex){+.+.}: [ 28.474845] __mutex_lock+0xc4/0x1310 [ 28.479165] unregister_netdevice_notifier+0x5e/0x2b0 [ 28.484849] tee_tg_destroy+0x5c/0xb0 [ 28.489166] cleanup_entry+0x232/0x310 [ 28.493551] __do_replace+0x38d/0x580 [ 28.497845] do_ip6t_set_ctl+0x256/0x3b0 [ 28.502400] nf_setsockopt+0x5f/0xb0 [ 28.506632] ipv6_setsockopt+0xc0/0x120 [ 28.511206] udpv6_setsockopt+0x45/0x80 [ 28.515690] SyS_setsockopt+0x110/0x1e0 [ 28.520432] do_syscall_64+0x1d5/0x640 [ 28.524820] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 28.530502] [ 28.530502] -> #1 (&xt[i].mutex){+.+.}: [ 28.536141] __mutex_lock+0xc4/0x1310 [ 28.540494] match_revfn+0x43/0x210 [ 28.544621] xt_find_revision+0x8d/0x1d0 [ 28.549838] nfnl_compat_get+0x1f7/0x870 [ 28.554392] nfnetlink_rcv_msg+0x9bb/0xc00 [ 28.559219] netlink_rcv_skb+0x125/0x390 [ 28.563860] nfnetlink_rcv+0x1ab/0x1da0 [ 28.568326] netlink_unicast+0x437/0x610 [ 28.572876] netlink_sendmsg+0x62e/0xb80 [ 28.577445] sock_sendmsg+0xb5/0x100 [ 28.581651] ___sys_sendmsg+0x6c8/0x800 [ 28.586141] __sys_sendmsg+0xa3/0x120 [ 28.590431] SyS_sendmsg+0x27/0x40 [ 28.594464] do_syscall_64+0x1d5/0x640 [ 28.598846] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 28.604612] [ 28.604612] -> #0 (&table[i].mutex){+.+.}: [ 28.610476] lock_acquire+0x170/0x3f0 [ 28.614775] __mutex_lock+0xc4/0x1310 [ 28.619067] nf_tables_netdev_event+0x10d/0x4d0 [ 28.624327] notifier_call_chain+0x108/0x1a0 [ 28.629242] rollback_registered_many+0x765/0xba0 [ 28.634598] rollback_registered+0xca/0x170 [ 28.639596] unregister_netdevice_queue+0x1b4/0x360 [ 28.645116] __tun_detach+0xca2/0xf60 [ 28.649470] tun_chr_close+0x41/0x60 [ 28.653678] __fput+0x25f/0x7a0 [ 28.657450] task_work_run+0x11f/0x190 [ 28.661918] do_exit+0xa44/0x2850 [ 28.665910] do_group_exit+0x100/0x2e0 [ 28.670393] get_signal+0x38d/0x1ca0 [ 28.674602] do_signal+0x7c/0x1550 [ 28.678633] exit_to_usermode_loop+0x160/0x200 [ 28.683793] do_syscall_64+0x4a3/0x640 [ 28.688187] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 28.693864] [ 28.693864] other info that might help us debug this: [ 28.693864] [ 28.702418] Chain exists of: [ 28.702418] &table[i].mutex --> &xt[i].mutex --> rtnl_mutex [ 28.702418] [ 28.712808] Possible unsafe locking scenario: [ 28.712808] [ 28.719109] CPU0 CPU1 [ 28.723921] ---- ---- [ 28.728558] lock(rtnl_mutex); [ 28.731810] lock(&xt[i].mutex); [ 28.738053] lock(rtnl_mutex); [ 28.743926] lock(&table[i].mutex); [ 28.747699] [ 28.747699] *** DEADLOCK *** [ 28.747699] [ 28.754082] 1 lock held by syz-executor881/8000: [ 28.758807] #0: (rtnl_mutex){+.+.}, at: [] tun_chr_close+0x34/0x60 [ 28.767032] [ 28.767032] stack backtrace: [ 28.771504] CPU: 0 PID: 8000 Comm: syz-executor881 Not tainted 4.14.238-syzkaller #0 [ 28.779364] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 28.789140] Call Trace: [ 28.791705] dump_stack+0x1b2/0x281 [ 28.795326] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 28.801124] __lock_acquire+0x2e0e/0x3f20 [ 28.805332] ? lock_downgrade+0x740/0x740 [ 28.809451] ? unwind_next_frame+0xe54/0x17d0 [ 28.813919] ? trace_hardirqs_on+0x10/0x10 [ 28.818128] ? kernel_text_address+0xbd/0xf0 [ 28.822681] ? __kernel_text_address+0x9/0x30 [ 28.827149] ? unwind_get_return_address+0x51/0x90 [ 28.832205] lock_acquire+0x170/0x3f0 [ 28.835995] ? nf_tables_netdev_event+0x10d/0x4d0 [ 28.840824] ? nf_tables_netdev_event+0x10d/0x4d0 [ 28.845732] __mutex_lock+0xc4/0x1310 [ 28.849514] ? nf_tables_netdev_event+0x10d/0x4d0 [ 28.854457] ? nf_tables_netdev_event+0x10d/0x4d0 [ 28.859274] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 28.864697] ? trace_hardirqs_on+0x10/0x10 [ 28.868906] ? trace_hardirqs_on_caller+0x3a8/0x580 [ 28.874099] ? lock_downgrade+0x740/0x740 [ 28.878218] nf_tables_netdev_event+0x10d/0x4d0 [ 28.882858] ? mirred_device_event+0x12f/0x170 [ 28.887420] ? nf_tables_netdev_init_net+0x140/0x140 [ 28.892507] ? mirred_device_event+0x12f/0x170 [ 28.897066] ? __local_bh_enable_ip+0xc1/0x170 [ 28.901671] notifier_call_chain+0x108/0x1a0 [ 28.906067] rollback_registered_many+0x765/0xba0 [ 28.910884] ? netdev_state_change+0xf0/0xf0 [ 28.915266] ? queue_delayed_work_on+0x114/0x1d0 [ 28.920016] rollback_registered+0xca/0x170 [ 28.924310] ? rollback_registered_many+0xba0/0xba0 [ 28.929303] ? linkwatch_schedule_work+0xe5/0x110 [ 28.934115] unregister_netdevice_queue+0x1b4/0x360 [ 28.939222] __tun_detach+0xca2/0xf60 [ 28.943689] ? tun_recvmsg+0x3b0/0x3b0 [ 28.947548] tun_chr_close+0x41/0x60 [ 28.951929] __fput+0x25f/0x7a0 [ 28.955181] task_work_run+0x11f/0x190 [ 28.959057] do_exit+0xa44/0x2850 [ 28.962489] ? wake_up_q+0x82/0xd0 [ 28.966064] ? mm_update_next_owner+0x5b0/0x5b0 [ 28.970708] ? get_signal+0x323/0x1ca0 [ 28.974587] ? lock_acquire+0x170/0x3f0 [ 28.978536] ? lock_downgrade+0x740/0x740 [ 28.982758] do_group_exit+0x100/0x2e0 [ 28.986618] get_signal+0x38d/0x1ca0 [ 28.990303] ? do_futex+0x127/0x1570 [ 28.993990] ? apparmor_file_alloc_security+0x129/0x800 [ 28.999428] do_signal+0x7c/0x1550 [ 29.003069] ? setup_sigcontext+0x820/0x820 [ 29.007363] ? __fd_install+0x227/0x5c0 [ 29.011334] ? get_unused_fd_flags+0xc0/0xc0 [ 29.015717] ? sock_alloc_file+0x1ae/0x2e0 [ 29.019924] ? SyS_futex+0x1da/0x290 [ 29.023609] ? SyS_futex+0x1e3/0x290 [ 29.027354] ? exit_to_usermode_loop+0x41/0x200 [ 29.032023] exit_to_usermode_loop+0x160/0x200 [ 29.037457] do_syscall_64+0x4a3/0x640 [ 29.041361] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 29.046577] RIP: 0033:0x446ac9 [ 29.049767] RSP: 002b:00007f35ab4272f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca [ 29.057466] RAX: fffffffffffffe00 RBX: 00000000004cc4f0 RCX: 0000000000446ac9 [ 29.064707] RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00000000004cc4f8 [ 29.071953] RBP: 000000000049c004 R08: 0000000000000000 R09: 0000000000000000 [ 29.079294] R10: 0000000000000000 R11: 0000000000000246 R12: 000000002