Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.0.201' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 30.619593] IPVS: ftp: loaded support on port[0] = 21 [ 30.654286] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 30.663202] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 30.672058] syz-executor071[7994]: segfault at 18 ip 0000000000409fe0 sp 00007fff471a1960 error 4 in syz-executor071260836[401000+83000] [ 30.742883] [ 30.744521] ====================================================== [ 30.750828] WARNING: possible circular locking dependency detected [ 30.757125] 4.14.229-syzkaller #0 Not tainted [ 30.761593] ------------------------------------------------------ [ 30.767898] kworker/u4:3/116 is trying to acquire lock: [ 30.773233] (&table[i].mutex){+.+.}, at: [] nf_tables_netdev_event+0x10d/0x4d0 [ 30.782235] [ 30.782235] but task is already holding lock: [ 30.788191] (rtnl_mutex){+.+.}, at: [] ip6gre_exit_net+0x70/0x570 [ 30.796059] [ 30.796059] which lock already depends on the new lock. [ 30.796059] [ 30.804354] [ 30.804354] the existing dependency chain (in reverse order) is: [ 30.811978] [ 30.811978] -> #2 (rtnl_mutex){+.+.}: [ 30.817259] __mutex_lock+0xc4/0x1310 [ 30.821557] unregister_netdevice_notifier+0x5e/0x2b0 [ 30.827247] tee_tg_destroy+0x5c/0xb0 [ 30.831545] cleanup_entry+0x232/0x310 [ 30.835925] __do_replace+0x38d/0x580 [ 30.840226] do_ip6t_set_ctl+0x256/0x3b0 [ 30.844782] nf_setsockopt+0x5f/0xb0 [ 30.849005] ipv6_setsockopt+0xc0/0x120 [ 30.853495] tcp_setsockopt+0x7b/0xc0 [ 30.857813] SyS_setsockopt+0x110/0x1e0 [ 30.862282] do_syscall_64+0x1d5/0x640 [ 30.866673] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 30.872355] [ 30.872355] -> #1 (&xt[i].mutex){+.+.}: [ 30.877792] __mutex_lock+0xc4/0x1310 [ 30.882091] target_revfn+0x43/0x210 [ 30.886313] xt_find_revision+0x15e/0x1d0 [ 30.890979] nfnl_compat_get+0x1f7/0x870 [ 30.895549] nfnetlink_rcv_msg+0x9bb/0xc00 [ 30.900290] netlink_rcv_skb+0x125/0x390 [ 30.904848] nfnetlink_rcv+0x1ab/0x1da0 [ 30.909419] netlink_unicast+0x437/0x610 [ 30.913973] netlink_sendmsg+0x62e/0xb80 [ 30.918539] sock_sendmsg+0xb5/0x100 [ 30.922747] ___sys_sendmsg+0x6c8/0x800 [ 30.927232] __sys_sendmsg+0xa3/0x120 [ 30.931544] SyS_sendmsg+0x27/0x40 [ 30.935580] do_syscall_64+0x1d5/0x640 [ 30.939962] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 30.945643] [ 30.945643] -> #0 (&table[i].mutex){+.+.}: [ 30.951354] lock_acquire+0x170/0x3f0 [ 30.955676] __mutex_lock+0xc4/0x1310 [ 30.959972] nf_tables_netdev_event+0x10d/0x4d0 [ 30.965149] notifier_call_chain+0x108/0x1a0 [ 30.970054] rollback_registered_many+0x765/0xba0 [ 30.975408] unregister_netdevice_many.part.0+0x18/0x2e0 [ 30.981375] unregister_netdevice_many+0x36/0x50 [ 30.986634] ip6gre_exit_net+0x41e/0x570 [ 30.991209] ops_exit_list+0xa5/0x150 [ 30.995503] cleanup_net+0x3b3/0x840 [ 30.999714] process_one_work+0x793/0x14a0 [ 31.004454] worker_thread+0x5cc/0xff0 [ 31.008844] kthread+0x30d/0x420 [ 31.012708] ret_from_fork+0x24/0x30 [ 31.016913] [ 31.016913] other info that might help us debug this: [ 31.016913] [ 31.025042] Chain exists of: [ 31.025042] &table[i].mutex --> &xt[i].mutex --> rtnl_mutex [ 31.025042] [ 31.035272] Possible unsafe locking scenario: [ 31.035272] [ 31.041321] CPU0 CPU1 [ 31.045980] ---- ---- [ 31.050634] lock(rtnl_mutex); [ 31.053909] lock(&xt[i].mutex); [ 31.059867] lock(rtnl_mutex); [ 31.065645] lock(&table[i].mutex); [ 31.069346] [ 31.069346] *** DEADLOCK *** [ 31.069346] [ 31.075382] 4 locks held by kworker/u4:3/116: [ 31.079847] #0: ("%s""netns"){+.+.}, at: [] process_one_work+0x6b0/0x14a0 [ 31.088512] #1: (net_cleanup_work){+.+.}, at: [] process_one_work+0x6e6/0x14a0 [ 31.097596] #2: (net_mutex){+.+.}, at: [] cleanup_net+0x110/0x840 [ 31.105558] #3: (rtnl_mutex){+.+.}, at: [] ip6gre_exit_net+0x70/0x570 [ 31.113889] [ 31.113889] stack backtrace: [ 31.118379] CPU: 0 PID: 116 Comm: kworker/u4:3 Not tainted 4.14.229-syzkaller #0 [ 31.126088] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 31.135432] Workqueue: netns cleanup_net [ 31.139483] Call Trace: [ 31.142062] dump_stack+0x1b2/0x281 [ 31.145680] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 31.151468] __lock_acquire+0x2e0e/0x3f20 [ 31.155621] ? unwind_next_frame+0x404/0x17d0 [ 31.160111] ? trace_hardirqs_on+0x10/0x10 [ 31.164322] ? check_usage_forwards+0x2d0/0x2d0 [ 31.168970] ? ret_from_fork+0x24/0x30 [ 31.172864] lock_acquire+0x170/0x3f0 [ 31.176647] ? nf_tables_netdev_event+0x10d/0x4d0 [ 31.181475] ? nf_tables_netdev_event+0x10d/0x4d0 [ 31.186314] __mutex_lock+0xc4/0x1310 [ 31.190090] ? nf_tables_netdev_event+0x10d/0x4d0 [ 31.194922] ? nf_tables_netdev_event+0x10d/0x4d0 [ 31.199764] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 31.205236] ? trace_hardirqs_on+0x10/0x10 [ 31.209451] ? trace_hardirqs_on_caller+0x3a8/0x580 [ 31.214445] ? lock_downgrade+0x740/0x740 [ 31.218603] nf_tables_netdev_event+0x10d/0x4d0 [ 31.223271] ? mirred_device_event+0x12f/0x170 [ 31.227829] ? nf_tables_netdev_init_net+0x140/0x140 [ 31.232914] ? mirred_device_event+0x12f/0x170 [ 31.237495] ? __local_bh_enable_ip+0xc1/0x170 [ 31.242076] notifier_call_chain+0x108/0x1a0 [ 31.246481] rollback_registered_many+0x765/0xba0 [ 31.251313] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 31.256741] ? netdev_state_change+0xf0/0xf0 [ 31.261142] ? lock_acquire+0x170/0x3f0 [ 31.265100] unregister_netdevice_many.part.0+0x18/0x2e0 [ 31.270547] unregister_netdevice_many+0x36/0x50 [ 31.275302] ip6gre_exit_net+0x41e/0x570 [ 31.279355] ? lock_downgrade+0x740/0x740 [ 31.283498] ? ip6gre_dellink+0x260/0x260 [ 31.287640] ? ip6gre_dellink+0x260/0x260 [ 31.291782] ops_exit_list+0xa5/0x150 [ 31.296257] cleanup_net+0x3b3/0x840 [ 31.299951] ? net_drop_ns+0x70/0x70 [ 31.303641] ? lock_acquire+0x170/0x3f0 [ 31.307595] ? rcu_lockdep_current_cpu_online+0xed/0x140 [ 31.313025] process_one_work+0x793/0x14a0 [ 31.317241] ? work_busy+0x320/0x320 [ 31.320987] ? worker_thread+0x158/0xff0 [ 31.325037] ? _raw_spin_unlock_irq+0x24/0x80 [ 31.329513] worker_thread+0x5cc/0xff0 [ 31.333380] ? rescuer_thread+0xc80/0xc80 [ 31.337506] kthread+0x30d/0x420 [ 31.340866] ? kthread_create_on_node+0xd0/0xd0 [ 31.345534] ret_from_fork+0x24/0x30 [ 31.936784] IPVS: ftp: loaded support on port[0] = 21 executing program [ 31.964315] syz-executor071[8017]: segfault at ffffffffffffffc0 ip 0000000000440fcb sp 00007fff471a19a8 error 7 in syz-executor071260836[401000+83000] [ 31.983923] IPVS: ftp: loaded support on port[0] = 21 executing program [ 32.012685] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 32.024183] syz-executor071[8041]: segfault at 18 ip 0000000000409fe0 sp 00007fff471a1960 error 4 in syz-executor071260836[401000+83000] [ 32.037373] syz-executor071[8020]: segfault at 7fff471a1b48 ip 00007fff471a1b48 sp 00007fff471a19b8 error 15 [ 32.720883] IPVS: ftp: loaded support on port[0] = 21 executing program [ 32.748157] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 32.756368] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 32.765550] syz-executor071[8066]: segfault at 28 ip 000000000043ea2e sp 00007fff471a1918 error 4 in syz-executor071260836[401000+83000] [ 33.466291] IPVS: ftp: loaded support on port[0] = 21 executing program [ 33.494649] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 33.503064] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 33.518534] syz-executor071[8089]: segfault at 28 ip 000000000043ea2e sp 00007fff471a1918 error 4 in syz-executor071260836[401000+83000] [ 34.145402] IPVS: ftp: loaded support on port[0] = 21 executing program [ 34.173622] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 34.181887] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 34.193517] syz-executor071[8112]: segfault at 28 ip 000000000043ea2e sp 00007fff471a1918 error 4 in syz-executor071260836[401000+83000] [ 34.824564] IPVS: ftp: loaded support on port[0] = 21 executing program [ 34.852463] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 34.864575] syz-executor071[8135]: segfault at 28 ip 000000000043ea2e sp 00007fff471a1918 error 4 in syz-executor071260836[401000+83000] [ 34.867627] IPVS: ftp: loaded support on port[0] = 21 executing program [ 34.907871] syz-executor071[8158]: segfault at 18 ip 0000000000409fe0 sp 00007fff471a1960 error 4 in syz-executor071260836[401000+83000] [ 34.923532] syz-executor071[8137]: segfault at 7fff471a1b48 ip 00007fff471a1b48 sp 00007fff471a19b8 error 15 executing program [ 35.589829] IPVS: ftp: loaded support on port[0] = 21 [ 36.650840] IPVS: ftp: loaded support on port[0] = 21 [ 36.678611] net_ratelimit: 3 callbacks suppressed [ 36.678615] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 36.697508] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 36.705812] show_signal_msg: 1 callbacks suppressed [ 36.705819] syz-executor071[8206]: segfault at 28 ip 000000000043ea2e sp 00007fff471a1918 error 4 in syz-executor071260836[401000+83000] executing program [ 37.322845] IPVS: ftp: loaded support on port[0] = 21 [ 37.350853] syz-executor071[8229]: segfault at ffffffffffffffc0 ip 0000000000440fcb sp 00007fff471a19a8 error 7 in syz-executor071260836[401000+83000] [ 38.001899] IPVS: ftp: loaded support on port[0] = 21 executing program [ 38.029471] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 38.037654] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 38.048055] syz-executor071[8253]: segfault at 28 ip 000000000043ea2e sp 00007fff471a1918 error 4 in syz-executor071260836[401000+83000] [ 38.682228] IPVS: ftp: loaded support on port[0] = 21 executing program [ 38.709964] syz-executor071[8276]: segfault at ffffffffffffffc0 ip 0000000000440fcb sp 00007fff471a19a8 error 7 in syz-executor071260836[401000+83000] [ 39.372244] IPVS: ftp: loaded support on port[0] = 21 [ 39.400619] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 39.415715] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 39.432849] syz-executor071[8300]: segfault at 28 ip 000000000043ea2e sp 00007fff471a1918 error 4 in syz-executor071260836[401000+83000] [ 40.061490] IPVS: ftp: loaded support on port[0] = 21 executing program [ 40.089693] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 40.105189] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 40.124318] syz-executor071[8323]: segfault at 28 ip 000000000043ea2e sp 00007fff471a1918 error 4 in syz-executor071260836[401000+83000] [ 40.751245] IPVS: ftp: loaded support on port[0] = 21