[ 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.136' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 29.187401] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 29.294556] [ 29.296211] ====================================================== [ 29.302497] WARNING: possible circular locking dependency detected [ 29.308790] 4.14.258-syzkaller #0 Not tainted [ 29.313342] ------------------------------------------------------ [ 29.319628] syz-executor027/7985 is trying to acquire lock: [ 29.325313] (rtnl_mutex){+.+.}, at: [] unregister_netdevice_notifier+0x5e/0x2b0 [ 29.334400] [ 29.334400] but task is already holding lock: [ 29.340374] (&xt[i].mutex){+.+.}, at: [] xt_find_table_lock+0x38/0x3d0 [ 29.348674] [ 29.348674] which lock already depends on the new lock. [ 29.348674] [ 29.356960] [ 29.356960] the existing dependency chain (in reverse order) is: [ 29.364553] [ 29.364553] -> #2 (&xt[i].mutex){+.+.}: [ 29.369987] __mutex_lock+0xc4/0x1310 [ 29.374283] match_revfn+0x43/0x210 [ 29.378401] xt_find_revision+0x8d/0x1d0 [ 29.382954] nfnl_compat_get+0x1f7/0x870 [ 29.387505] nfnetlink_rcv_msg+0x9bb/0xc00 [ 29.392236] netlink_rcv_skb+0x125/0x390 [ 29.396792] nfnetlink_rcv+0x1ab/0x1da0 [ 29.401269] netlink_unicast+0x437/0x610 [ 29.405830] netlink_sendmsg+0x638/0xb90 [ 29.410388] sock_sendmsg+0xb5/0x100 [ 29.414595] ___sys_sendmsg+0x6c8/0x800 [ 29.419070] __sys_sendmsg+0xa3/0x120 [ 29.423365] SyS_sendmsg+0x27/0x40 [ 29.427399] do_syscall_64+0x1d5/0x640 [ 29.431780] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 29.437460] [ 29.437460] -> #1 (&table[i].mutex){+.+.}: [ 29.443152] __mutex_lock+0xc4/0x1310 [ 29.447444] nf_tables_netdev_event+0x10d/0x4d0 [ 29.452606] notifier_call_chain+0x108/0x1a0 [ 29.457508] rollback_registered_many+0x765/0xba0 [ 29.462841] rollback_registered+0xca/0x170 [ 29.467654] unregister_netdevice_queue+0x1b4/0x360 [ 29.473161] ppp_release+0x177/0x1a0 [ 29.477368] __fput+0x25f/0x7a0 [ 29.481139] task_work_run+0x11f/0x190 [ 29.485522] do_exit+0xa44/0x2850 [ 29.489468] do_group_exit+0x100/0x2e0 [ 29.493848] SyS_exit_group+0x19/0x20 [ 29.498143] do_syscall_64+0x1d5/0x640 [ 29.502526] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 29.508208] [ 29.508208] -> #0 (rtnl_mutex){+.+.}: [ 29.513467] lock_acquire+0x170/0x3f0 [ 29.517765] __mutex_lock+0xc4/0x1310 [ 29.522065] unregister_netdevice_notifier+0x5e/0x2b0 [ 29.527746] tee_tg_destroy+0x5c/0xb0 [ 29.532040] cleanup_entry+0x232/0x310 [ 29.536417] __do_replace+0x38d/0x580 [ 29.540707] do_ip6t_set_ctl+0x256/0x3b0 [ 29.545261] nf_setsockopt+0x5f/0xb0 [ 29.549467] ipv6_setsockopt+0xc0/0x120 [ 29.553938] tcp_setsockopt+0x7b/0xc0 [ 29.558232] SyS_setsockopt+0x110/0x1e0 [ 29.562699] do_syscall_64+0x1d5/0x640 [ 29.567082] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 29.572767] [ 29.572767] other info that might help us debug this: [ 29.572767] [ 29.580901] Chain exists of: [ 29.580901] rtnl_mutex --> &table[i].mutex --> &xt[i].mutex [ 29.580901] [ 29.591109] Possible unsafe locking scenario: [ 29.591109] [ 29.597138] CPU0 CPU1 [ 29.601776] ---- ---- [ 29.606430] lock(&xt[i].mutex); [ 29.609943] lock(&table[i].mutex); [ 29.616143] lock(&xt[i].mutex); [ 29.622082] lock(rtnl_mutex); [ 29.625331] [ 29.625331] *** DEADLOCK *** [ 29.625331] [ 29.631363] 1 lock held by syz-executor027/7985: [ 29.636088] #0: (&xt[i].mutex){+.+.}, at: [] xt_find_table_lock+0x38/0x3d0 [ 29.644820] [ 29.644820] stack backtrace: [ 29.649287] CPU: 0 PID: 7985 Comm: syz-executor027 Not tainted 4.14.258-syzkaller #0 [ 29.657135] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 29.666545] Call Trace: [ 29.669111] dump_stack+0x1b2/0x281 [ 29.672713] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 29.678487] __lock_acquire+0x2e0e/0x3f20 [ 29.682608] ? lock_acquire+0x170/0x3f0 [ 29.686553] ? lock_downgrade+0x740/0x740 [ 29.690671] ? trace_hardirqs_on+0x10/0x10 [ 29.694883] ? is_bpf_text_address+0xb8/0x150 [ 29.699348] ? kernel_text_address+0xbd/0xf0 [ 29.703730] ? __lock_acquire+0x5fc/0x3f20 [ 29.707936] ? __kernel_text_address+0x9/0x30 [ 29.712403] ? __save_stack_trace+0xa0/0x160 [ 29.716783] lock_acquire+0x170/0x3f0 [ 29.720559] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 29.725897] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 29.731319] __mutex_lock+0xc4/0x1310 [ 29.735180] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 29.740518] ? trace_hardirqs_on+0x10/0x10 [ 29.744725] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 29.750061] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 29.755484] ? pcpu_next_fit_region.constprop.0+0x3a0/0x3a0 [ 29.761169] ? trace_hardirqs_on+0x10/0x10 [ 29.765374] ? free_percpu+0x23e/0x730 [ 29.769236] unregister_netdevice_notifier+0x5e/0x2b0 [ 29.774399] ? register_netdevice_notifier+0x4d0/0x4d0 [ 29.779645] ? _raw_spin_unlock_irqrestore+0x66/0xe0 [ 29.784717] ? free_percpu+0x23e/0x730 [ 29.788577] tee_tg_destroy+0x5c/0xb0 [ 29.792352] ? tee_tg6+0x160/0x160 [ 29.795862] cleanup_entry+0x232/0x310 [ 29.799727] ? cpumask_next+0x30/0x40 [ 29.803499] ? compat_do_ip6t_get_ctl+0x820/0x820 [ 29.808316] __do_replace+0x38d/0x580 [ 29.812089] ? ip6t_unregister_table+0x60/0x60 [ 29.816642] do_ip6t_set_ctl+0x256/0x3b0 [ 29.820676] ? compat_do_ip6t_set_ctl+0x140/0x140 [ 29.825489] ? nf_sockopt_find.constprop.0+0x1ad/0x220 [ 29.830740] nf_setsockopt+0x5f/0xb0 [ 29.834432] ipv6_setsockopt+0xc0/0x120 [ 29.838380] tcp_setsockopt+0x7b/0xc0 [ 29.842155] SyS_setsockopt+0x110/0x1e0 [ 29.846103] ? SyS_recv+0x40/0x40 [ 29.849802] ? up_read+0x17/0x30 [ 29.853139] ? __do_page_fault+0x159/0xad0 [ 29.857346] ? do_syscall_64+0x4c/0x640 [ 29.861292] ? SyS_recv+0x40/0x40 [ 29.864718] do_syscall_64+0x1d5/0x640 [ 29.868579] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 29.873746] RIP: 0033:0x7f15c3e42599 [ 29.877429] RSP: 002b:00007ffec6dc5c08 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 [ 29.885108] RAX: ffffffffffffffda RBX: 0000003065736f72 RCX: 00007f15c3e42599 executing program [ 29.892365] RDX: 0000000000000040 RSI: 0000000000000029 RDI: 0000000000000003 [ 29.899868] RBP: 0000000000000000 R08: 0000000000000460 R09: 00007ffec6dc5da8 [ 29.907199] R10: 0000000020000a80 R11: 0000000000000246 R12: 00007ffec6dc5c1c [ 29.914447] R13: 431bde82d7b634db R14: 0000000000000000 R15: 0000000000000000 [ 29.922093] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 29.973096] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 30.042572] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program executing program [ 30.122638] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 30.173229] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 30.213422] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program executing program [ 30.283199] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 30.333053] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 30.382754] 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 [ 34.249521] net_ratelimit: 70 callbacks suppressed [ 34.249524] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program executing program [ 34.319824] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 34.379380] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 34.430146] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 34.470613] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program executing program [ 34.539146] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 34.600030] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 34.659274] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 34.710446] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 34.769250] 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 [ 39.256947] net_ratelimit: 86 callbacks suppressed [ 39.256950] ip6_tables: ip6tables: counters copy to user failed while replacing table