Starting Update UTMP about System Runlevel Changes... [ OK ] Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch. [ OK ] Started Update UTMP about System Runlevel Changes. Starting Load/Save RF Kill Switch Status... [ OK ] Started Load/Save RF Kill Switch Status. Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.1.125' (ECDSA) to the list of known hosts. syzkaller login: [ 30.670555] IPVS: ftp: loaded support on port[0] = 21 executing program executing program [ 30.739557] ip_tables: iptables: counters copy to user failed while replacing table [ 30.793205] [ 30.794835] ====================================================== [ 30.801120] WARNING: possible circular locking dependency detected [ 30.807412] 4.14.269-syzkaller #0 Not tainted [ 30.811874] ------------------------------------------------------ [ 30.818158] syz-executor263/7985 is trying to acquire lock: [ 30.823839] (rtnl_mutex){+.+.}, at: [] unregister_netdevice_notifier+0x5e/0x2b0 [ 30.832913] [ 30.832913] but task is already holding lock: [ 30.838852] (&xt[i].mutex){+.+.}, at: [] xt_find_table_lock+0x38/0x3d0 [ 30.847143] [ 30.847143] which lock already depends on the new lock. [ 30.847143] [ 30.855447] [ 30.855447] the existing dependency chain (in reverse order) is: [ 30.863044] [ 30.863044] -> #2 (&xt[i].mutex){+.+.}: [ 30.868481] __mutex_lock+0xc4/0x1310 [ 30.872773] match_revfn+0x43/0x210 [ 30.876893] xt_find_revision+0x8d/0x1d0 [ 30.881446] nfnl_compat_get+0x1f7/0x870 [ 30.885998] nfnetlink_rcv_msg+0x9bb/0xc00 [ 30.890734] netlink_rcv_skb+0x125/0x390 [ 30.895291] nfnetlink_rcv+0x1ab/0x1da0 [ 30.899769] netlink_unicast+0x437/0x610 [ 30.904321] netlink_sendmsg+0x648/0xbc0 [ 30.908888] sock_sendmsg+0xb5/0x100 [ 30.913095] ___sys_sendmsg+0x6c8/0x800 [ 30.917588] __sys_sendmsg+0xa3/0x120 [ 30.921878] SyS_sendmsg+0x27/0x40 [ 30.925922] do_syscall_64+0x1d5/0x640 [ 30.930303] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 30.935982] [ 30.935982] -> #1 (&table[i].mutex){+.+.}: [ 30.941684] __mutex_lock+0xc4/0x1310 [ 30.945978] nf_tables_netdev_event+0x10d/0x4d0 [ 30.951143] notifier_call_chain+0x108/0x1a0 [ 30.956058] rollback_registered_many+0x765/0xba0 [ 30.961405] rollback_registered+0xca/0x170 [ 30.966231] unregister_netdevice_queue+0x1b4/0x360 [ 30.971756] __tun_detach+0xca2/0xf60 [ 30.976047] tun_chr_close+0x41/0x60 [ 30.980258] __fput+0x25f/0x7a0 [ 30.984049] task_work_run+0x11f/0x190 [ 30.988429] exit_to_usermode_loop+0x1ad/0x200 [ 30.993514] do_syscall_64+0x4a3/0x640 [ 30.997895] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 31.003571] [ 31.003571] -> #0 (rtnl_mutex){+.+.}: [ 31.008826] lock_acquire+0x170/0x3f0 [ 31.013118] __mutex_lock+0xc4/0x1310 [ 31.017429] unregister_netdevice_notifier+0x5e/0x2b0 [ 31.023111] tee_tg_destroy+0x5c/0xb0 [ 31.027403] cleanup_entry+0x1fd/0x2d0 [ 31.031792] __do_replace+0x38d/0x570 [ 31.036083] do_ipt_set_ctl+0x256/0x3a0 [ 31.040550] nf_setsockopt+0x5f/0xb0 [ 31.044755] ip_setsockopt+0x94/0xb0 [ 31.048964] raw_setsockopt+0xac/0xd0 [ 31.053257] SyS_setsockopt+0x110/0x1e0 [ 31.057721] do_syscall_64+0x1d5/0x640 [ 31.062099] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 31.067776] [ 31.067776] other info that might help us debug this: [ 31.067776] [ 31.075899] Chain exists of: [ 31.075899] rtnl_mutex --> &table[i].mutex --> &xt[i].mutex [ 31.075899] [ 31.086098] Possible unsafe locking scenario: [ 31.086098] [ 31.092125] CPU0 CPU1 [ 31.096764] ---- ---- [ 31.101402] lock(&xt[i].mutex); [ 31.104824] lock(&table[i].mutex); [ 31.111023] lock(&xt[i].mutex); [ 31.116961] lock(rtnl_mutex); [ 31.120222] [ 31.120222] *** DEADLOCK *** [ 31.120222] [ 31.126252] 1 lock held by syz-executor263/7985: [ 31.130985] #0: (&xt[i].mutex){+.+.}, at: [] xt_find_table_lock+0x38/0x3d0 [ 31.139709] [ 31.139709] stack backtrace: [ 31.144178] CPU: 0 PID: 7985 Comm: syz-executor263 Not tainted 4.14.269-syzkaller #0 [ 31.152027] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 31.161364] Call Trace: [ 31.163926] dump_stack+0x1b2/0x281 [ 31.167529] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 31.173304] __lock_acquire+0x2e0e/0x3f20 [ 31.177431] ? lock_downgrade+0x740/0x740 [ 31.181554] ? trace_hardirqs_on+0x10/0x10 [ 31.185760] ? depot_save_stack+0x1d3/0x3f0 [ 31.190053] ? lock_downgrade+0x740/0x740 [ 31.194171] ? unwind_get_return_address+0x51/0x90 [ 31.199069] ? _raw_spin_unlock_irqrestore+0x66/0xe0 [ 31.204154] ? check_preemption_disabled+0x35/0x240 [ 31.209141] lock_acquire+0x170/0x3f0 [ 31.212912] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 31.218247] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 31.223594] __mutex_lock+0xc4/0x1310 [ 31.227370] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 31.232716] ? SyS_setsockopt+0x110/0x1e0 [ 31.236839] ? entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 31.242184] ? debug_check_no_obj_freed+0x2c0/0x680 [ 31.247183] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 31.252524] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 31.257949] ? lock_downgrade+0x740/0x740 [ 31.262081] ? _raw_spin_unlock_irqrestore+0x66/0xe0 [ 31.267155] ? debug_check_no_obj_freed+0x2c0/0x680 [ 31.272144] unregister_netdevice_notifier+0x5e/0x2b0 [ 31.277310] ? register_netdevice_notifier+0x4d0/0x4d0 [ 31.282574] ? kfree+0x14a/0x250 [ 31.285914] ? cleanup_entry+0x117/0x2d0 [ 31.289961] tee_tg_destroy+0x5c/0xb0 [ 31.293733] ? tee_tg6+0x160/0x160 [ 31.297245] cleanup_entry+0x1fd/0x2d0 [ 31.301106] ? compat_do_ipt_get_ctl+0x7b0/0x7b0 [ 31.305835] __do_replace+0x38d/0x570 [ 31.309608] ? ipt_unregister_table+0x60/0x60 [ 31.314076] do_ipt_set_ctl+0x256/0x3a0 [ 31.318023] ? compat_do_ipt_set_ctl+0x140/0x140 [ 31.322753] ? nf_sockopt_find.constprop.0+0x1ad/0x220 [ 31.328015] nf_setsockopt+0x5f/0xb0 [ 31.331706] ip_setsockopt+0x94/0xb0 [ 31.335389] raw_setsockopt+0xac/0xd0 [ 31.339172] SyS_setsockopt+0x110/0x1e0 [ 31.343118] ? SyS_recv+0x40/0x40 [ 31.346545] ? do_syscall_64+0x4c/0x640 [ 31.350492] ? SyS_recv+0x40/0x40 [ 31.353916] do_syscall_64+0x1d5/0x640 [ 31.357782] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 31.362962] RIP: 0033:0x7f18d4f3f699 [ 31.366656] RSP: 002b:00007fff1291e448 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 [ 31.374343] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f18d4f3f699 [ 31.381583] RDX: 0000000000000040 RSI: 0000000000000000 RDI: 0000000000000004 [ 31.388827] RBP: 0000000000000000 R08: 0000000000000340 R09: 00000000d4face40 [ 31.396085] R10: 0000000020000900 R11: 0000000000000246 R12: 000000000000781c [ 31.403352] R13: 00007fff1291e470 R14: 00007fff1291e460 R15: 00007fff1291e454 [ 31.411229] ip_tables: iptables: counters copy to user failed while replacing table executing program executing program [ 31.480909] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 31.541378] ip_tables: iptables: counters copy to user failed while replacing table [ 31.590981] ip_tables: iptables: counters copy to user failed while replacing table executing program executing program [ 31.660925] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 31.720999] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 31.781113] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 31.830916] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 31.881581] ip_tables: iptables: 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 [ 35.769829] net_ratelimit: 86 callbacks suppressed [ 35.769831] ip_tables: iptables: counters copy to user failed while replacing table executing program executing program [ 35.839318] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 35.889834] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 35.939859] ip_tables: iptables: counters copy to user failed while replacing table [ 35.989820] ip_tables: iptables: counters copy to user failed while replacing table executing program executing program [ 36.059610] ip_tables: iptables: counters copy to user failed while replacing table [ 36.109554] ip_tables: iptables: counters copy to user failed while replacing table executing program executing program [ 36.178949] ip_tables: iptables: counters copy to user failed while replacing table [ 36.229010] ip_tables: iptables: counters copy to user failed while replacing table executing program executing program [ 36.299857] ip_tables: iptables: 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