Warning: Permanently added '10.128.0.134' (ECDSA) to the list of known hosts. [ 28.161118] IPVS: ftp: loaded support on port[0] = 21 executing program [ 28.236487] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 28.317362] [ 28.319031] ====================================================== [ 28.325324] WARNING: possible circular locking dependency detected [ 28.331634] 4.14.294-syzkaller #0 Not tainted [ 28.336102] ------------------------------------------------------ [ 28.342392] syz-executor188/7980 is trying to acquire lock: [ 28.348072] (rtnl_mutex){+.+.}, at: [] unregister_netdevice_notifier+0x5e/0x2b0 [ 28.357170] [ 28.357170] but task is already holding lock: [ 28.363129] (&xt[i].mutex){+.+.}, at: [] xt_find_table_lock+0x38/0x3d0 [ 28.371431] [ 28.371431] which lock already depends on the new lock. [ 28.371431] [ 28.379728] [ 28.379728] the existing dependency chain (in reverse order) is: [ 28.387350] [ 28.387350] -> #2 (&xt[i].mutex){+.+.}: [ 28.392791] __mutex_lock+0xc4/0x1310 [ 28.397106] match_revfn+0x43/0x210 [ 28.401333] xt_find_revision+0x8d/0x1d0 [ 28.405894] nfnl_compat_get+0x1f7/0x870 [ 28.410458] nfnetlink_rcv_msg+0x9bb/0xc00 [ 28.415205] netlink_rcv_skb+0x125/0x390 [ 28.419764] nfnetlink_rcv+0x1ab/0x1da0 [ 28.424234] netlink_unicast+0x437/0x610 [ 28.428788] netlink_sendmsg+0x648/0xbc0 [ 28.433350] sock_sendmsg+0xb5/0x100 [ 28.437559] ___sys_sendmsg+0x6c8/0x800 [ 28.442026] __sys_sendmsg+0xa3/0x120 [ 28.446329] SyS_sendmsg+0x27/0x40 [ 28.450369] do_syscall_64+0x1d5/0x640 [ 28.454767] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 28.460451] [ 28.460451] -> #1 (&table[i].mutex){+.+.}: [ 28.466157] __mutex_lock+0xc4/0x1310 [ 28.470452] nf_tables_netdev_event+0x10d/0x4d0 [ 28.475640] notifier_call_chain+0x108/0x1a0 [ 28.480549] rollback_registered_many+0x765/0xbb0 [ 28.485890] rollback_registered+0xca/0x170 [ 28.490713] unregister_netdevice_queue+0x1b4/0x360 [ 28.496226] __tun_detach+0xca2/0xf60 [ 28.500523] tun_chr_close+0x41/0x60 [ 28.504759] __fput+0x25f/0x7a0 [ 28.508548] task_work_run+0x11f/0x190 [ 28.512931] exit_to_usermode_loop+0x1ad/0x200 [ 28.518008] do_syscall_64+0x4a3/0x640 [ 28.522403] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 28.528184] [ 28.528184] -> #0 (rtnl_mutex){+.+.}: [ 28.533536] lock_acquire+0x170/0x3f0 [ 28.537831] __mutex_lock+0xc4/0x1310 [ 28.542143] unregister_netdevice_notifier+0x5e/0x2b0 [ 28.547830] tee_tg_destroy+0x5c/0xb0 [ 28.552127] cleanup_entry+0x232/0x310 [ 28.556516] __do_replace+0x38d/0x580 [ 28.560807] do_ip6t_set_ctl+0x256/0x3b0 [ 28.565362] nf_setsockopt+0x5f/0xb0 [ 28.569568] ipv6_setsockopt+0xc0/0x120 [ 28.574037] udpv6_setsockopt+0x45/0x80 [ 28.578520] SyS_setsockopt+0x110/0x1e0 [ 28.583002] do_syscall_64+0x1d5/0x640 [ 28.587385] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 28.593067] [ 28.593067] other info that might help us debug this: [ 28.593067] [ 28.601182] Chain exists of: [ 28.601182] rtnl_mutex --> &table[i].mutex --> &xt[i].mutex [ 28.601182] [ 28.611407] Possible unsafe locking scenario: [ 28.611407] [ 28.617464] CPU0 CPU1 [ 28.622127] ---- ---- [ 28.626794] lock(&xt[i].mutex); [ 28.630221] lock(&table[i].mutex); [ 28.636443] lock(&xt[i].mutex); [ 28.642388] lock(rtnl_mutex); [ 28.645642] [ 28.645642] *** DEADLOCK *** [ 28.645642] [ 28.651679] 1 lock held by syz-executor188/7980: [ 28.656437] #0: (&xt[i].mutex){+.+.}, at: [] xt_find_table_lock+0x38/0x3d0 [ 28.665177] [ 28.665177] stack backtrace: [ 28.669648] CPU: 0 PID: 7980 Comm: syz-executor188 Not tainted 4.14.294-syzkaller #0 [ 28.677529] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022 [ 28.686874] Call Trace: [ 28.689443] dump_stack+0x1b2/0x281 [ 28.693048] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 28.698831] __lock_acquire+0x2e0e/0x3f20 [ 28.702959] ? __lock_acquire+0x2190/0x3f20 [ 28.707264] ? trace_hardirqs_on+0x10/0x10 [ 28.711474] ? __lock_acquire+0x5fc/0x3f20 [ 28.715699] ? __kernel_text_address+0x9/0x30 [ 28.720178] ? __save_stack_trace+0xa0/0x160 [ 28.724563] lock_acquire+0x170/0x3f0 [ 28.728343] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 28.733691] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 28.739033] __mutex_lock+0xc4/0x1310 [ 28.742839] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 28.748183] ? trace_hardirqs_on+0x10/0x10 [ 28.752394] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 28.757731] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 28.763254] ? pcpu_next_fit_region.constprop.0+0x3a0/0x3a0 [ 28.768951] ? free_percpu+0x23e/0x730 [ 28.772823] unregister_netdevice_notifier+0x5e/0x2b0 [ 28.778005] ? register_netdevice_notifier+0x4d0/0x4d0 [ 28.783255] ? _raw_spin_unlock_irqrestore+0x66/0xe0 [ 28.788328] ? free_percpu+0x23e/0x730 [ 28.792211] tee_tg_destroy+0x5c/0xb0 [ 28.795985] ? tee_tg6+0x160/0x160 [ 28.799498] cleanup_entry+0x232/0x310 [ 28.803358] ? compat_do_ip6t_get_ctl+0x820/0x820 [ 28.808189] __do_replace+0x38d/0x580 [ 28.811962] ? ip6t_unregister_table+0x60/0x60 [ 28.816516] do_ip6t_set_ctl+0x256/0x3b0 [ 28.820556] ? compat_do_ip6t_set_ctl+0x140/0x140 [ 28.825384] ? nf_sockopt_find.constprop.0+0x1ad/0x220 [ 28.830654] nf_setsockopt+0x5f/0xb0 [ 28.834347] ipv6_setsockopt+0xc0/0x120 [ 28.838306] udpv6_setsockopt+0x45/0x80 [ 28.842270] SyS_setsockopt+0x110/0x1e0 [ 28.846219] ? SyS_recv+0x40/0x40 [ 28.849650] ? do_syscall_64+0x4c/0x640 [ 28.853598] ? SyS_recv+0x40/0x40 [ 28.857028] do_syscall_64+0x1d5/0x640 [ 28.860911] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 28.866080] RIP: 0033:0x7fc2a5252849 [ 28.869767] RSP: 002b:00007ffe87b68e38 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 [ 28.877469] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fc2a5252849 [ 28.884714] RDX: 0000000000000040 RSI: 0000000000000029 RDI: 0000000000000004 [ 28.891958] RBP: 0000000000000000 R08: 0000000000000578 R09: 00000000a52bfe40 [ 28.899202] R10: 0000000020000900 R11: 0000000000000246 R12: 0000000000006e5b [ 28.906470] R13: 00007ffe87b68e60 R14: 00007ffe87b68e50 R15: 00007ffe87b68e44 executing program [ 28.914136] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 28.954289] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 29.004042] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 29.053568] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 29.104310] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 29.163615] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 29.204241] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 29.263546] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 29.314429] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 33.281237] net_ratelimit: 90 callbacks suppressed [ 33.281240] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 33.340745] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 33.400853] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 33.460825] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 33.511285] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 33.560678] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 33.611456] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 33.669881] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 33.731494] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 33.780509] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 38.308432] net_ratelimit: 102 callbacks suppressed [ 38.308434] ip6_tables: ip6tables: counters copy to user failed while replacing table