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.0.64' (ECDSA) to the list of known hosts. executing program executing program syzkaller login: [ 28.995974] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 29.014944] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 29.029500] [ 29.031130] ====================================================== [ 29.037433] WARNING: possible circular locking dependency detected [ 29.043738] 4.14.226-syzkaller #0 Not tainted [ 29.048219] ------------------------------------------------------ [ 29.054524] syz-executor643/7982 is trying to acquire lock: [ 29.060218] (&table[i].mutex){+.+.}, at: [] nf_tables_netdev_event+0x10d/0x4d0 [ 29.069234] [ 29.069234] but task is already holding lock: [ 29.075211] (rtnl_mutex){+.+.}, at: [] br_del_bridge+0x13/0xe0 [ 29.082815] [ 29.082815] which lock already depends on the new lock. [ 29.082815] [ 29.091115] [ 29.091115] the existing dependency chain (in reverse order) is: [ 29.098704] [ 29.098704] -> #2 (rtnl_mutex){+.+.}: [ 29.103977] __mutex_lock+0xc4/0x1310 [ 29.108276] unregister_netdevice_notifier+0x5e/0x2b0 [ 29.113962] tee_tg_destroy+0x5c/0xb0 [ 29.118268] cleanup_entry+0x232/0x310 [ 29.122924] __do_replace+0x38d/0x580 [ 29.127220] do_ip6t_set_ctl+0x256/0x3b0 [ 29.131790] nf_setsockopt+0x5f/0xb0 [ 29.135997] ipv6_setsockopt+0xc0/0x120 [ 29.140480] udpv6_setsockopt+0x45/0x80 [ 29.144950] SyS_setsockopt+0x110/0x1e0 [ 29.149419] do_syscall_64+0x1d5/0x640 [ 29.153814] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 29.159581] [ 29.159581] -> #1 (&xt[i].mutex){+.+.}: [ 29.165022] __mutex_lock+0xc4/0x1310 [ 29.169319] target_revfn+0x43/0x210 [ 29.173538] xt_find_revision+0x15e/0x1d0 [ 29.178177] nfnl_compat_get+0x1f7/0x870 [ 29.182741] nfnetlink_rcv_msg+0x9bb/0xc00 [ 29.187479] netlink_rcv_skb+0x125/0x390 [ 29.192033] nfnetlink_rcv+0x1ab/0x1da0 [ 29.196513] netlink_unicast+0x437/0x610 [ 29.201067] netlink_sendmsg+0x62e/0xb80 [ 29.205623] sock_sendmsg+0xb5/0x100 [ 29.209829] ___sys_sendmsg+0x6c8/0x800 [ 29.214306] __sys_sendmsg+0xa3/0x120 [ 29.218611] SyS_sendmsg+0x27/0x40 [ 29.222647] do_syscall_64+0x1d5/0x640 [ 29.227030] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 29.232718] [ 29.232718] -> #0 (&table[i].mutex){+.+.}: [ 29.238412] lock_acquire+0x170/0x3f0 [ 29.242727] __mutex_lock+0xc4/0x1310 [ 29.247020] nf_tables_netdev_event+0x10d/0x4d0 [ 29.252195] notifier_call_chain+0x108/0x1a0 [ 29.257110] rollback_registered_many+0x765/0xba0 [ 29.262461] rollback_registered+0xca/0x170 [ 29.267277] unregister_netdevice_queue+0x1b4/0x360 [ 29.272888] br_del_bridge+0xa9/0xe0 [ 29.277095] br_ioctl_deviceless_stub+0x1ff/0x5f0 [ 29.282431] sock_ioctl+0x254/0x4c0 [ 29.286572] do_vfs_ioctl+0x75a/0xff0 [ 29.290869] SyS_ioctl+0x7f/0xb0 [ 29.294729] do_syscall_64+0x1d5/0x640 [ 29.299119] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 29.304849] [ 29.304849] other info that might help us debug this: [ 29.304849] [ 29.312976] Chain exists of: [ 29.312976] &table[i].mutex --> &xt[i].mutex --> rtnl_mutex [ 29.312976] [ 29.325442] Possible unsafe locking scenario: [ 29.325442] [ 29.331483] CPU0 CPU1 [ 29.336120] ---- ---- [ 29.340772] lock(rtnl_mutex); [ 29.344030] lock(&xt[i].mutex); [ 29.349974] lock(rtnl_mutex); [ 29.355779] lock(&table[i].mutex); [ 29.359466] [ 29.359466] *** DEADLOCK *** [ 29.359466] [ 29.365508] 2 locks held by syz-executor643/7982: [ 29.370332] #0: (br_ioctl_mutex){+.+.}, at: [] sock_ioctl+0x239/0x4c0 [ 29.378633] #1: (rtnl_mutex){+.+.}, at: [] br_del_bridge+0x13/0xe0 [ 29.386725] [ 29.386725] stack backtrace: [ 29.391210] CPU: 1 PID: 7982 Comm: syz-executor643 Not tainted 4.14.226-syzkaller #0 [ 29.399066] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 29.408413] Call Trace: [ 29.410984] dump_stack+0x1b2/0x281 [ 29.414586] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 29.420359] __lock_acquire+0x2e0e/0x3f20 [ 29.424480] ? trace_hardirqs_on+0x10/0x10 [ 29.428697] ? trace_hardirqs_on+0x10/0x10 [ 29.432912] lock_acquire+0x170/0x3f0 [ 29.436686] ? nf_tables_netdev_event+0x10d/0x4d0 [ 29.441516] ? nf_tables_netdev_event+0x10d/0x4d0 [ 29.446355] __mutex_lock+0xc4/0x1310 [ 29.450139] ? nf_tables_netdev_event+0x10d/0x4d0 [ 29.454965] ? mark_held_locks+0xa6/0xf0 [ 29.459015] ? _raw_spin_unlock_irq+0x24/0x80 [ 29.463492] ? nf_tables_netdev_event+0x10d/0x4d0 [ 29.468325] ? _raw_spin_unlock_irq+0x5a/0x80 [ 29.472797] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 29.478223] ? __schedule+0x893/0x1de0 [ 29.482096] nf_tables_netdev_event+0x10d/0x4d0 [ 29.486753] ? ___preempt_schedule+0x16/0x18 [ 29.491146] ? preempt_schedule_common+0x45/0xc0 [ 29.495874] ? nf_tables_netdev_init_net+0x140/0x140 [ 29.500963] ? mirred_device_event+0x12f/0x170 [ 29.505529] ? __local_bh_enable_ip+0x132/0x170 [ 29.510173] notifier_call_chain+0x108/0x1a0 [ 29.514569] rollback_registered_many+0x765/0xba0 [ 29.519397] ? rcu_lockdep_current_cpu_online+0xed/0x140 [ 29.524820] ? netdev_state_change+0xf0/0xf0 [ 29.529222] ? kmem_cache_free+0x23a/0x2b0 [ 29.533433] ? kernfs_put.part.0+0x1e0/0x490 [ 29.537831] rollback_registered+0xca/0x170 [ 29.542129] ? rollback_registered_many+0xba0/0xba0 [ 29.547120] ? kernfs_put+0x26/0x30 [ 29.550724] unregister_netdevice_queue+0x1b4/0x360 [ 29.555717] br_del_bridge+0xa9/0xe0 [ 29.559424] br_ioctl_deviceless_stub+0x1ff/0x5f0 [ 29.564241] ? old_dev_ioctl.constprop.0.isra.0+0x1210/0x1210 [ 29.570113] ? __fd_install+0x1ec/0x5c0 [ 29.574060] ? lock_acquire+0x170/0x3f0 [ 29.578181] ? old_dev_ioctl.constprop.0.isra.0+0x1210/0x1210 [ 29.584042] sock_ioctl+0x254/0x4c0 [ 29.587651] ? sock_release+0x1e0/0x1e0 [ 29.591605] do_vfs_ioctl+0x75a/0xff0 [ 29.595388] ? __fd_install+0x227/0x5c0 [ 29.599336] ? ioctl_preallocate+0x1a0/0x1a0 [ 29.603728] ? sock_alloc_file+0x1ae/0x2e0 [ 29.607948] ? sock_poll+0x220/0x220 [ 29.611637] ? SyS_socket+0x12f/0x1b0 [ 29.615412] ? security_file_ioctl+0x83/0xb0 [ 29.619797] SyS_ioctl+0x7f/0xb0 [ 29.623144] ? do_vfs_ioctl+0xff0/0xff0 [ 29.627102] do_syscall_64+0x1d5/0x640 [ 29.630976] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 29.636136] RIP: 0033:0x440fb9 [ 29.639301] RSP: 002b:00007ffcf03cfa68 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 executing program [ 29.646979] RAX: ffffffffffffffda RBX: 000000000000714c RCX: 0000000000440fb9 [ 29.654233] RDX: 00000000200000c0 RSI: 00000000000089a1 RDI: 0000000000000004 [ 29.661487] RBP: 0000000000000000 R08: 00007ffcf03cfc08 R09: 00007ffcf03cfc08 [ 29.668731] R10: 00007ffcf03cfc08 R11: 0000000000000246 R12: 00007ffcf03cfa7c [ 29.675972] R13: 431bde82d7b634db R14: 00000000004af018 R15: 0000000000400488 executing program [ 29.725151] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 29.775484] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 29.815808] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 29.855459] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 29.905882] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program executing program [ 29.976050] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 30.017066] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 30.068286] 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 [ 34.024876] net_ratelimit: 81 callbacks suppressed [ 34.024880] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 34.084660] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program executing program [ 34.152659] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 34.192770] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program executing program [ 34.243447] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 34.283526] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program executing program [ 34.333568] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 34.372732] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program executing program [ 34.417316] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 34.473080] 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