[ 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.10.33' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 28.983513] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 29.062206] [ 29.063854] ====================================================== [ 29.070152] WARNING: possible circular locking dependency detected [ 29.076449] 4.14.292-syzkaller #0 Not tainted [ 29.080927] ------------------------------------------------------ [ 29.087233] syz-executor311/7995 is trying to acquire lock: [ 29.092947] (rtnl_mutex){+.+.}, at: [] unregister_netdevice_notifier+0x5e/0x2b0 [ 29.102028] [ 29.102028] but task is already holding lock: [ 29.107976] (&xt[i].mutex){+.+.}, at: [] xt_find_table_lock+0x38/0x3d0 [ 29.116280] [ 29.116280] which lock already depends on the new lock. [ 29.116280] [ 29.124587] [ 29.124587] the existing dependency chain (in reverse order) is: [ 29.132195] [ 29.132195] -> #2 (&xt[i].mutex){+.+.}: [ 29.137643] __mutex_lock+0xc4/0x1310 [ 29.141939] target_revfn+0x43/0x210 [ 29.146156] xt_find_revision+0x15e/0x1d0 [ 29.150816] nfnl_compat_get+0x1f7/0x870 [ 29.155387] nfnetlink_rcv_msg+0x9bb/0xc00 [ 29.160130] netlink_rcv_skb+0x125/0x390 [ 29.164695] nfnetlink_rcv+0x1ab/0x1da0 [ 29.169164] netlink_unicast+0x437/0x610 [ 29.173717] netlink_sendmsg+0x648/0xbc0 [ 29.178277] sock_sendmsg+0xb5/0x100 [ 29.182504] ___sys_sendmsg+0x6c8/0x800 [ 29.186977] __sys_sendmsg+0xa3/0x120 [ 29.191274] SyS_sendmsg+0x27/0x40 [ 29.195321] do_syscall_64+0x1d5/0x640 [ 29.199715] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 29.205397] [ 29.205397] -> #1 (&table[i].mutex){+.+.}: [ 29.211092] __mutex_lock+0xc4/0x1310 [ 29.215416] nf_tables_netdev_event+0x10d/0x4d0 [ 29.220580] notifier_call_chain+0x108/0x1a0 [ 29.225484] rollback_registered_many+0x765/0xbb0 [ 29.230819] unregister_netdevice_many.part.0+0x18/0x2e0 [ 29.236808] unregister_netdevice_many+0x36/0x50 [ 29.242059] rtnl_newlink+0x13fd/0x1830 [ 29.246526] rtnetlink_rcv_msg+0x3be/0xb10 [ 29.251266] netlink_rcv_skb+0x125/0x390 [ 29.255823] netlink_unicast+0x437/0x610 [ 29.260393] netlink_sendmsg+0x648/0xbc0 [ 29.264946] sock_sendmsg+0xb5/0x100 [ 29.269158] ___sys_sendmsg+0x6c8/0x800 [ 29.273627] __sys_sendmsg+0xa3/0x120 [ 29.277918] SyS_sendmsg+0x27/0x40 [ 29.281952] do_syscall_64+0x1d5/0x640 [ 29.286356] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 29.292037] [ 29.292037] -> #0 (rtnl_mutex){+.+.}: [ 29.297314] lock_acquire+0x170/0x3f0 [ 29.301626] __mutex_lock+0xc4/0x1310 [ 29.305923] unregister_netdevice_notifier+0x5e/0x2b0 [ 29.311605] tee_tg_destroy+0x5c/0xb0 [ 29.315901] cleanup_entry+0x1fd/0x2d0 [ 29.320282] __do_replace+0x38d/0x570 [ 29.324589] do_ipt_set_ctl+0x256/0x3a0 [ 29.329074] nf_setsockopt+0x5f/0xb0 [ 29.333281] ip_setsockopt+0x94/0xb0 [ 29.337489] udp_setsockopt+0x45/0x80 [ 29.341907] SyS_setsockopt+0x110/0x1e0 [ 29.346375] do_syscall_64+0x1d5/0x640 [ 29.350760] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 29.356445] [ 29.356445] other info that might help us debug this: [ 29.356445] [ 29.364586] Chain exists of: [ 29.364586] rtnl_mutex --> &table[i].mutex --> &xt[i].mutex [ 29.364586] [ 29.374804] Possible unsafe locking scenario: [ 29.374804] [ 29.380841] CPU0 CPU1 [ 29.385477] ---- ---- [ 29.390133] lock(&xt[i].mutex); [ 29.393559] lock(&table[i].mutex); [ 29.399783] lock(&xt[i].mutex); [ 29.405728] lock(rtnl_mutex); [ 29.408980] [ 29.408980] *** DEADLOCK *** [ 29.408980] [ 29.415012] 1 lock held by syz-executor311/7995: [ 29.419735] #0: (&xt[i].mutex){+.+.}, at: [] xt_find_table_lock+0x38/0x3d0 [ 29.428463] [ 29.428463] stack backtrace: [ 29.432931] CPU: 0 PID: 7995 Comm: syz-executor311 Not tainted 4.14.292-syzkaller #0 [ 29.440786] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022 [ 29.450174] Call Trace: [ 29.452739] dump_stack+0x1b2/0x281 [ 29.456340] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 29.462112] __lock_acquire+0x2e0e/0x3f20 [ 29.466247] ? lock_downgrade+0x740/0x740 [ 29.470383] ? trace_hardirqs_on+0x10/0x10 [ 29.474590] ? kernel_text_address+0xbd/0xf0 [ 29.478972] ? __lock_acquire+0x5fc/0x3f20 [ 29.483180] ? __kernel_text_address+0x9/0x30 [ 29.487650] lock_acquire+0x170/0x3f0 [ 29.491426] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 29.496763] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 29.502101] __mutex_lock+0xc4/0x1310 [ 29.505873] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 29.511210] ? __lock_acquire+0x5fc/0x3f20 [ 29.515416] ? trace_hardirqs_on+0x10/0x10 [ 29.519624] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 29.524961] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 29.530387] ? pcpu_next_fit_region.constprop.0+0x3a0/0x3a0 [ 29.536070] ? trace_hardirqs_on+0x10/0x10 [ 29.540279] ? free_percpu+0x23e/0x730 [ 29.544143] unregister_netdevice_notifier+0x5e/0x2b0 [ 29.549311] ? register_netdevice_notifier+0x4d0/0x4d0 [ 29.554562] ? _raw_spin_unlock_irqrestore+0x66/0xe0 [ 29.559639] ? free_percpu+0x23e/0x730 [ 29.563501] tee_tg_destroy+0x5c/0xb0 [ 29.567283] ? tee_tg6+0x160/0x160 [ 29.570798] cleanup_entry+0x1fd/0x2d0 [ 29.574663] ? compat_do_ipt_get_ctl+0x7b0/0x7b0 [ 29.579391] __do_replace+0x38d/0x570 [ 29.583164] ? ipt_unregister_table+0x60/0x60 [ 29.587649] do_ipt_set_ctl+0x256/0x3a0 [ 29.591858] ? compat_do_ipt_set_ctl+0x140/0x140 [ 29.596592] ? nf_sockopt_find.constprop.0+0x1ad/0x220 [ 29.601843] nf_setsockopt+0x5f/0xb0 [ 29.605539] ip_setsockopt+0x94/0xb0 [ 29.609228] udp_setsockopt+0x45/0x80 [ 29.613006] SyS_setsockopt+0x110/0x1e0 [ 29.616959] ? SyS_recv+0x40/0x40 [ 29.620388] ? up_read+0x17/0x30 [ 29.623731] ? __do_page_fault+0x159/0xad0 [ 29.627952] ? do_syscall_64+0x4c/0x640 [ 29.631899] ? SyS_recv+0x40/0x40 [ 29.635326] do_syscall_64+0x1d5/0x640 [ 29.639190] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 29.644353] RIP: 0033:0x7f1010c9d609 [ 29.648035] RSP: 002b:00007ffc76242718 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 [ 29.655716] RAX: ffffffffffffffda RBX: 0030766461746162 RCX: 00007f1010c9d609 [ 29.662957] RDX: 0000000000000040 RSI: 0000000000000000 RDI: 0000000000000003 [ 29.670203] RBP: 0000000000000000 R08: 0000000000000308 R09: 00007ffc762428b8 [ 29.677447] R10: 0000000020000040 R11: 0000000000000246 R12: 00007ffc7624272c [ 29.684687] R13: 431bde82d7b634db R14: 0000000000000000 R15: 0000000000000000 [ 29.692496] ip_tables: iptables: counters copy to user failed while replacing table executing program executing program [ 29.766738] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 29.806890] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 29.866435] ip_tables: iptables: counters copy to user failed while replacing table [ 29.906321] ip_tables: iptables: counters copy to user failed while replacing table executing program executing program [ 29.958666] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 30.007642] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 30.065987] ip_tables: iptables: counters copy to user failed while replacing table [ 30.105765] 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 [ 34.013606] net_ratelimit: 78 callbacks suppressed [ 34.013610] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 34.083966] ip_tables: iptables: counters copy to user failed while replacing table executing program executing program [ 34.153474] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 34.207141] ip_tables: iptables: counters copy to user failed while replacing table executing program executing program [ 34.265998] ip_tables: iptables: counters copy to user failed while replacing table [ 34.304857] ip_tables: iptables: counters copy to user failed while replacing table [ 34.345836] ip_tables: iptables: counters copy to user failed while replacing table executing program executing program [ 34.413634] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 34.453859] ip_tables: iptables: counters copy to user failed while replacing table [ 34.504500] 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 [ 39.062485] net_ratelimit: 94 callbacks suppressed [ 39.062488] ip_tables: iptables: counters copy to user failed while replacing table