[ 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.1.14' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 29.308928] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 29.373997] [ 29.375633] ====================================================== [ 29.381933] WARNING: possible circular locking dependency detected [ 29.388233] 4.14.299-syzkaller #0 Not tainted [ 29.392714] ------------------------------------------------------ [ 29.399015] syz-executor696/7970 is trying to acquire lock: [ 29.404705] (rtnl_mutex){+.+.}, at: [] unregister_netdevice_notifier+0x5e/0x2b0 [ 29.413800] [ 29.413800] but task is already holding lock: [ 29.419748] (&xt[i].mutex){+.+.}, at: [] xt_find_table_lock+0x38/0x3d0 [ 29.428145] [ 29.428145] which lock already depends on the new lock. [ 29.428145] [ 29.436430] [ 29.436430] the existing dependency chain (in reverse order) is: [ 29.444017] [ 29.444017] -> #2 (&xt[i].mutex){+.+.}: [ 29.449446] __mutex_lock+0xc4/0x1310 [ 29.453744] match_revfn+0x43/0x210 [ 29.457864] xt_find_revision+0x8d/0x1d0 [ 29.462416] nfnl_compat_get+0x1f7/0x870 [ 29.466968] nfnetlink_rcv_msg+0x9bb/0xc00 [ 29.471696] netlink_rcv_skb+0x125/0x390 [ 29.476249] nfnetlink_rcv+0x1ab/0x1da0 [ 29.480712] netlink_unicast+0x437/0x610 [ 29.485261] netlink_sendmsg+0x648/0xbc0 [ 29.489811] sock_sendmsg+0xb5/0x100 [ 29.494016] ___sys_sendmsg+0x6c8/0x800 [ 29.498482] __sys_sendmsg+0xa3/0x120 [ 29.502772] SyS_sendmsg+0x27/0x40 [ 29.506804] do_syscall_64+0x1d5/0x640 [ 29.511188] entry_SYSCALL_64_after_hwframe+0x5e/0xd3 [ 29.516865] [ 29.516865] -> #1 (&table[i].mutex){+.+.}: [ 29.522554] __mutex_lock+0xc4/0x1310 [ 29.526846] nf_tables_netdev_event+0x10d/0x4d0 [ 29.532007] notifier_call_chain+0x108/0x1a0 [ 29.536907] rollback_registered_many+0x765/0xbb0 [ 29.542239] rollback_registered+0xca/0x170 [ 29.547051] unregister_netdevice_queue+0x1b4/0x360 [ 29.552559] ppp_release+0x177/0x1a0 [ 29.556763] __fput+0x25f/0x7a0 [ 29.560535] task_work_run+0x11f/0x190 [ 29.564914] do_exit+0xa44/0x2850 [ 29.568858] do_group_exit+0x100/0x2e0 [ 29.573242] SyS_exit_group+0x19/0x20 [ 29.577537] do_syscall_64+0x1d5/0x640 [ 29.581918] entry_SYSCALL_64_after_hwframe+0x5e/0xd3 [ 29.587597] [ 29.587597] -> #0 (rtnl_mutex){+.+.}: [ 29.592850] lock_acquire+0x170/0x3f0 [ 29.597143] __mutex_lock+0xc4/0x1310 [ 29.601435] unregister_netdevice_notifier+0x5e/0x2b0 [ 29.607116] tee_tg_destroy+0x5c/0xb0 [ 29.611406] cleanup_entry+0x232/0x310 [ 29.615784] __do_replace+0x38d/0x580 [ 29.620075] do_ip6t_set_ctl+0x256/0x3b0 [ 29.624628] nf_setsockopt+0x5f/0xb0 [ 29.628834] ipv6_setsockopt+0xc0/0x120 [ 29.633300] udpv6_setsockopt+0x45/0x80 [ 29.637766] SyS_setsockopt+0x110/0x1e0 [ 29.642280] do_syscall_64+0x1d5/0x640 [ 29.646664] entry_SYSCALL_64_after_hwframe+0x5e/0xd3 [ 29.652342] [ 29.652342] other info that might help us debug this: [ 29.652342] [ 29.660453] Chain exists of: [ 29.660453] rtnl_mutex --> &table[i].mutex --> &xt[i].mutex [ 29.660453] [ 29.670653] Possible unsafe locking scenario: [ 29.670653] [ 29.676677] CPU0 CPU1 [ 29.681312] ---- ---- [ 29.685946] lock(&xt[i].mutex); [ 29.689390] lock(&table[i].mutex); [ 29.695591] lock(&xt[i].mutex); [ 29.701533] lock(rtnl_mutex); [ 29.704784] [ 29.704784] *** DEADLOCK *** [ 29.704784] [ 29.710812] 1 lock held by syz-executor696/7970: [ 29.715536] #0: (&xt[i].mutex){+.+.}, at: [] xt_find_table_lock+0x38/0x3d0 [ 29.724261] [ 29.724261] stack backtrace: [ 29.728735] CPU: 0 PID: 7970 Comm: syz-executor696 Not tainted 4.14.299-syzkaller #0 [ 29.736591] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 29.745915] Call Trace: [ 29.748476] dump_stack+0x1b2/0x281 [ 29.752078] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 29.757857] __lock_acquire+0x2e0e/0x3f20 [ 29.761988] ? trace_hardirqs_on+0x10/0x10 [ 29.766195] ? do_syscall_64+0x1d5/0x640 [ 29.770227] ? __lock_acquire+0x5fc/0x3f20 [ 29.774438] ? entry_SYSCALL_64_after_hwframe+0x5e/0xd3 [ 29.779779] ? __save_stack_trace+0x90/0x160 [ 29.784158] lock_acquire+0x170/0x3f0 [ 29.787935] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 29.793268] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 29.798602] __mutex_lock+0xc4/0x1310 [ 29.802376] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 29.807714] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 29.813051] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 29.818476] ? trace_hardirqs_on+0x10/0x10 [ 29.822709] ? lock_acquire+0x170/0x3f0 [ 29.826659] ? trace_hardirqs_on+0x10/0x10 [ 29.830869] ? xt_find_table_lock+0x38/0x3d0 [ 29.835249] ? __mutex_lock+0x360/0x1310 [ 29.839288] unregister_netdevice_notifier+0x5e/0x2b0 [ 29.844453] ? fs_reclaim_release+0xd0/0x110 [ 29.848832] ? register_netdevice_notifier+0x4d0/0x4d0 [ 29.854081] tee_tg_destroy+0x5c/0xb0 [ 29.857856] ? tee_tg6+0x160/0x160 [ 29.861367] cleanup_entry+0x232/0x310 [ 29.865230] ? cpumask_next+0x30/0x40 [ 29.869000] ? compat_do_ip6t_get_ctl+0x820/0x820 [ 29.873816] __do_replace+0x38d/0x580 [ 29.877593] ? ip6t_unregister_table+0x60/0x60 [ 29.882145] do_ip6t_set_ctl+0x256/0x3b0 [ 29.886176] ? compat_do_ip6t_set_ctl+0x140/0x140 [ 29.890990] ? nf_sockopt_find.constprop.0+0x1ad/0x220 [ 29.896246] nf_setsockopt+0x5f/0xb0 [ 29.899937] ipv6_setsockopt+0xc0/0x120 [ 29.903889] udpv6_setsockopt+0x45/0x80 [ 29.907834] SyS_setsockopt+0x110/0x1e0 [ 29.911777] ? SyS_recv+0x40/0x40 [ 29.915200] ? security_file_fcntl+0x83/0xb0 [ 29.919578] ? do_syscall_64+0x4c/0x640 executing program [ 29.923523] ? SyS_recv+0x40/0x40 [ 29.926954] do_syscall_64+0x1d5/0x640 [ 29.930816] entry_SYSCALL_64_after_hwframe+0x5e/0xd3 [ 29.936093] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 29.983482] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program executing program [ 30.033251] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 30.073127] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 30.112775] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 30.153261] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 30.202561] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 30.252862] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 30.303066] 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 executing program executing program executing program executing program executing program [ 34.350142] net_ratelimit: 96 callbacks suppressed [ 34.350145] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 34.399785] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program executing program [ 34.440562] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 34.489767] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 34.531654] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 34.590659] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 34.639364] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 34.690063] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 34.750172] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 34.800649] 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 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program