Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.0.70' (ECDSA) to the list of known hosts. executing program executing program syzkaller login: [ 28.522298] ip_tables: iptables: counters copy to user failed while replacing table [ 28.533380] IPVS: ftp: loaded support on port[0] = 21 executing program [ 28.604228] ip_tables: iptables: counters copy to user failed while replacing table [ 28.614900] IPVS: ftp: loaded support on port[0] = 21 [ 28.656090] ip_tables: iptables: counters copy to user failed while replacing table [ 28.696271] [ 28.697917] ====================================================== [ 28.704255] WARNING: possible circular locking dependency detected [ 28.710565] 4.14.229-syzkaller #0 Not tainted [ 28.715038] ------------------------------------------------------ [ 28.721357] kworker/u4:2/75 is trying to acquire lock: [ 28.726642] (&table[i].mutex){+.+.}, at: [] nf_tables_netdev_event+0x10d/0x4d0 [ 28.735657] [ 28.735657] but task is already holding lock: [ 28.741608] (rtnl_mutex){+.+.}, at: [] ip6gre_exit_net+0x70/0x570 [ 28.749472] [ 28.749472] which lock already depends on the new lock. [ 28.749472] [ 28.757762] [ 28.757762] the existing dependency chain (in reverse order) is: [ 28.765354] [ 28.765354] -> #2 (rtnl_mutex){+.+.}: [ 28.770614] __mutex_lock+0xc4/0x1310 [ 28.774910] unregister_netdevice_notifier+0x5e/0x2b0 [ 28.780596] tee_tg_destroy+0x5c/0xb0 [ 28.784910] cleanup_entry+0x1fd/0x2d0 [ 28.789296] __do_replace+0x38d/0x570 [ 28.793592] do_ipt_set_ctl+0x256/0x3a0 [ 28.798079] nf_setsockopt+0x5f/0xb0 [ 28.802287] ip_setsockopt+0x94/0xb0 [ 28.806494] raw_setsockopt+0xac/0xd0 [ 28.810790] SyS_setsockopt+0x110/0x1e0 [ 28.815260] do_syscall_64+0x1d5/0x640 [ 28.819643] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 28.825341] [ 28.825341] -> #1 (&xt[i].mutex){+.+.}: [ 28.830774] __mutex_lock+0xc4/0x1310 [ 28.835089] match_revfn+0x43/0x210 [ 28.839234] xt_find_revision+0x8d/0x1d0 [ 28.843789] nfnl_compat_get+0x1f7/0x870 [ 28.848360] nfnetlink_rcv_msg+0x9bb/0xc00 [ 28.853089] netlink_rcv_skb+0x125/0x390 [ 28.857646] nfnetlink_rcv+0x1ab/0x1da0 [ 28.862135] netlink_unicast+0x437/0x610 [ 28.866696] netlink_sendmsg+0x62e/0xb80 [ 28.871261] sock_sendmsg+0xb5/0x100 [ 28.875473] ___sys_sendmsg+0x6c8/0x800 [ 28.879940] __sys_sendmsg+0xa3/0x120 [ 28.884237] SyS_sendmsg+0x27/0x40 [ 28.888287] do_syscall_64+0x1d5/0x640 [ 28.892681] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 28.898377] [ 28.898377] -> #0 (&table[i].mutex){+.+.}: [ 28.904074] lock_acquire+0x170/0x3f0 [ 28.908458] __mutex_lock+0xc4/0x1310 [ 28.912755] nf_tables_netdev_event+0x10d/0x4d0 [ 28.917921] notifier_call_chain+0x108/0x1a0 [ 28.922840] rollback_registered_many+0x765/0xba0 [ 28.928180] unregister_netdevice_many.part.0+0x18/0x2e0 [ 28.934128] unregister_netdevice_many+0x36/0x50 [ 28.939378] ip6gre_exit_net+0x41e/0x570 [ 28.943934] ops_exit_list+0xa5/0x150 [ 28.948245] cleanup_net+0x3b3/0x840 [ 28.952462] process_one_work+0x793/0x14a0 [ 28.957202] worker_thread+0x5cc/0xff0 [ 28.961584] kthread+0x30d/0x420 [ 28.965532] ret_from_fork+0x24/0x30 [ 28.969738] [ 28.969738] other info that might help us debug this: [ 28.969738] [ 28.977870] Chain exists of: [ 28.977870] &table[i].mutex --> &xt[i].mutex --> rtnl_mutex [ 28.977870] [ 28.988078] Possible unsafe locking scenario: [ 28.988078] [ 28.994155] CPU0 CPU1 [ 28.998795] ---- ---- [ 29.003559] lock(rtnl_mutex); [ 29.006817] lock(&xt[i].mutex); [ 29.012798] lock(rtnl_mutex); [ 29.018572] lock(&table[i].mutex); [ 29.022262] [ 29.022262] *** DEADLOCK *** [ 29.022262] [ 29.028305] 4 locks held by kworker/u4:2/75: [ 29.032684] #0: ("%s""netns"){+.+.}, at: [] process_one_work+0x6b0/0x14a0 [ 29.041351] #1: (net_cleanup_work){+.+.}, at: [] process_one_work+0x6e6/0x14a0 [ 29.050448] #2: (net_mutex){+.+.}, at: [] cleanup_net+0x110/0x840 [ 29.058415] #3: (rtnl_mutex){+.+.}, at: [] ip6gre_exit_net+0x70/0x570 [ 29.066865] [ 29.066865] stack backtrace: [ 29.071386] CPU: 1 PID: 75 Comm: kworker/u4:2 Not tainted 4.14.229-syzkaller #0 [ 29.078808] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 29.088200] Workqueue: netns cleanup_net [ 29.092239] Call Trace: [ 29.094812] dump_stack+0x1b2/0x281 [ 29.098421] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 29.104199] __lock_acquire+0x2e0e/0x3f20 [ 29.108346] ? unwind_next_frame+0x404/0x17d0 [ 29.112824] ? trace_hardirqs_on+0x10/0x10 [ 29.117040] ? check_usage_forwards+0x2d0/0x2d0 [ 29.121694] ? ret_from_fork+0x24/0x30 [ 29.125576] lock_acquire+0x170/0x3f0 [ 29.129425] ? nf_tables_netdev_event+0x10d/0x4d0 [ 29.134246] ? nf_tables_netdev_event+0x10d/0x4d0 [ 29.139067] __mutex_lock+0xc4/0x1310 [ 29.142845] ? nf_tables_netdev_event+0x10d/0x4d0 [ 29.147667] ? nf_tables_netdev_event+0x10d/0x4d0 [ 29.152490] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 29.157917] ? trace_hardirqs_on+0x10/0x10 [ 29.162127] ? trace_hardirqs_on_caller+0x3a8/0x580 [ 29.167155] ? lock_downgrade+0x740/0x740 [ 29.171286] nf_tables_netdev_event+0x10d/0x4d0 [ 29.175950] ? mirred_device_event+0x12f/0x170 [ 29.180508] ? nf_tables_netdev_init_net+0x140/0x140 [ 29.185588] ? mirred_device_event+0x12f/0x170 [ 29.190171] ? __local_bh_enable_ip+0xc1/0x170 [ 29.194749] notifier_call_chain+0x108/0x1a0 [ 29.199135] rollback_registered_many+0x765/0xba0 [ 29.203956] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 29.209390] ? netdev_state_change+0xf0/0xf0 [ 29.213872] ? lock_acquire+0x170/0x3f0 [ 29.217822] unregister_netdevice_many.part.0+0x18/0x2e0 [ 29.223247] unregister_netdevice_many+0x36/0x50 [ 29.227984] ip6gre_exit_net+0x41e/0x570 [ 29.232026] ? lock_downgrade+0x740/0x740 [ 29.236168] ? ip6gre_dellink+0x260/0x260 [ 29.240291] ? ip6gre_dellink+0x260/0x260 [ 29.244415] ops_exit_list+0xa5/0x150 [ 29.248195] cleanup_net+0x3b3/0x840 [ 29.251884] ? net_drop_ns+0x70/0x70 [ 29.255573] ? lock_acquire+0x170/0x3f0 [ 29.259528] ? rcu_lockdep_current_cpu_online+0xed/0x140 [ 29.265021] process_one_work+0x793/0x14a0 [ 29.269235] ? work_busy+0x320/0x320 [ 29.272924] ? worker_thread+0x158/0xff0 [ 29.276973] ? _raw_spin_unlock_irq+0x24/0x80 [ 29.281496] worker_thread+0x5cc/0xff0 [ 29.285364] ? rescuer_thread+0xc80/0xc80 [ 29.289492] kthread+0x30d/0x420 [ 29.292836] ? kthread_create_on_node+0xd0/0xd0 [ 29.297514] ret_from_fork+0x24/0x30 executing program [ 29.877779] IPVS: ftp: loaded support on port[0] = 21 executing program [ 29.908500] ip_tables: iptables: counters copy to user failed while replacing table [ 29.918386] IPVS: ftp: loaded support on port[0] = 21 [ 29.950628] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 30.548140] IPVS: ftp: loaded support on port[0] = 21 executing program [ 30.580273] ip_tables: iptables: counters copy to user failed while replacing table [ 30.590264] IPVS: ftp: loaded support on port[0] = 21 [ 30.637537] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 31.623268] IPVS: ftp: loaded support on port[0] = 21 [ 31.654761] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 32.694962] IPVS: ftp: loaded support on port[0] = 21 [ 32.725778] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 33.344098] IPVS: ftp: loaded support on port[0] = 21 executing program [ 33.373944] ip_tables: iptables: counters copy to user failed while replacing table [ 33.383769] IPVS: ftp: loaded support on port[0] = 21 executing program [ 34.043291] IPVS: ftp: loaded support on port[0] = 21 executing program [ 34.073479] net_ratelimit: 1 callbacks suppressed [ 34.073481] ip_tables: iptables: counters copy to user failed while replacing table [ 34.088095] IPVS: ftp: loaded support on port[0] = 21 [ 34.133568] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 35.169226] IPVS: ftp: loaded support on port[0] = 21 [ 35.201196] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 36.267970] IPVS: ftp: loaded support on port[0] = 21 [ 36.299028] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 36.961421] IPVS: ftp: loaded support on port[0] = 21 executing program [ 36.992422] ip_tables: iptables: counters copy to user failed while replacing table [ 37.002258] IPVS: ftp: loaded support on port[0] = 21 [ 37.048620] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 37.681848] IPVS: ftp: loaded support on port[0] = 21 executing program [ 37.713006] ip_tables: iptables: counters copy to user failed while replacing table [ 37.722836] IPVS: ftp: loaded support on port[0] = 21 [ 37.755740] ip_tables: iptables: counters copy to user failed while replacing table