Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.15.195' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 31.010673] ip_tables: iptables: counters copy to user failed while replacing table [ 31.022412] IPVS: ftp: loaded support on port[0] = 21 executing program executing program [ 31.107139] ip_tables: iptables: counters copy to user failed while replacing table [ 31.118106] IPVS: ftp: loaded support on port[0] = 21 [ 31.157976] ip_tables: iptables: counters copy to user failed while replacing table [ 31.215387] [ 31.217590] ====================================================== [ 31.225191] WARNING: possible circular locking dependency detected [ 31.231902] 4.14.232-syzkaller #0 Not tainted [ 31.236862] ------------------------------------------------------ [ 31.243950] kworker/u4:2/240 is trying to acquire lock: [ 31.250818] (&table[i].mutex){+.+.}, at: [] nf_tables_netdev_event+0x10d/0x4d0 [ 31.262096] [ 31.262096] but task is already holding lock: [ 31.269038] (rtnl_mutex){+.+.}, at: [] ip6gre_exit_net+0x70/0x570 [ 31.278668] [ 31.278668] which lock already depends on the new lock. [ 31.278668] [ 31.287647] [ 31.287647] the existing dependency chain (in reverse order) is: [ 31.295536] [ 31.295536] -> #2 (rtnl_mutex){+.+.}: [ 31.301239] __mutex_lock+0xc4/0x1310 [ 31.305979] unregister_netdevice_notifier+0x5e/0x2b0 [ 31.312469] tee_tg_destroy+0x5c/0xb0 [ 31.317038] cleanup_entry+0x1fd/0x2d0 [ 31.322797] __do_replace+0x38d/0x570 [ 31.327431] do_ipt_set_ctl+0x256/0x3a0 [ 31.332452] nf_setsockopt+0x5f/0xb0 [ 31.337267] ip_setsockopt+0x94/0xb0 [ 31.341773] raw_setsockopt+0xac/0xd0 [ 31.346081] SyS_setsockopt+0x110/0x1e0 [ 31.350906] do_syscall_64+0x1d5/0x640 [ 31.355740] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 31.361874] [ 31.361874] -> #1 (&xt[i].mutex){+.+.}: [ 31.367857] __mutex_lock+0xc4/0x1310 [ 31.372325] match_revfn+0x43/0x210 [ 31.376826] xt_find_revision+0x8d/0x1d0 [ 31.381589] nfnl_compat_get+0x1f7/0x870 [ 31.386428] nfnetlink_rcv_msg+0x9bb/0xc00 [ 31.391527] netlink_rcv_skb+0x125/0x390 [ 31.396609] nfnetlink_rcv+0x1ab/0x1da0 [ 31.401109] netlink_unicast+0x437/0x610 [ 31.406398] netlink_sendmsg+0x62e/0xb80 [ 31.410967] sock_sendmsg+0xb5/0x100 [ 31.415201] ___sys_sendmsg+0x6c8/0x800 [ 31.419681] __sys_sendmsg+0xa3/0x120 [ 31.424072] SyS_sendmsg+0x27/0x40 [ 31.428493] do_syscall_64+0x1d5/0x640 [ 31.432989] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 31.439045] [ 31.439045] -> #0 (&table[i].mutex){+.+.}: [ 31.444940] lock_acquire+0x170/0x3f0 [ 31.449372] __mutex_lock+0xc4/0x1310 [ 31.453851] nf_tables_netdev_event+0x10d/0x4d0 [ 31.459051] notifier_call_chain+0x108/0x1a0 [ 31.464066] rollback_registered_many+0x765/0xba0 [ 31.469416] unregister_netdevice_many.part.0+0x18/0x2e0 [ 31.476206] unregister_netdevice_many+0x36/0x50 [ 31.481830] ip6gre_exit_net+0x41e/0x570 [ 31.487091] ops_exit_list+0xa5/0x150 [ 31.491668] cleanup_net+0x3b3/0x840 [ 31.496119] process_one_work+0x793/0x14a0 [ 31.501221] worker_thread+0x5cc/0xff0 [ 31.506069] kthread+0x30d/0x420 [ 31.510598] ret_from_fork+0x24/0x30 [ 31.515155] [ 31.515155] other info that might help us debug this: [ 31.515155] [ 31.523871] Chain exists of: [ 31.523871] &table[i].mutex --> &xt[i].mutex --> rtnl_mutex [ 31.523871] [ 31.536244] Possible unsafe locking scenario: [ 31.536244] [ 31.542987] CPU0 CPU1 [ 31.547734] ---- ---- [ 31.552728] lock(rtnl_mutex); [ 31.556298] lock(&xt[i].mutex); [ 31.562864] lock(rtnl_mutex); [ 31.569337] lock(&table[i].mutex); [ 31.573797] [ 31.573797] *** DEADLOCK *** [ 31.573797] [ 31.581239] 4 locks held by kworker/u4:2/240: [ 31.586420] #0: ("%s""netns"){+.+.}, at: [] process_one_work+0x6b0/0x14a0 [ 31.596689] #1: (net_cleanup_work){+.+.}, at: [] process_one_work+0x6e6/0x14a0 [ 31.607908] #2: (net_mutex){+.+.}, at: [] cleanup_net+0x110/0x840 [ 31.619104] #3: (rtnl_mutex){+.+.}, at: [] ip6gre_exit_net+0x70/0x570 [ 31.628562] [ 31.628562] stack backtrace: [ 31.634617] CPU: 0 PID: 240 Comm: kworker/u4:2 Not tainted 4.14.232-syzkaller #0 [ 31.643830] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 31.654866] Workqueue: netns cleanup_net [ 31.659361] Call Trace: [ 31.662292] dump_stack+0x1b2/0x281 [ 31.666052] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 31.671939] __lock_acquire+0x2e0e/0x3f20 [ 31.676249] ? unwind_next_frame+0x404/0x17d0 [ 31.680904] ? trace_hardirqs_on+0x10/0x10 [ 31.685214] ? check_usage_forwards+0x2d0/0x2d0 [ 31.690442] ? ret_from_fork+0x24/0x30 [ 31.695536] lock_acquire+0x170/0x3f0 [ 31.701763] ? nf_tables_netdev_event+0x10d/0x4d0 [ 31.707826] ? nf_tables_netdev_event+0x10d/0x4d0 [ 31.713174] __mutex_lock+0xc4/0x1310 [ 31.716967] ? nf_tables_netdev_event+0x10d/0x4d0 [ 31.722060] ? nf_tables_netdev_event+0x10d/0x4d0 [ 31.727695] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 31.733261] ? trace_hardirqs_on+0x10/0x10 [ 31.737692] ? trace_hardirqs_on_caller+0x3a8/0x580 [ 31.742791] ? lock_downgrade+0x740/0x740 [ 31.747012] nf_tables_netdev_event+0x10d/0x4d0 [ 31.751857] ? mirred_device_event+0x12f/0x170 [ 31.756628] ? nf_tables_netdev_init_net+0x140/0x140 [ 31.761726] ? mirred_device_event+0x12f/0x170 [ 31.767180] ? __local_bh_enable_ip+0xc1/0x170 [ 31.772123] notifier_call_chain+0x108/0x1a0 [ 31.777556] rollback_registered_many+0x765/0xba0 [ 31.782898] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 31.788762] ? netdev_state_change+0xf0/0xf0 [ 31.793354] ? lock_acquire+0x170/0x3f0 [ 31.797637] unregister_netdevice_many.part.0+0x18/0x2e0 [ 31.804134] unregister_netdevice_many+0x36/0x50 [ 31.809671] ip6gre_exit_net+0x41e/0x570 [ 31.814034] ? lock_downgrade+0x740/0x740 [ 31.818557] ? ip6gre_dellink+0x260/0x260 [ 31.823595] ? ip6gre_dellink+0x260/0x260 [ 31.828486] ops_exit_list+0xa5/0x150 [ 31.832457] cleanup_net+0x3b3/0x840 [ 31.836349] ? net_drop_ns+0x70/0x70 [ 31.840396] ? lock_acquire+0x170/0x3f0 [ 31.844529] ? rcu_lockdep_current_cpu_online+0xed/0x140 [ 31.850076] process_one_work+0x793/0x14a0 [ 31.854567] ? work_busy+0x320/0x320 [ 31.858563] ? worker_thread+0x158/0xff0 [ 31.862832] ? _raw_spin_unlock_irq+0x24/0x80 [ 31.868166] worker_thread+0x5cc/0xff0 [ 31.873332] ? rescuer_thread+0xc80/0xc80 [ 31.877674] kthread+0x30d/0x420 [ 31.881288] ? kthread_create_on_node+0xd0/0xd0 [ 31.888648] ret_from_fork+0x24/0x30 executing program [ 32.530117] IPVS: ftp: loaded support on port[0] = 21 [ 32.562740] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 33.294491] IPVS: ftp: loaded support on port[0] = 21 [ 33.326026] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 33.965622] IPVS: ftp: loaded support on port[0] = 21 [ 33.996180] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 34.663152] IPVS: ftp: loaded support on port[0] = 21 [ 34.695040] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 35.381952] IPVS: ftp: loaded support on port[0] = 21 [ 35.411837] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 36.061970] IPVS: ftp: loaded support on port[0] = 21 [ 36.092555] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 36.792832] IPVS: ftp: loaded support on port[0] = 21 [ 36.824916] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 37.490144] IPVS: ftp: loaded support on port[0] = 21 [ 37.521285] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 38.152046] IPVS: ftp: loaded support on port[0] = 21 [ 38.184489] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 38.821126] IPVS: ftp: loaded support on port[0] = 21 [ 38.852284] ip_tables: iptables: counters copy to user failed while replacing table [ 38.862357] IPVS: ftp: loaded support on port[0] = 21 executing program [ 38.911000] ip_tables: iptables: counters copy to user failed while replacing table executing program executing program [ 39.519762] IPVS: ftp: loaded support on port[0] = 21 [ 39.551314] ip_tables: iptables: counters copy to user failed while replacing table [ 39.562878] IPVS: ftp: loaded support on port[0] = 21 [ 39.598409] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 40.695485] IPVS: ftp: loaded support on port[0] = 21 [ 40.736205] ip_tables: iptables: counters copy to user failed while replacing table