Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.0.75' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 28.619928] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 28.734056] [ 28.735701] ====================================================== [ 28.742008] WARNING: possible circular locking dependency detected [ 28.748319] 4.14.262-syzkaller #0 Not tainted [ 28.752799] ------------------------------------------------------ [ 28.759106] syz-executor814/8017 is trying to acquire lock: [ 28.764803] (rtnl_mutex){+.+.}, at: [] unregister_netdevice_notifier+0x5e/0x2b0 [ 28.773905] [ 28.773905] but task is already holding lock: [ 28.779859] (&xt[i].mutex){+.+.}, at: [] xt_find_table_lock+0x38/0x3d0 [ 28.788156] [ 28.788156] which lock already depends on the new lock. [ 28.788156] [ 28.796546] [ 28.796546] the existing dependency chain (in reverse order) is: [ 28.804139] [ 28.804139] -> #2 (&xt[i].mutex){+.+.}: [ 28.809573] __mutex_lock+0xc4/0x1310 [ 28.813869] match_revfn+0x43/0x210 [ 28.817993] xt_find_revision+0x8d/0x1d0 [ 28.822549] nfnl_compat_get+0x1f7/0x870 [ 28.827106] nfnetlink_rcv_msg+0x9bb/0xc00 [ 28.831836] netlink_rcv_skb+0x125/0x390 [ 28.836392] nfnetlink_rcv+0x1ab/0x1da0 [ 28.840859] netlink_unicast+0x437/0x610 [ 28.845412] netlink_sendmsg+0x648/0xbc0 [ 28.849968] sock_sendmsg+0xb5/0x100 [ 28.854172] ___sys_sendmsg+0x6c8/0x800 [ 28.858638] __sys_sendmsg+0xa3/0x120 [ 28.862929] SyS_sendmsg+0x27/0x40 [ 28.866962] do_syscall_64+0x1d5/0x640 [ 28.871340] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 28.877016] [ 28.877016] -> #1 (&table[i].mutex){+.+.}: [ 28.882708] __mutex_lock+0xc4/0x1310 [ 28.887003] nf_tables_netdev_event+0x10d/0x4d0 [ 28.892165] notifier_call_chain+0x108/0x1a0 [ 28.897069] rollback_registered_many+0x765/0xba0 [ 28.902406] rollback_registered+0xca/0x170 [ 28.907220] unregister_netdevice_queue+0x1b4/0x360 [ 28.912730] ppp_release+0x177/0x1a0 [ 28.916936] __fput+0x25f/0x7a0 [ 28.920715] task_work_run+0x11f/0x190 [ 28.925110] do_exit+0xa44/0x2850 [ 28.929056] do_group_exit+0x100/0x2e0 [ 28.933438] SyS_exit_group+0x19/0x20 [ 28.937734] do_syscall_64+0x1d5/0x640 [ 28.942117] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 28.947797] [ 28.947797] -> #0 (rtnl_mutex){+.+.}: [ 28.953109] lock_acquire+0x170/0x3f0 [ 28.957410] __mutex_lock+0xc4/0x1310 [ 28.961727] unregister_netdevice_notifier+0x5e/0x2b0 [ 28.967417] tee_tg_destroy+0x5c/0xb0 [ 28.971713] cleanup_entry+0x232/0x310 [ 28.976094] __do_replace+0x38d/0x580 [ 28.980393] do_ip6t_set_ctl+0x256/0x3b0 [ 28.984970] nf_setsockopt+0x5f/0xb0 [ 28.989177] ipv6_setsockopt+0xc0/0x120 [ 28.993641] udpv6_setsockopt+0x45/0x80 [ 28.998107] SyS_setsockopt+0x110/0x1e0 [ 29.002576] do_syscall_64+0x1d5/0x640 [ 29.006958] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 29.012637] [ 29.012637] other info that might help us debug this: [ 29.012637] [ 29.020749] Chain exists of: [ 29.020749] rtnl_mutex --> &table[i].mutex --> &xt[i].mutex [ 29.020749] [ 29.030967] Possible unsafe locking scenario: [ 29.030967] [ 29.037002] CPU0 CPU1 [ 29.041640] ---- ---- [ 29.046279] lock(&xt[i].mutex); [ 29.049709] lock(&table[i].mutex); [ 29.055912] lock(&xt[i].mutex); [ 29.061856] lock(rtnl_mutex); [ 29.065106] [ 29.065106] *** DEADLOCK *** [ 29.065106] [ 29.071134] 1 lock held by syz-executor814/8017: [ 29.075858] #0: (&xt[i].mutex){+.+.}, at: [] xt_find_table_lock+0x38/0x3d0 [ 29.084594] [ 29.084594] stack backtrace: [ 29.089073] CPU: 0 PID: 8017 Comm: syz-executor814 Not tainted 4.14.262-syzkaller #0 [ 29.096926] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 29.106252] Call Trace: [ 29.108818] dump_stack+0x1b2/0x281 [ 29.112425] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 29.118202] __lock_acquire+0x2e0e/0x3f20 [ 29.122324] ? trace_hardirqs_on+0x10/0x10 [ 29.126533] ? kernel_text_address+0xbd/0xf0 [ 29.130913] ? __lock_acquire+0x5fc/0x3f20 [ 29.135122] ? __save_stack_trace+0xa0/0x160 [ 29.139504] lock_acquire+0x170/0x3f0 [ 29.143283] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 29.148622] ? recent_mt+0xf90/0xf90 [ 29.152308] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 29.157654] __mutex_lock+0xc4/0x1310 [ 29.161431] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 29.166770] ? lock_acquire+0x170/0x3f0 [ 29.170720] ? recent_mt_destroy+0x163/0x5d0 [ 29.175104] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 29.180446] ? recent_mt+0xf90/0xf90 [ 29.184134] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 29.189560] ? __mutex_lock+0x360/0x1310 [ 29.193595] ? cleanup_entry+0x141/0x310 [ 29.197630] ? lock_downgrade+0x740/0x740 [ 29.201769] ? recent_mt+0xf90/0xf90 [ 29.205461] unregister_netdevice_notifier+0x5e/0x2b0 [ 29.210631] ? __mutex_unlock_slowpath+0x75/0x770 [ 29.215454] ? register_netdevice_notifier+0x4d0/0x4d0 [ 29.220708] ? wait_for_completion_io+0x10/0x10 [ 29.225357] ? recent_mt+0xf90/0xf90 [ 29.229042] tee_tg_destroy+0x5c/0xb0 [ 29.232816] ? tee_tg6+0x160/0x160 [ 29.236336] cleanup_entry+0x232/0x310 [ 29.240200] ? compat_do_ip6t_get_ctl+0x820/0x820 [ 29.245138] __do_replace+0x38d/0x580 [ 29.248949] ? ip6t_unregister_table+0x60/0x60 [ 29.253517] do_ip6t_set_ctl+0x256/0x3b0 [ 29.257563] ? compat_do_ip6t_set_ctl+0x140/0x140 [ 29.262387] ? nf_sockopt_find.constprop.0+0x1ad/0x220 [ 29.267676] nf_setsockopt+0x5f/0xb0 [ 29.271369] ipv6_setsockopt+0xc0/0x120 [ 29.275318] udpv6_setsockopt+0x45/0x80 [ 29.279279] SyS_setsockopt+0x110/0x1e0 [ 29.283232] ? SyS_recv+0x40/0x40 [ 29.286664] ? do_syscall_64+0x4c/0x640 [ 29.290614] ? SyS_recv+0x40/0x40 [ 29.294041] do_syscall_64+0x1d5/0x640 [ 29.297903] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 29.303070] RIP: 0033:0x7f0722c364a9 [ 29.306751] RSP: 002b:00007ffc80c33bd8 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 [ 29.314436] RAX: ffffffffffffffda RBX: 000000306d616574 RCX: 00007f0722c364a9 [ 29.321680] RDX: 0000000000000040 RSI: 0000000000000029 RDI: 0000000000000004 [ 29.328926] RBP: 0000000000000000 R08: 0000000000000518 R09: 00007ffc80c33d78 executing program [ 29.336169] R10: 0000000020007340 R11: 0000000000000246 R12: 00007ffc80c33bec [ 29.343411] R13: 431bde82d7b634db R14: 0000000000000000 R15: 0000000000000000 [ 29.360623] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 29.401383] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 29.461563] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 29.503942] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 29.552416] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 29.593336] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 29.641408] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program executing program [ 29.710975] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 29.753270] 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 [ 33.628475] net_ratelimit: 82 callbacks suppressed [ 33.628478] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 33.687873] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 33.738732] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 33.808752] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 33.878139] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program executing program [ 33.947829] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 33.997584] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 34.039549] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program executing program [ 34.107265] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 34.158155] 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 [ 38.635535] net_ratelimit: 93 callbacks suppressed [ 38.635539] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program executing program [ 38.704866] ip6_tables: ip6tables: counters copy to user failed while replacing table