[ OK ] Reached target Graphical Interface. Starting Update UTMP about System Runlevel Changes... [ 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.0.183' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 28.966218] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 29.039853] [ 29.041490] ====================================================== [ 29.047796] WARNING: possible circular locking dependency detected [ 29.054101] 4.14.256-syzkaller #0 Not tainted [ 29.058719] ------------------------------------------------------ [ 29.065113] syz-executor431/8007 is trying to acquire lock: [ 29.070795] (rtnl_mutex){+.+.}, at: [] unregister_netdevice_notifier+0x5e/0x2b0 [ 29.079879] [ 29.079879] but task is already holding lock: [ 29.085837] (&xt[i].mutex){+.+.}, at: [] xt_find_table_lock+0x38/0x3d0 [ 29.094134] [ 29.094134] which lock already depends on the new lock. [ 29.094134] [ 29.102421] [ 29.102421] the existing dependency chain (in reverse order) is: [ 29.110009] [ 29.110009] -> #2 (&xt[i].mutex){+.+.}: [ 29.115440] __mutex_lock+0xc4/0x1310 [ 29.119743] match_revfn+0x43/0x210 [ 29.123861] xt_find_revision+0x8d/0x1d0 [ 29.128429] nfnl_compat_get+0x1f7/0x870 [ 29.132983] nfnetlink_rcv_msg+0x9bb/0xc00 [ 29.137717] netlink_rcv_skb+0x125/0x390 [ 29.142273] nfnetlink_rcv+0x1ab/0x1da0 [ 29.146751] netlink_unicast+0x437/0x610 [ 29.151303] netlink_sendmsg+0x638/0xb90 [ 29.155855] sock_sendmsg+0xb5/0x100 [ 29.160158] ___sys_sendmsg+0x6c8/0x800 [ 29.164732] __sys_sendmsg+0xa3/0x120 [ 29.169026] SyS_sendmsg+0x27/0x40 [ 29.173150] do_syscall_64+0x1d5/0x640 [ 29.177540] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 29.183220] [ 29.183220] -> #1 (&table[i].mutex){+.+.}: [ 29.188913] __mutex_lock+0xc4/0x1310 [ 29.193210] nf_tables_netdev_event+0x10d/0x4d0 [ 29.198472] notifier_call_chain+0x108/0x1a0 [ 29.203381] rollback_registered_many+0x765/0xba0 [ 29.208715] rollback_registered+0xca/0x170 [ 29.213531] unregister_netdevice_queue+0x1b4/0x360 [ 29.219054] ser_release+0x16f/0x240 [ 29.223267] process_one_work+0x793/0x14a0 [ 29.228083] worker_thread+0x5cc/0xff0 [ 29.232474] kthread+0x30d/0x420 [ 29.236337] ret_from_fork+0x24/0x30 [ 29.240543] [ 29.240543] -> #0 (rtnl_mutex){+.+.}: [ 29.245898] lock_acquire+0x170/0x3f0 [ 29.250207] __mutex_lock+0xc4/0x1310 [ 29.254532] unregister_netdevice_notifier+0x5e/0x2b0 [ 29.260219] tee_tg_destroy+0x5c/0xb0 [ 29.264530] cleanup_entry+0x1fd/0x2d0 [ 29.268911] __do_replace+0x38d/0x570 [ 29.273208] do_ipt_set_ctl+0x256/0x3a0 [ 29.277749] nf_setsockopt+0x5f/0xb0 [ 29.281970] ip_setsockopt+0x94/0xb0 [ 29.286206] raw_setsockopt+0xac/0xd0 [ 29.290616] SyS_setsockopt+0x110/0x1e0 [ 29.295092] do_syscall_64+0x1d5/0x640 [ 29.299487] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 29.305172] [ 29.305172] other info that might help us debug this: [ 29.305172] [ 29.313325] Chain exists of: [ 29.313325] rtnl_mutex --> &table[i].mutex --> &xt[i].mutex [ 29.313325] [ 29.323535] Possible unsafe locking scenario: [ 29.323535] [ 29.329565] CPU0 CPU1 [ 29.334204] ---- ---- [ 29.338853] lock(&xt[i].mutex); [ 29.342286] lock(&table[i].mutex); [ 29.348490] lock(&xt[i].mutex); [ 29.354482] lock(rtnl_mutex); [ 29.357748] [ 29.357748] *** DEADLOCK *** [ 29.357748] [ 29.363792] 1 lock held by syz-executor431/8007: [ 29.368526] #0: (&xt[i].mutex){+.+.}, at: [] xt_find_table_lock+0x38/0x3d0 [ 29.377262] [ 29.377262] stack backtrace: [ 29.381738] CPU: 0 PID: 8007 Comm: syz-executor431 Not tainted 4.14.256-syzkaller #0 [ 29.390026] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 29.399466] Call Trace: [ 29.402042] dump_stack+0x1b2/0x281 [ 29.405659] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 29.411446] __lock_acquire+0x2e0e/0x3f20 [ 29.415571] ? lock_downgrade+0x740/0x740 [ 29.419693] ? trace_hardirqs_on+0x10/0x10 [ 29.423904] ? depot_save_stack+0x1d3/0x3f0 [ 29.428222] ? lock_downgrade+0x740/0x740 [ 29.432469] ? unwind_get_return_address+0x51/0x90 [ 29.437385] ? _raw_spin_unlock_irqrestore+0x66/0xe0 [ 29.442579] ? check_preemption_disabled+0x35/0x240 [ 29.448101] lock_acquire+0x170/0x3f0 [ 29.451897] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 29.457243] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 29.462593] __mutex_lock+0xc4/0x1310 [ 29.466382] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 29.472156] ? SyS_setsockopt+0x110/0x1e0 [ 29.476289] ? entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 29.481632] ? debug_check_no_obj_freed+0x2c0/0x680 [ 29.486651] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 29.492088] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 29.497531] ? lock_downgrade+0x740/0x740 [ 29.501667] ? _raw_spin_unlock_irqrestore+0x66/0xe0 [ 29.506849] ? debug_check_no_obj_freed+0x2c0/0x680 [ 29.511856] unregister_netdevice_notifier+0x5e/0x2b0 [ 29.517029] ? register_netdevice_notifier+0x4d0/0x4d0 [ 29.522286] ? kfree+0x14a/0x250 [ 29.525633] ? cleanup_entry+0x117/0x2d0 [ 29.529675] tee_tg_destroy+0x5c/0xb0 [ 29.533515] ? tee_tg6+0x160/0x160 [ 29.537029] cleanup_entry+0x1fd/0x2d0 [ 29.540890] ? compat_do_ipt_get_ctl+0x7b0/0x7b0 [ 29.545628] __do_replace+0x38d/0x570 [ 29.549406] ? ipt_unregister_table+0x60/0x60 [ 29.553874] do_ipt_set_ctl+0x256/0x3a0 [ 29.557823] ? compat_do_ipt_set_ctl+0x140/0x140 [ 29.562557] ? nf_sockopt_find.constprop.0+0x1ad/0x220 [ 29.567822] nf_setsockopt+0x5f/0xb0 [ 29.571525] ip_setsockopt+0x94/0xb0 [ 29.575223] raw_setsockopt+0xac/0xd0 [ 29.579000] SyS_setsockopt+0x110/0x1e0 [ 29.582948] ? SyS_recv+0x40/0x40 [ 29.586389] ? up_read+0x17/0x30 [ 29.589746] ? __do_page_fault+0x159/0xad0 [ 29.593959] ? do_syscall_64+0x4c/0x640 [ 29.597915] ? SyS_recv+0x40/0x40 [ 29.601349] do_syscall_64+0x1d5/0x640 [ 29.605317] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 29.610487] RIP: 0033:0x7f3e8eb2c329 [ 29.614173] RSP: 002b:00007ffc349dca48 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 [ 29.621880] RAX: ffffffffffffffda RBX: 000000306e616c77 RCX: 00007f3e8eb2c329 [ 29.629126] RDX: 0000000000000040 RSI: 0000000000000000 RDI: 0000000000000003 executing program [ 29.636375] RBP: 0000000000000000 R08: 0000000000000340 R09: 00007ffc349dcbe8 [ 29.643640] R10: 0000000020000900 R11: 0000000000000246 R12: 00007ffc349dca5c [ 29.650897] R13: 431bde82d7b634db R14: 0000000000000000 R15: 0000000000000000 [ 29.659516] ip_tables: iptables: counters copy to user failed while replacing table executing program executing program [ 29.685698] ip_tables: iptables: counters copy to user failed while replacing table [ 29.710899] ip_tables: iptables: counters copy to user failed while replacing table [ 29.732594] ip_tables: iptables: counters copy to user failed while replacing table executing program executing program executing program [ 29.810756] ip_tables: iptables: counters copy to user failed while replacing table [ 29.831049] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 29.860994] ip_tables: iptables: counters copy to user failed while replacing table executing program executing program [ 29.917031] ip_tables: iptables: counters copy to user failed while replacing table [ 29.940671] 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 [ 33.980504] net_ratelimit: 94 callbacks suppressed [ 33.980508] ip_tables: iptables: counters copy to user failed while replacing table [ 34.009884] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 34.033698] ip_tables: iptables: counters copy to user failed while replacing table executing program executing program [ 34.089934] ip_tables: iptables: counters copy to user failed while replacing table [ 34.110138] ip_tables: iptables: counters copy to user failed while replacing table executing program executing program [ 34.170328] ip_tables: iptables: counters copy to user failed while replacing table [ 34.191217] ip_tables: iptables: counters copy to user failed while replacing table [ 34.219979] ip_tables: iptables: counters copy to user failed while replacing table executing program executing program executing program [ 34.307937] ip_tables: iptables: counters copy to user failed while replacing table [ 34.329034] 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 executing program executing program executing program [ 38.984953] net_ratelimit: 105 callbacks suppressed [ 38.984956] ip_tables: iptables: counters copy to user failed while replacing table executing program executing program