[ OK ] Found device /dev/ttyS0. [ OK ] Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch. [ 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... [ 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.0.171' (ECDSA) to the list of known hosts. executing program executing program syzkaller login: [ 28.966199] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 28.984045] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 28.996635] [ 28.998276] ====================================================== [ 29.004580] WARNING: possible circular locking dependency detected [ 29.010887] 4.14.231-syzkaller #0 Not tainted [ 29.015365] ------------------------------------------------------ [ 29.021669] syz-executor827/7976 is trying to acquire lock: [ 29.027355] (&table[i].mutex){+.+.}, at: [] nf_tables_netdev_event+0x10d/0x4d0 [ 29.036360] [ 29.036360] but task is already holding lock: [ 29.042321] (rtnl_mutex){+.+.}, at: [] br_del_bridge+0x13/0xe0 [ 29.049942] [ 29.049942] which lock already depends on the new lock. [ 29.049942] [ 29.058231] [ 29.058231] the existing dependency chain (in reverse order) is: [ 29.065870] [ 29.065870] -> #2 (rtnl_mutex){+.+.}: [ 29.071134] __mutex_lock+0xc4/0x1310 [ 29.075434] unregister_netdevice_notifier+0x5e/0x2b0 [ 29.081144] tee_tg_destroy+0x5c/0xb0 [ 29.085439] cleanup_entry+0x232/0x310 [ 29.089839] __do_replace+0x38d/0x580 [ 29.094135] do_ip6t_set_ctl+0x256/0x3b0 [ 29.098692] nf_setsockopt+0x5f/0xb0 [ 29.102903] ipv6_setsockopt+0xc0/0x120 [ 29.107377] udpv6_setsockopt+0x45/0x80 [ 29.111849] SyS_setsockopt+0x110/0x1e0 [ 29.116341] do_syscall_64+0x1d5/0x640 [ 29.120725] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 29.126411] [ 29.126411] -> #1 (&xt[i].mutex){+.+.}: [ 29.131850] __mutex_lock+0xc4/0x1310 [ 29.136151] target_revfn+0x43/0x210 [ 29.140364] xt_find_revision+0x15e/0x1d0 [ 29.145009] nfnl_compat_get+0x1f7/0x870 [ 29.149572] nfnetlink_rcv_msg+0x9bb/0xc00 [ 29.154307] netlink_rcv_skb+0x125/0x390 [ 29.158903] nfnetlink_rcv+0x1ab/0x1da0 [ 29.163638] netlink_unicast+0x437/0x610 [ 29.168193] netlink_sendmsg+0x62e/0xb80 [ 29.172747] sock_sendmsg+0xb5/0x100 [ 29.176955] ___sys_sendmsg+0x6c8/0x800 [ 29.181424] __sys_sendmsg+0xa3/0x120 [ 29.185717] SyS_sendmsg+0x27/0x40 [ 29.189753] do_syscall_64+0x1d5/0x640 [ 29.194134] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 29.199813] [ 29.199813] -> #0 (&table[i].mutex){+.+.}: [ 29.205537] lock_acquire+0x170/0x3f0 [ 29.209835] __mutex_lock+0xc4/0x1310 [ 29.214129] nf_tables_netdev_event+0x10d/0x4d0 [ 29.219318] notifier_call_chain+0x108/0x1a0 [ 29.224223] rollback_registered_many+0x765/0xba0 [ 29.229559] rollback_registered+0xca/0x170 [ 29.234374] unregister_netdevice_queue+0x1b4/0x360 [ 29.239884] br_del_bridge+0xa9/0xe0 [ 29.244095] br_ioctl_deviceless_stub+0x1ff/0x5f0 [ 29.249446] sock_ioctl+0x254/0x4c0 [ 29.253569] do_vfs_ioctl+0x75a/0xff0 [ 29.257863] SyS_ioctl+0x7f/0xb0 [ 29.261731] do_syscall_64+0x1d5/0x640 [ 29.266118] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 29.271799] [ 29.271799] other info that might help us debug this: [ 29.271799] [ 29.279915] Chain exists of: [ 29.279915] &table[i].mutex --> &xt[i].mutex --> rtnl_mutex [ 29.279915] [ 29.290121] Possible unsafe locking scenario: [ 29.290121] [ 29.296150] CPU0 CPU1 [ 29.300794] ---- ---- [ 29.305439] lock(rtnl_mutex); [ 29.308691] lock(&xt[i].mutex); [ 29.314655] lock(rtnl_mutex); [ 29.320425] lock(&table[i].mutex); [ 29.324111] [ 29.324111] *** DEADLOCK *** [ 29.324111] [ 29.330160] 2 locks held by syz-executor827/7976: [ 29.334992] #0: (br_ioctl_mutex){+.+.}, at: [] sock_ioctl+0x239/0x4c0 [ 29.343309] #1: (rtnl_mutex){+.+.}, at: [] br_del_bridge+0x13/0xe0 [ 29.351346] [ 29.351346] stack backtrace: [ 29.355837] CPU: 1 PID: 7976 Comm: syz-executor827 Not tainted 4.14.231-syzkaller #0 [ 29.363714] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 29.373065] Call Trace: [ 29.375633] dump_stack+0x1b2/0x281 [ 29.379237] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 29.385041] __lock_acquire+0x2e0e/0x3f20 [ 29.389168] ? lock_downgrade+0x740/0x740 [ 29.393371] ? unwind_next_frame+0xe54/0x17d0 [ 29.397842] ? trace_hardirqs_on+0x10/0x10 [ 29.402098] ? kernel_text_address+0xbd/0xf0 [ 29.406529] ? __kernel_text_address+0x9/0x30 [ 29.411074] ? unwind_get_return_address+0x51/0x90 [ 29.415998] lock_acquire+0x170/0x3f0 [ 29.419774] ? nf_tables_netdev_event+0x10d/0x4d0 [ 29.424607] ? nf_tables_netdev_event+0x10d/0x4d0 [ 29.429426] __mutex_lock+0xc4/0x1310 [ 29.433200] ? nf_tables_netdev_event+0x10d/0x4d0 [ 29.438018] ? nf_tables_netdev_event+0x10d/0x4d0 [ 29.442842] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 29.448282] ? trace_hardirqs_on+0x10/0x10 [ 29.452502] ? trace_hardirqs_on_caller+0x3a8/0x580 [ 29.457526] ? lock_downgrade+0x740/0x740 [ 29.461658] nf_tables_netdev_event+0x10d/0x4d0 [ 29.466311] ? mirred_device_event+0x12f/0x170 [ 29.470877] ? nf_tables_netdev_init_net+0x140/0x140 [ 29.475961] ? mirred_device_event+0x12f/0x170 [ 29.480522] ? __local_bh_enable_ip+0xc1/0x170 [ 29.485097] notifier_call_chain+0x108/0x1a0 [ 29.489482] rollback_registered_many+0x765/0xba0 [ 29.494327] ? rcu_lockdep_current_cpu_online+0xed/0x140 [ 29.499753] ? netdev_state_change+0xf0/0xf0 [ 29.504156] ? kmem_cache_free+0x23a/0x2b0 [ 29.508367] ? kernfs_put.part.0+0x1e0/0x490 [ 29.512752] rollback_registered+0xca/0x170 [ 29.517049] ? rollback_registered_many+0xba0/0xba0 [ 29.522041] ? kernfs_put+0x26/0x30 [ 29.525645] unregister_netdevice_queue+0x1b4/0x360 [ 29.530639] br_del_bridge+0xa9/0xe0 [ 29.534327] br_ioctl_deviceless_stub+0x1ff/0x5f0 [ 29.539144] ? old_dev_ioctl.constprop.0.isra.0+0x1210/0x1210 [ 29.545002] ? __fd_install+0x1ec/0x5c0 [ 29.548953] ? lock_acquire+0x170/0x3f0 [ 29.552924] ? old_dev_ioctl.constprop.0.isra.0+0x1210/0x1210 [ 29.558783] sock_ioctl+0x254/0x4c0 [ 29.562396] ? sock_release+0x1e0/0x1e0 [ 29.566344] do_vfs_ioctl+0x75a/0xff0 [ 29.570124] ? __fd_install+0x227/0x5c0 [ 29.574079] ? ioctl_preallocate+0x1a0/0x1a0 [ 29.578460] ? sock_alloc_file+0x1ae/0x2e0 [ 29.582667] ? sock_poll+0x220/0x220 [ 29.586361] ? SyS_socket+0x12f/0x1b0 [ 29.590136] ? security_file_ioctl+0x83/0xb0 [ 29.594517] SyS_ioctl+0x7f/0xb0 [ 29.597857] ? do_vfs_ioctl+0xff0/0xff0 [ 29.601805] do_syscall_64+0x1d5/0x640 [ 29.605668] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 29.610834] RIP: 0033:0x440fb9 executing program [ 29.614006] RSP: 002b:00007ffdf813a858 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 29.621694] RAX: ffffffffffffffda RBX: 000000000000713a RCX: 0000000000440fb9 [ 29.628940] RDX: 00000000200000c0 RSI: 00000000000089a1 RDI: 0000000000000004 [ 29.636307] RBP: 0000000000000000 R08: 00007ffdf813a9f8 R09: 00007ffdf813a9f8 [ 29.643558] R10: 00007ffdf813a9f8 R11: 0000000000000246 R12: 00007ffdf813a86c [ 29.650806] R13: 431bde82d7b634db R14: 00000000004af018 R15: 0000000000400488 executing program [ 29.703705] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 29.746982] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 29.803507] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 29.872611] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 29.922475] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 29.972980] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 30.019497] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 30.071883] 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 [ 33.976904] net_ratelimit: 85 callbacks suppressed [ 33.976907] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 34.041206] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 34.098250] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program executing program [ 34.149195] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 34.187791] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 34.233750] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 34.289856] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 34.361490] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program executing program [ 34.410379] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 34.448817] 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