OK ] Started Getty on tty3. [ OK ] Started Getty on tty2. [ OK ] Started Getty on tty1. [ OK ] Started Serial Getty on ttyS0. [ OK ] Reached target Login Prompts. [ OK ] Reached target Multi-User System. [ OK ] Reached target Graphical Interface. Starting Update UTMP about System Runlevel Changes... Starting Load/Save RF Kill Switch Status... [ OK ] Started Load/Save RF Kill Switch Status. [ OK ] Started Update UTMP about System Runlevel Changes. Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.0.60' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 28.740022] ip_tables: iptables: counters copy to user failed while replacing table [ 28.844116] [ 28.845814] ====================================================== [ 28.852103] WARNING: possible circular locking dependency detected [ 28.858395] 4.14.232-syzkaller #0 Not tainted [ 28.862861] ------------------------------------------------------ [ 28.869166] syz-executor467/7980 is trying to acquire lock: [ 28.874844] (rtnl_mutex){+.+.}, at: [] unregister_netdevice_notifier+0x5e/0x2b0 [ 28.883929] [ 28.883929] but task is already holding lock: [ 28.889877] (&xt[i].mutex){+.+.}, at: [] xt_find_table_lock+0x38/0x3d0 [ 28.898175] [ 28.898175] which lock already depends on the new lock. [ 28.898175] [ 28.906463] [ 28.906463] the existing dependency chain (in reverse order) is: [ 28.914060] [ 28.914060] -> #2 (&xt[i].mutex){+.+.}: [ 28.919513] __mutex_lock+0xc4/0x1310 [ 28.923813] match_revfn+0x43/0x210 [ 28.927953] xt_find_revision+0x8d/0x1d0 [ 28.932524] nfnl_compat_get+0x1f7/0x870 [ 28.937096] nfnetlink_rcv_msg+0x9bb/0xc00 [ 28.941828] netlink_rcv_skb+0x125/0x390 [ 28.946385] nfnetlink_rcv+0x1ab/0x1da0 [ 28.950861] netlink_unicast+0x437/0x610 [ 28.957696] netlink_sendmsg+0x62e/0xb80 [ 28.962263] sock_sendmsg+0xb5/0x100 [ 28.966474] ___sys_sendmsg+0x6c8/0x800 [ 28.970942] __sys_sendmsg+0xa3/0x120 [ 28.975237] SyS_sendmsg+0x27/0x40 [ 28.979286] do_syscall_64+0x1d5/0x640 [ 28.983683] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 28.989367] [ 28.989367] -> #1 (&table[i].mutex){+.+.}: [ 28.995060] __mutex_lock+0xc4/0x1310 [ 28.999376] nf_tables_netdev_event+0x10d/0x4d0 [ 29.004545] notifier_call_chain+0x108/0x1a0 [ 29.009466] rollback_registered_many+0x765/0xba0 [ 29.014827] rollback_registered+0xca/0x170 [ 29.019651] unregister_netdevice_queue+0x1b4/0x360 [ 29.025177] ppp_release+0x177/0x1a0 [ 29.029475] __fput+0x25f/0x7a0 [ 29.033266] task_work_run+0x11f/0x190 [ 29.037649] do_exit+0xa44/0x2850 [ 29.041597] do_group_exit+0x100/0x2e0 [ 29.045992] SyS_exit_group+0x19/0x20 [ 29.050289] do_syscall_64+0x1d5/0x640 [ 29.054685] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 29.060383] [ 29.060383] -> #0 (rtnl_mutex){+.+.}: [ 29.065682] lock_acquire+0x170/0x3f0 [ 29.069981] __mutex_lock+0xc4/0x1310 [ 29.074386] unregister_netdevice_notifier+0x5e/0x2b0 [ 29.080100] tee_tg_destroy+0x5c/0xb0 [ 29.084402] cleanup_entry+0x1fd/0x2d0 [ 29.088803] __do_replace+0x38d/0x570 [ 29.093101] do_ipt_set_ctl+0x256/0x3a0 [ 29.097574] nf_setsockopt+0x5f/0xb0 [ 29.101783] ip_setsockopt+0x94/0xb0 [ 29.106003] udp_setsockopt+0x45/0x80 [ 29.110297] SyS_setsockopt+0x110/0x1e0 [ 29.114780] do_syscall_64+0x1d5/0x640 [ 29.119162] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 29.124844] [ 29.124844] other info that might help us debug this: [ 29.124844] [ 29.132958] Chain exists of: [ 29.132958] rtnl_mutex --> &table[i].mutex --> &xt[i].mutex [ 29.132958] [ 29.143165] Possible unsafe locking scenario: [ 29.143165] [ 29.149198] CPU0 CPU1 [ 29.153877] ---- ---- [ 29.161906] lock(&xt[i].mutex); [ 29.165401] lock(&table[i].mutex); [ 29.171728] lock(&xt[i].mutex); [ 29.177673] lock(rtnl_mutex); [ 29.180941] [ 29.180941] *** DEADLOCK *** [ 29.180941] [ 29.187060] 1 lock held by syz-executor467/7980: [ 29.191800] #0: (&xt[i].mutex){+.+.}, at: [] xt_find_table_lock+0x38/0x3d0 [ 29.200548] [ 29.200548] stack backtrace: [ 29.205018] CPU: 0 PID: 7980 Comm: syz-executor467 Not tainted 4.14.232-syzkaller #0 [ 29.212888] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 29.222233] Call Trace: [ 29.224807] dump_stack+0x1b2/0x281 [ 29.228413] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 29.234188] __lock_acquire+0x2e0e/0x3f20 [ 29.238313] ? lock_downgrade+0x740/0x740 [ 29.242493] ? trace_hardirqs_on+0x10/0x10 [ 29.246739] ? kernel_text_address+0xbd/0xf0 [ 29.251124] ? __lock_acquire+0x5fc/0x3f20 [ 29.255333] ? __kernel_text_address+0x9/0x30 [ 29.259828] lock_acquire+0x170/0x3f0 [ 29.263725] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 29.269079] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 29.274432] __mutex_lock+0xc4/0x1310 [ 29.278232] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 29.283591] ? __lock_acquire+0x5fc/0x3f20 [ 29.287806] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 29.293148] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 29.298574] ? lock_acquire+0x170/0x3f0 [ 29.302542] ? trace_hardirqs_on+0x10/0x10 [ 29.306781] ? xt_find_table_lock+0x38/0x3d0 [ 29.311224] ? __mutex_lock+0x360/0x1310 [ 29.315279] unregister_netdevice_notifier+0x5e/0x2b0 [ 29.320538] ? register_netdevice_notifier+0x4d0/0x4d0 [ 29.325881] tee_tg_destroy+0x5c/0xb0 [ 29.329672] ? tee_tg6+0x160/0x160 [ 29.333191] cleanup_entry+0x1fd/0x2d0 [ 29.337059] ? cpumask_next+0x30/0x40 [ 29.340837] ? compat_do_ipt_get_ctl+0x7b0/0x7b0 [ 29.345620] __do_replace+0x38d/0x570 [ 29.349454] ? ipt_unregister_table+0x60/0x60 [ 29.353928] do_ipt_set_ctl+0x256/0x3a0 [ 29.357913] ? compat_do_ipt_set_ctl+0x140/0x140 [ 29.362650] ? nf_sockopt_find.constprop.0+0x1ad/0x220 [ 29.367907] nf_setsockopt+0x5f/0xb0 [ 29.371620] ip_setsockopt+0x94/0xb0 [ 29.375362] udp_setsockopt+0x45/0x80 [ 29.379142] SyS_setsockopt+0x110/0x1e0 [ 29.383096] ? SyS_recv+0x40/0x40 [ 29.386546] ? up_read+0x17/0x30 [ 29.389890] ? __do_page_fault+0x159/0xad0 [ 29.394100] ? do_syscall_64+0x4c/0x640 [ 29.398047] ? SyS_recv+0x40/0x40 [ 29.401561] do_syscall_64+0x1d5/0x640 [ 29.405486] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 29.410654] RIP: 0033:0x4400b9 [ 29.413923] RSP: 002b:00007ffc2e0c23a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 [ 29.421706] RAX: ffffffffffffffda RBX: 0000000000007055 RCX: 00000000004400b9 [ 29.428957] RDX: 0000000000000040 RSI: 0000000000000000 RDI: 0000000000000003 [ 29.436328] RBP: 0000000000000000 R08: 00000000000002b0 R09: 00007ffc2e0c2548 [ 29.443598] R10: 0000000020000340 R11: 0000000000000246 R12: 00007ffc2e0c23bc [ 29.450948] R13: 431bde82d7b634db R14: 00000000004ae018 R15: 0000000000400488 [ 29.462738] ip_tables: iptables: counters copy to user failed while replacing table [ 29.534001] ip_tables: iptables: counters copy to user failed while replacing table [ 29.602962] ip_tables: iptables: counters copy to user failed while replacing table [ 29.661755] ip_tables: iptables: counters copy to user failed while replacing table [ 29.722097] ip_tables: iptables: counters copy to user failed while replacing table [ 29.792645] ip_tables: iptables: counters copy to user failed while replacing table [ 29.846359] ip_tables: iptables: counters copy to user failed while replacing table [ 29.912682] ip_tables: iptables: counters copy to user failed while replacing table [ 29.971930] ip_tables: iptables: counters copy to user failed while replacing table [ 33.739040] net_ratelimit: 75 callbacks suppressed [ 33.739044] ip_tables: iptables: counters copy to user failed while replacing table [ 33.818995] ip_tables: iptables: counters copy to user failed while replacing table [ 33.880369] ip_tables: iptables: counters copy to user failed while replacing table [ 33.929610] ip_tables: iptables: counters copy to user failed while replacing table [ 33.999922] ip_tables: iptables: counters copy to user failed while replacing table [ 34.051839] ip_tables: iptables: counters copy to user failed while replacing table [ 34.099607] ip_tables: iptables: counters copy to user failed while replacing table [ 34.178731] ip_tables: iptables: counters copy to user failed while replacing table [ 34.229987] ip_tables: iptables: counters copy to user failed while replacing table [ 34.288400] ip_tables: iptables: counters copy to user failed while replacing table [ 38.775827] net_ratelimit: 91 callbacks suppressed [ 38.775830] ip_tables: iptables: counters copy to user failed while replacing table [ 38.835986] ip_tables: iptables: counters copy to user failed while replacing table