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.1.34' (ECDSA) to the list of known hosts. executing program executing program syzkaller login: [ 28.422222] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 28.491031] [ 28.492671] ====================================================== [ 28.498978] WARNING: possible circular locking dependency detected [ 28.505284] 4.14.264-syzkaller #0 Not tainted [ 28.509761] ------------------------------------------------------ [ 28.516063] syz-executor804/7983 is trying to acquire lock: [ 28.521754] (rtnl_mutex){+.+.}, at: [] unregister_netdevice_notifier+0x5e/0x2b0 [ 28.530852] [ 28.530852] but task is already holding lock: [ 28.536805] (&xt[i].mutex){+.+.}, at: [] xt_find_table_lock+0x38/0x3d0 [ 28.545118] [ 28.545118] which lock already depends on the new lock. [ 28.545118] [ 28.553419] [ 28.553419] the existing dependency chain (in reverse order) is: [ 28.561010] [ 28.561010] -> #2 (&xt[i].mutex){+.+.}: [ 28.566443] __mutex_lock+0xc4/0x1310 [ 28.570737] match_revfn+0x43/0x210 [ 28.574856] xt_find_revision+0x8d/0x1d0 [ 28.579410] nfnl_compat_get+0x1f7/0x870 [ 28.583964] nfnetlink_rcv_msg+0x9bb/0xc00 [ 28.588687] netlink_rcv_skb+0x125/0x390 [ 28.593240] nfnetlink_rcv+0x1ab/0x1da0 [ 28.597706] netlink_unicast+0x437/0x610 [ 28.602261] netlink_sendmsg+0x648/0xbc0 [ 28.606813] sock_sendmsg+0xb5/0x100 [ 28.611020] ___sys_sendmsg+0x6c8/0x800 [ 28.615486] __sys_sendmsg+0xa3/0x120 [ 28.619777] SyS_sendmsg+0x27/0x40 [ 28.623810] do_syscall_64+0x1d5/0x640 [ 28.628192] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 28.633869] [ 28.633869] -> #1 (&table[i].mutex){+.+.}: [ 28.639564] __mutex_lock+0xc4/0x1310 [ 28.643862] nf_tables_netdev_event+0x10d/0x4d0 [ 28.649023] notifier_call_chain+0x108/0x1a0 [ 28.653933] rollback_registered_many+0x765/0xba0 [ 28.659271] rollback_registered+0xca/0x170 [ 28.664082] unregister_netdevice_queue+0x1b4/0x360 [ 28.669590] ip6_tnl_ioctl+0x954/0xe40 [ 28.673982] dev_ifsioc+0x1d8/0x7d0 [ 28.678105] dev_ioctl+0x43c/0xbe0 [ 28.682223] sock_ioctl+0x164/0x4c0 [ 28.686344] do_vfs_ioctl+0x75a/0xff0 [ 28.690638] SyS_ioctl+0x7f/0xb0 [ 28.694497] do_syscall_64+0x1d5/0x640 [ 28.698879] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 28.704556] [ 28.704556] -> #0 (rtnl_mutex){+.+.}: [ 28.709811] lock_acquire+0x170/0x3f0 [ 28.714107] __mutex_lock+0xc4/0x1310 [ 28.718403] unregister_netdevice_notifier+0x5e/0x2b0 [ 28.724086] tee_tg_destroy+0x5c/0xb0 [ 28.728450] cleanup_entry+0x232/0x310 [ 28.732827] __do_replace+0x38d/0x580 [ 28.737117] do_ip6t_set_ctl+0x256/0x3b0 [ 28.741681] nf_setsockopt+0x5f/0xb0 [ 28.746321] ipv6_setsockopt+0xc0/0x120 [ 28.750802] tcp_setsockopt+0x7b/0xc0 [ 28.755098] SyS_setsockopt+0x110/0x1e0 [ 28.759563] do_syscall_64+0x1d5/0x640 [ 28.763942] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 28.769619] [ 28.769619] other info that might help us debug this: [ 28.769619] [ 28.777729] Chain exists of: [ 28.777729] rtnl_mutex --> &table[i].mutex --> &xt[i].mutex [ 28.777729] [ 28.787938] Possible unsafe locking scenario: [ 28.787938] [ 28.793968] CPU0 CPU1 [ 28.798605] ---- ---- [ 28.803247] lock(&xt[i].mutex); [ 28.806685] lock(&table[i].mutex); [ 28.812898] lock(&xt[i].mutex); [ 28.818842] lock(rtnl_mutex); [ 28.822094] [ 28.822094] *** DEADLOCK *** [ 28.822094] [ 28.828124] 1 lock held by syz-executor804/7983: [ 28.832847] #0: (&xt[i].mutex){+.+.}, at: [] xt_find_table_lock+0x38/0x3d0 [ 28.841574] [ 28.841574] stack backtrace: [ 28.846043] CPU: 1 PID: 7983 Comm: syz-executor804 Not tainted 4.14.264-syzkaller #0 [ 28.853894] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 28.863221] Call Trace: [ 28.865790] dump_stack+0x1b2/0x281 [ 28.869435] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 28.875208] __lock_acquire+0x2e0e/0x3f20 [ 28.879326] ? lock_acquire+0x170/0x3f0 [ 28.883272] ? lock_downgrade+0x740/0x740 [ 28.887393] ? trace_hardirqs_on+0x10/0x10 [ 28.891599] ? is_bpf_text_address+0xb8/0x150 [ 28.896066] ? kernel_text_address+0xbd/0xf0 [ 28.900449] ? __lock_acquire+0x5fc/0x3f20 [ 28.904654] ? __kernel_text_address+0x9/0x30 [ 28.909123] ? __save_stack_trace+0xa0/0x160 [ 28.913503] lock_acquire+0x170/0x3f0 [ 28.917288] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 28.922627] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 28.927962] __mutex_lock+0xc4/0x1310 [ 28.931736] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 28.937073] ? trace_hardirqs_on+0x10/0x10 [ 28.941282] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 28.946620] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 28.952041] ? pcpu_next_fit_region.constprop.0+0x3a0/0x3a0 [ 28.957721] ? trace_hardirqs_on+0x10/0x10 [ 28.962112] ? free_percpu+0x23e/0x730 [ 28.965974] unregister_netdevice_notifier+0x5e/0x2b0 [ 28.971231] ? register_netdevice_notifier+0x4d0/0x4d0 [ 28.976488] ? _raw_spin_unlock_irqrestore+0x66/0xe0 [ 28.981572] ? free_percpu+0x23e/0x730 [ 28.985438] tee_tg_destroy+0x5c/0xb0 [ 28.989212] ? tee_tg6+0x160/0x160 [ 28.992725] cleanup_entry+0x232/0x310 [ 28.996590] ? compat_do_ip6t_get_ctl+0x820/0x820 [ 29.001410] __do_replace+0x38d/0x580 [ 29.005208] ? ip6t_unregister_table+0x60/0x60 [ 29.009763] do_ip6t_set_ctl+0x256/0x3b0 [ 29.013799] ? compat_do_ip6t_set_ctl+0x140/0x140 [ 29.018619] ? nf_sockopt_find.constprop.0+0x1ad/0x220 [ 29.023871] nf_setsockopt+0x5f/0xb0 [ 29.027561] ipv6_setsockopt+0xc0/0x120 [ 29.031513] tcp_setsockopt+0x7b/0xc0 [ 29.035291] SyS_setsockopt+0x110/0x1e0 [ 29.039235] ? SyS_recv+0x40/0x40 [ 29.042660] ? do_syscall_64+0x4c/0x640 [ 29.046607] ? SyS_recv+0x40/0x40 [ 29.050032] do_syscall_64+0x1d5/0x640 [ 29.053901] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 29.059064] RIP: 0033:0x7f8dfcd8e559 [ 29.062745] RSP: 002b:00007ffc99f90ab8 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 [ 29.070423] RAX: ffffffffffffffda RBX: 00306e616c767069 RCX: 00007f8dfcd8e559 [ 29.077666] RDX: 0000000000000040 RSI: 0000000000000029 RDI: 0000000000000005 [ 29.084911] RBP: 0000000000000000 R08: 0000000000000450 R09: 00007ffc99f90c58 executing program [ 29.092167] R10: 0000000020000b00 R11: 0000000000000246 R12: 00007ffc99f90acc [ 29.099445] R13: 431bde82d7b634db R14: 0000000000000000 R15: 0000000000000000 [ 29.107651] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 29.141978] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 29.219769] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 29.289687] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 29.339994] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 29.389535] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 29.459851] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 29.519603] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 29.569854] 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 [ 33.427167] net_ratelimit: 75 callbacks suppressed [ 33.427170] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 33.497204] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 33.567175] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 33.627112] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 33.667612] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 33.717717] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 33.787343] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 33.847437] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 33.907132] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program executing program [ 33.956825] 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 [ 38.465988] net_ratelimit: 92 callbacks suppressed [ 38.465992] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program