Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.0.177' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 29.582352] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 29.595288] IPVS: ftp: loaded support on port[0] = 21 executing program executing program [ 29.710319] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 29.721645] IPVS: ftp: loaded support on port[0] = 21 [ 29.771920] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 29.804860] [ 29.806869] ====================================================== [ 29.813166] WARNING: possible circular locking dependency detected [ 29.819460] 4.14.232-syzkaller #0 Not tainted [ 29.823931] ------------------------------------------------------ [ 29.830222] kworker/u4:4/2970 is trying to acquire lock: [ 29.835641] (&table[i].mutex){+.+.}, at: [] nf_tables_netdev_event+0x10d/0x4d0 [ 29.844989] [ 29.844989] but task is already holding lock: [ 29.851369] (rtnl_mutex){+.+.}, at: [] ip6gre_exit_net+0x70/0x570 [ 29.859699] [ 29.859699] which lock already depends on the new lock. [ 29.859699] [ 29.868012] [ 29.868012] the existing dependency chain (in reverse order) is: [ 29.875719] [ 29.875719] -> #2 (rtnl_mutex){+.+.}: [ 29.881176] __mutex_lock+0xc4/0x1310 [ 29.885650] unregister_netdevice_notifier+0x5e/0x2b0 [ 29.891335] tee_tg_destroy+0x5c/0xb0 [ 29.895641] cleanup_entry+0x232/0x310 [ 29.900054] __do_replace+0x38d/0x580 [ 29.904438] do_ip6t_set_ctl+0x256/0x3b0 [ 29.909022] nf_setsockopt+0x5f/0xb0 [ 29.913359] ipv6_setsockopt+0xc0/0x120 [ 29.917851] udpv6_setsockopt+0x45/0x80 [ 29.922510] SyS_setsockopt+0x110/0x1e0 [ 29.927077] do_syscall_64+0x1d5/0x640 [ 29.931475] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 29.937950] [ 29.937950] -> #1 (&xt[i].mutex){+.+.}: [ 29.943393] __mutex_lock+0xc4/0x1310 [ 29.947879] match_revfn+0x43/0x210 [ 29.952172] xt_find_revision+0x8d/0x1d0 [ 29.957757] nfnl_compat_get+0x1f7/0x870 [ 29.962695] nfnetlink_rcv_msg+0x9bb/0xc00 [ 29.967703] netlink_rcv_skb+0x125/0x390 [ 29.972958] nfnetlink_rcv+0x1ab/0x1da0 [ 29.977527] netlink_unicast+0x437/0x610 [ 29.982081] netlink_sendmsg+0x62e/0xb80 [ 29.986890] sock_sendmsg+0xb5/0x100 [ 29.991645] ___sys_sendmsg+0x6c8/0x800 [ 29.996159] __sys_sendmsg+0xa3/0x120 [ 30.000477] SyS_sendmsg+0x27/0x40 [ 30.004610] do_syscall_64+0x1d5/0x640 [ 30.009176] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 30.014947] [ 30.014947] -> #0 (&table[i].mutex){+.+.}: [ 30.020651] lock_acquire+0x170/0x3f0 [ 30.025037] __mutex_lock+0xc4/0x1310 [ 30.029343] nf_tables_netdev_event+0x10d/0x4d0 [ 30.034508] notifier_call_chain+0x108/0x1a0 [ 30.039545] rollback_registered_many+0x765/0xba0 [ 30.044895] unregister_netdevice_many.part.0+0x18/0x2e0 [ 30.050838] unregister_netdevice_many+0x36/0x50 [ 30.056186] ip6gre_exit_net+0x41e/0x570 [ 30.060913] ops_exit_list+0xa5/0x150 [ 30.065222] cleanup_net+0x3b3/0x840 [ 30.069428] process_one_work+0x793/0x14a0 [ 30.074161] worker_thread+0x5cc/0xff0 [ 30.078540] kthread+0x30d/0x420 [ 30.082401] ret_from_fork+0x24/0x30 [ 30.086617] [ 30.086617] other info that might help us debug this: [ 30.086617] [ 30.094730] Chain exists of: [ 30.094730] &table[i].mutex --> &xt[i].mutex --> rtnl_mutex [ 30.094730] [ 30.104934] Possible unsafe locking scenario: [ 30.104934] [ 30.111127] CPU0 CPU1 [ 30.115770] ---- ---- [ 30.120494] lock(rtnl_mutex); [ 30.123747] lock(&xt[i].mutex); [ 30.129788] lock(rtnl_mutex); [ 30.135646] lock(&table[i].mutex); [ 30.139332] [ 30.139332] *** DEADLOCK *** [ 30.139332] [ 30.145375] 4 locks held by kworker/u4:4/2970: [ 30.149926] #0: ("%s""netns"){+.+.}, at: [] process_one_work+0x6b0/0x14a0 [ 30.158578] #1: (net_cleanup_work){+.+.}, at: [] process_one_work+0x6e6/0x14a0 [ 30.167675] #2: (net_mutex){+.+.}, at: [] cleanup_net+0x110/0x840 [ 30.175711] #3: (rtnl_mutex){+.+.}, at: [] ip6gre_exit_net+0x70/0x570 [ 30.184331] [ 30.184331] stack backtrace: [ 30.189070] CPU: 0 PID: 2970 Comm: kworker/u4:4 Not tainted 4.14.232-syzkaller #0 [ 30.197213] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 30.206641] Workqueue: netns cleanup_net [ 30.210777] Call Trace: [ 30.213365] dump_stack+0x1b2/0x281 [ 30.216982] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 30.223218] __lock_acquire+0x2e0e/0x3f20 [ 30.227342] ? unwind_next_frame+0x404/0x17d0 [ 30.231898] ? trace_hardirqs_on+0x10/0x10 [ 30.236122] ? check_usage_forwards+0x2d0/0x2d0 [ 30.240978] ? ret_from_fork+0x24/0x30 [ 30.245131] lock_acquire+0x170/0x3f0 [ 30.248956] ? nf_tables_netdev_event+0x10d/0x4d0 [ 30.253811] ? nf_tables_netdev_event+0x10d/0x4d0 [ 30.258638] __mutex_lock+0xc4/0x1310 [ 30.262534] ? nf_tables_netdev_event+0x10d/0x4d0 [ 30.267362] ? nf_tables_netdev_event+0x10d/0x4d0 [ 30.272182] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 30.277632] ? trace_hardirqs_on+0x10/0x10 [ 30.282018] ? trace_hardirqs_on_caller+0x3a8/0x580 [ 30.287008] ? lock_downgrade+0x740/0x740 [ 30.291142] nf_tables_netdev_event+0x10d/0x4d0 [ 30.295788] ? mirred_device_event+0x12f/0x170 [ 30.300432] ? nf_tables_netdev_init_net+0x140/0x140 [ 30.305510] ? mirred_device_event+0x12f/0x170 [ 30.310064] ? __local_bh_enable_ip+0xc1/0x170 [ 30.314982] notifier_call_chain+0x108/0x1a0 [ 30.319372] rollback_registered_many+0x765/0xba0 [ 30.324207] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 30.329822] ? netdev_state_change+0xf0/0xf0 [ 30.334402] ? lock_acquire+0x170/0x3f0 [ 30.338362] unregister_netdevice_many.part.0+0x18/0x2e0 [ 30.343785] unregister_netdevice_many+0x36/0x50 [ 30.348515] ip6gre_exit_net+0x41e/0x570 [ 30.352738] ? lock_downgrade+0x740/0x740 [ 30.356857] ? ip6gre_dellink+0x260/0x260 [ 30.360978] ? ip6gre_dellink+0x260/0x260 [ 30.365286] ops_exit_list+0xa5/0x150 [ 30.369060] cleanup_net+0x3b3/0x840 [ 30.372820] ? net_drop_ns+0x70/0x70 [ 30.376687] ? lock_acquire+0x170/0x3f0 [ 30.380732] ? rcu_lockdep_current_cpu_online+0xed/0x140 [ 30.386333] process_one_work+0x793/0x14a0 [ 30.390546] ? work_busy+0x320/0x320 [ 30.394234] ? worker_thread+0x158/0xff0 [ 30.398529] ? _raw_spin_unlock_irq+0x24/0x80 [ 30.402999] worker_thread+0x5cc/0xff0 [ 30.406861] ? rescuer_thread+0xc80/0xc80 [ 30.411005] kthread+0x30d/0x420 [ 30.414348] ? kthread_create_on_node+0xd0/0xd0 [ 30.419333] ret_from_fork+0x24/0x30 executing program [ 30.991068] IPVS: ftp: loaded support on port[0] = 21 [ 31.020407] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 31.031528] IPVS: ftp: loaded support on port[0] = 21 executing program [ 31.076355] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program executing program [ 31.658374] IPVS: ftp: loaded support on port[0] = 21 [ 31.689230] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 31.700227] IPVS: ftp: loaded support on port[0] = 21 [ 31.732690] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 32.766311] IPVS: ftp: loaded support on port[0] = 21 [ 32.801733] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 33.873172] IPVS: ftp: loaded support on port[0] = 21 [ 33.903649] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 33.913968] IPVS: ftp: loaded support on port[0] = 21 executing program [ 33.959390] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 34.578903] IPVS: ftp: loaded support on port[0] = 21 [ 34.611756] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program executing program [ 35.701058] IPVS: ftp: loaded support on port[0] = 21 [ 35.735096] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 35.745529] IPVS: ftp: loaded support on port[0] = 21 [ 35.778005] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 36.403315] IPVS: ftp: loaded support on port[0] = 21 [ 36.432806] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 36.443674] IPVS: ftp: loaded support on port[0] = 21 executing program [ 36.492263] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 37.592020] IPVS: ftp: loaded support on port[0] = 21 [ 37.625983] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 38.673525] IPVS: ftp: loaded support on port[0] = 21 [ 38.704327] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 39.403905] IPVS: ftp: loaded support on port[0] = 21 [ 39.436324] ip6_tables: ip6tables: counters copy to user failed while replacing table