[ OK ] Reached target Graphical Interface. Starting Update UTMP about System Runlevel Changes... Starting Load/Save RF Kill Switch Status... [ OK ] Started Update UTMP about System Runlevel Changes. [ OK ] Started Load/Save RF Kill Switch Status. Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.0.167' (ECDSA) to the list of known hosts. executing program executing program syzkaller login: [ 28.061821] ip_tables: iptables: counters copy to user failed while replacing table [ 28.120916] [ 28.122572] ====================================================== [ 28.128969] WARNING: possible circular locking dependency detected [ 28.135274] 4.14.277-syzkaller #0 Not tainted [ 28.139762] ------------------------------------------------------ [ 28.146068] syz-executor274/7979 is trying to acquire lock: [ 28.151781] (rtnl_mutex){+.+.}, at: [] unregister_netdevice_notifier+0x5e/0x2b0 [ 28.160882] [ 28.160882] but task is already holding lock: [ 28.166844] (&xt[i].mutex){+.+.}, at: [] xt_find_table_lock+0x38/0x3d0 [ 28.175162] [ 28.175162] which lock already depends on the new lock. [ 28.175162] [ 28.183469] [ 28.183469] the existing dependency chain (in reverse order) is: [ 28.191363] [ 28.191363] -> #2 (&xt[i].mutex){+.+.}: [ 28.196901] __mutex_lock+0xc4/0x1310 [ 28.201196] match_revfn+0x43/0x210 [ 28.205329] xt_find_revision+0x8d/0x1d0 [ 28.210401] nfnl_compat_get+0x1f7/0x870 [ 28.215093] nfnetlink_rcv_msg+0x9bb/0xc00 [ 28.221870] netlink_rcv_skb+0x125/0x390 [ 28.226427] nfnetlink_rcv+0x1ab/0x1da0 [ 28.230896] netlink_unicast+0x437/0x610 [ 28.235449] netlink_sendmsg+0x648/0xbc0 [ 28.240103] sock_sendmsg+0xb5/0x100 [ 28.244312] ___sys_sendmsg+0x6c8/0x800 [ 28.248779] __sys_sendmsg+0xa3/0x120 [ 28.253077] SyS_sendmsg+0x27/0x40 [ 28.257113] do_syscall_64+0x1d5/0x640 [ 28.261500] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 28.267186] [ 28.267186] -> #1 (&table[i].mutex){+.+.}: [ 28.272877] __mutex_lock+0xc4/0x1310 [ 28.277173] nf_tables_netdev_event+0x10d/0x4d0 [ 28.282341] notifier_call_chain+0x108/0x1a0 [ 28.287250] rollback_registered_many+0x765/0xbb0 [ 28.292591] rollback_registered+0xca/0x170 [ 28.297406] register_netdevice+0xb63/0xe50 [ 28.302399] ip6_tnl_create2+0x16c/0x290 [ 28.306952] ip6_tnl_newlink+0x265/0x470 [ 28.311511] rtnl_newlink+0xf7c/0x1830 [ 28.315898] rtnetlink_rcv_msg+0x3be/0xb10 [ 28.320651] netlink_rcv_skb+0x125/0x390 [ 28.325209] netlink_unicast+0x437/0x610 [ 28.329767] netlink_sendmsg+0x648/0xbc0 [ 28.334413] sock_sendmsg+0xb5/0x100 [ 28.338654] ___sys_sendmsg+0x6c8/0x800 [ 28.343125] __sys_sendmsg+0xa3/0x120 [ 28.347419] SyS_sendmsg+0x27/0x40 [ 28.351497] do_syscall_64+0x1d5/0x640 [ 28.355932] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 28.361612] [ 28.361612] -> #0 (rtnl_mutex){+.+.}: [ 28.366959] lock_acquire+0x170/0x3f0 [ 28.371255] __mutex_lock+0xc4/0x1310 [ 28.375548] unregister_netdevice_notifier+0x5e/0x2b0 [ 28.381259] tee_tg_destroy+0x5c/0xb0 [ 28.385558] cleanup_entry+0x1fd/0x2d0 [ 28.389945] __do_replace+0x38d/0x570 [ 28.394421] do_ipt_set_ctl+0x256/0x3a0 [ 28.398914] nf_setsockopt+0x5f/0xb0 [ 28.403124] ip_setsockopt+0x94/0xb0 [ 28.407361] raw_setsockopt+0xac/0xd0 [ 28.411666] SyS_setsockopt+0x110/0x1e0 [ 28.416144] do_syscall_64+0x1d5/0x640 [ 28.420529] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 28.426213] [ 28.426213] other info that might help us debug this: [ 28.426213] [ 28.434338] Chain exists of: [ 28.434338] rtnl_mutex --> &table[i].mutex --> &xt[i].mutex [ 28.434338] [ 28.444632] Possible unsafe locking scenario: [ 28.444632] [ 28.450843] CPU0 CPU1 [ 28.455493] ---- ---- [ 28.460132] lock(&xt[i].mutex); [ 28.463557] lock(&table[i].mutex); [ 28.469778] lock(&xt[i].mutex); [ 28.475728] lock(rtnl_mutex); [ 28.478985] [ 28.478985] *** DEADLOCK *** [ 28.478985] [ 28.485020] 1 lock held by syz-executor274/7979: [ 28.489746] #0: (&xt[i].mutex){+.+.}, at: [] xt_find_table_lock+0x38/0x3d0 [ 28.498664] [ 28.498664] stack backtrace: [ 28.503135] CPU: 1 PID: 7979 Comm: syz-executor274 Not tainted 4.14.277-syzkaller #0 [ 28.510986] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 28.520313] Call Trace: [ 28.522881] dump_stack+0x1b2/0x281 [ 28.526488] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 28.532267] __lock_acquire+0x2e0e/0x3f20 [ 28.536391] ? lock_downgrade+0x740/0x740 [ 28.540548] ? trace_hardirqs_on+0x10/0x10 [ 28.544757] ? kernel_text_address+0xbd/0xf0 [ 28.549138] ? __lock_acquire+0x5fc/0x3f20 [ 28.553346] ? __kernel_text_address+0x9/0x30 [ 28.557992] lock_acquire+0x170/0x3f0 [ 28.561777] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 28.567213] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 28.572551] __mutex_lock+0xc4/0x1310 [ 28.576501] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 28.581840] ? __lock_acquire+0x5fc/0x3f20 [ 28.586048] ? trace_hardirqs_on+0x10/0x10 [ 28.590267] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 28.595779] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 28.602857] ? pcpu_next_fit_region.constprop.0+0x3a0/0x3a0 [ 28.608542] ? trace_hardirqs_on+0x10/0x10 [ 28.612764] ? free_percpu+0x23e/0x730 [ 28.616626] unregister_netdevice_notifier+0x5e/0x2b0 [ 28.622027] ? register_netdevice_notifier+0x4d0/0x4d0 [ 28.627287] ? _raw_spin_unlock_irqrestore+0x66/0xe0 [ 28.632405] ? free_percpu+0x23e/0x730 [ 28.636287] tee_tg_destroy+0x5c/0xb0 [ 28.640067] ? tee_tg6+0x160/0x160 [ 28.643584] cleanup_entry+0x1fd/0x2d0 [ 28.647447] ? cpumask_next+0x30/0x40 [ 28.651225] ? compat_do_ipt_get_ctl+0x7b0/0x7b0 [ 28.655960] __do_replace+0x38d/0x570 [ 28.659734] ? ipt_unregister_table+0x60/0x60 [ 28.664204] do_ipt_set_ctl+0x256/0x3a0 [ 28.668150] ? compat_do_ipt_set_ctl+0x140/0x140 [ 28.672879] ? nf_sockopt_find.constprop.0+0x1ad/0x220 [ 28.678260] nf_setsockopt+0x5f/0xb0 [ 28.681968] ip_setsockopt+0x94/0xb0 [ 28.685661] raw_setsockopt+0xac/0xd0 [ 28.689611] SyS_setsockopt+0x110/0x1e0 [ 28.693561] ? SyS_recv+0x40/0x40 [ 28.697162] ? __do_page_fault+0x159/0xad0 [ 28.701373] ? do_syscall_64+0x4c/0x640 [ 28.705344] ? SyS_recv+0x40/0x40 [ 28.708774] do_syscall_64+0x1d5/0x640 [ 28.712647] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 28.717856] RIP: 0033:0x7f344ca444e9 [ 28.721544] RSP: 002b:00007fff95321fe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 [ 28.729226] RAX: ffffffffffffffda RBX: 000000306e616376 RCX: 00007f344ca444e9 [ 28.736468] RDX: 0000000000000040 RSI: 0000000000000000 RDI: 0000000000000006 [ 28.743891] RBP: 0000000000000000 R08: 0000000000000288 R09: 0000000000000000 [ 28.751480] R10: 0000000020001c40 R11: 0000000000000246 R12: 00007fff95322010 [ 28.758724] R13: 431bde82d7b634db R14: 0000000000000000 R15: 0000000000000000 executing program [ 28.766534] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 28.810008] ip_tables: iptables: counters copy to user failed while replacing table executing program executing program [ 28.859833] ip_tables: iptables: counters copy to user failed while replacing table [ 28.900034] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 28.960667] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 29.029748] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 29.081984] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 29.159596] ip_tables: iptables: counters copy to user failed while replacing table executing program executing program [ 29.239546] 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 [ 33.106171] net_ratelimit: 73 callbacks suppressed [ 33.106174] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 33.176230] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 33.236524] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 33.286045] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 33.326508] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 33.385955] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 33.436759] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 33.515942] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 33.566704] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 33.636514] 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