Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.1.5' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 27.228726] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 27.298162] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 27.310071] [ 27.311692] ====================================================== [ 27.317996] WARNING: possible circular locking dependency detected [ 27.324287] 4.14.249-syzkaller #0 Not tainted [ 27.328754] ------------------------------------------------------ [ 27.335041] syz-executor944/7980 is trying to acquire lock: [ 27.340720] (&table[i].mutex){+.+.}, at: [] nf_tables_netdev_event+0x10d/0x4d0 [ 27.349708] [ 27.349708] but task is already holding lock: [ 27.355648] (rtnl_mutex){+.+.}, at: [] br_del_bridge+0x13/0xe0 [ 27.363259] [ 27.363259] which lock already depends on the new lock. [ 27.363259] [ 27.371547] [ 27.371547] the existing dependency chain (in reverse order) is: [ 27.379135] [ 27.379135] -> #2 (rtnl_mutex){+.+.}: [ 27.384396] __mutex_lock+0xc4/0x1310 [ 27.388693] unregister_netdevice_notifier+0x5e/0x2b0 [ 27.394378] tee_tg_destroy+0x5c/0xb0 [ 27.398672] cleanup_entry+0x232/0x310 [ 27.403069] __do_replace+0x38d/0x580 [ 27.407362] do_ip6t_set_ctl+0x256/0x3b0 [ 27.411913] nf_setsockopt+0x5f/0xb0 [ 27.416117] ipv6_setsockopt+0xc0/0x120 [ 27.420585] udpv6_setsockopt+0x45/0x80 [ 27.425055] SyS_setsockopt+0x110/0x1e0 [ 27.429520] do_syscall_64+0x1d5/0x640 [ 27.433903] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 27.439586] [ 27.439586] -> #1 (&xt[i].mutex){+.+.}: [ 27.445020] __mutex_lock+0xc4/0x1310 [ 27.449316] match_revfn+0x43/0x210 [ 27.453436] xt_find_revision+0x8d/0x1d0 [ 27.457988] nfnl_compat_get+0x1f7/0x870 [ 27.462558] nfnetlink_rcv_msg+0x9bb/0xc00 [ 27.467284] netlink_rcv_skb+0x125/0x390 [ 27.471836] nfnetlink_rcv+0x1ab/0x1da0 [ 27.476317] netlink_unicast+0x437/0x610 [ 27.480870] netlink_sendmsg+0x62e/0xb80 [ 27.485423] sock_sendmsg+0xb5/0x100 [ 27.489651] ___sys_sendmsg+0x6c8/0x800 [ 27.494118] __sys_sendmsg+0xa3/0x120 [ 27.498417] SyS_sendmsg+0x27/0x40 [ 27.502457] do_syscall_64+0x1d5/0x640 [ 27.506849] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 27.512531] [ 27.512531] -> #0 (&table[i].mutex){+.+.}: [ 27.518227] lock_acquire+0x170/0x3f0 [ 27.522527] __mutex_lock+0xc4/0x1310 [ 27.527153] nf_tables_netdev_event+0x10d/0x4d0 [ 27.532335] notifier_call_chain+0x108/0x1a0 [ 27.537238] rollback_registered_many+0x765/0xba0 [ 27.542582] rollback_registered+0xca/0x170 [ 27.547562] unregister_netdevice_queue+0x1b4/0x360 [ 27.553073] br_del_bridge+0xa9/0xe0 [ 27.557282] br_ioctl_deviceless_stub+0x1ff/0x5f0 [ 27.562705] sock_ioctl+0x254/0x4c0 [ 27.566823] do_vfs_ioctl+0x75a/0xff0 [ 27.571168] SyS_ioctl+0x7f/0xb0 [ 27.575051] do_syscall_64+0x1d5/0x640 [ 27.579431] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 27.585107] [ 27.585107] other info that might help us debug this: [ 27.585107] [ 27.593220] Chain exists of: [ 27.593220] &table[i].mutex --> &xt[i].mutex --> rtnl_mutex [ 27.593220] [ 27.603430] Possible unsafe locking scenario: [ 27.603430] [ 27.609456] CPU0 CPU1 [ 27.614091] ---- ---- [ 27.618725] lock(rtnl_mutex); [ 27.621977] lock(&xt[i].mutex); [ 27.627917] lock(rtnl_mutex); [ 27.633685] lock(&table[i].mutex); [ 27.637375] [ 27.637375] *** DEADLOCK *** [ 27.637375] [ 27.643404] 2 locks held by syz-executor944/7980: [ 27.648215] #0: (br_ioctl_mutex){+.+.}, at: [] sock_ioctl+0x239/0x4c0 [ 27.656508] #1: (rtnl_mutex){+.+.}, at: [] br_del_bridge+0x13/0xe0 [ 27.664547] [ 27.664547] stack backtrace: [ 27.669020] CPU: 1 PID: 7980 Comm: syz-executor944 Not tainted 4.14.249-syzkaller #0 [ 27.676868] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 27.686194] Call Trace: [ 27.688759] dump_stack+0x1b2/0x281 [ 27.692359] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 27.698129] __lock_acquire+0x2e0e/0x3f20 [ 27.702247] ? lock_downgrade+0x740/0x740 [ 27.706370] ? unwind_next_frame+0xe54/0x17d0 [ 27.710840] ? trace_hardirqs_on+0x10/0x10 [ 27.715045] ? kernel_text_address+0xbd/0xf0 [ 27.719423] ? __kernel_text_address+0x9/0x30 [ 27.723889] ? unwind_get_return_address+0x51/0x90 [ 27.728809] lock_acquire+0x170/0x3f0 [ 27.732583] ? nf_tables_netdev_event+0x10d/0x4d0 [ 27.737399] ? nf_tables_netdev_event+0x10d/0x4d0 [ 27.742229] __mutex_lock+0xc4/0x1310 [ 27.746003] ? nf_tables_netdev_event+0x10d/0x4d0 [ 27.750817] ? nf_tables_netdev_event+0x10d/0x4d0 [ 27.755629] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 27.761050] ? trace_hardirqs_on+0x10/0x10 [ 27.765269] ? trace_hardirqs_on_caller+0x3a8/0x580 [ 27.770258] ? lock_downgrade+0x740/0x740 [ 27.774400] nf_tables_netdev_event+0x10d/0x4d0 [ 27.779051] ? mirred_device_event+0x12f/0x170 [ 27.783622] ? nf_tables_netdev_init_net+0x140/0x140 [ 27.788707] ? mirred_device_event+0x12f/0x170 [ 27.793268] ? __local_bh_enable_ip+0xc1/0x170 [ 27.797826] notifier_call_chain+0x108/0x1a0 [ 27.802211] rollback_registered_many+0x765/0xba0 [ 27.807034] ? rcu_lockdep_current_cpu_online+0xed/0x140 [ 27.812508] ? netdev_state_change+0xf0/0xf0 [ 27.816899] ? kmem_cache_free+0x23a/0x2b0 [ 27.821118] ? kernfs_put.part.0+0x1e0/0x490 [ 27.825515] rollback_registered+0xca/0x170 [ 27.829818] ? rollback_registered_many+0xba0/0xba0 [ 27.834821] ? kernfs_put+0x26/0x30 [ 27.838424] unregister_netdevice_queue+0x1b4/0x360 [ 27.843421] br_del_bridge+0xa9/0xe0 [ 27.847114] br_ioctl_deviceless_stub+0x1ff/0x5f0 [ 27.851934] ? old_dev_ioctl.constprop.0.isra.0+0x1210/0x1210 [ 27.857794] ? __fd_install+0x1ec/0x5c0 [ 27.861743] ? lock_acquire+0x170/0x3f0 [ 27.865688] ? old_dev_ioctl.constprop.0.isra.0+0x1210/0x1210 [ 27.871547] sock_ioctl+0x254/0x4c0 [ 27.875146] ? sock_release+0x1e0/0x1e0 [ 27.879095] do_vfs_ioctl+0x75a/0xff0 [ 27.882865] ? __fd_install+0x227/0x5c0 [ 27.886812] ? ioctl_preallocate+0x1a0/0x1a0 [ 27.891215] ? sock_alloc_file+0x1ae/0x2e0 [ 27.895426] ? sock_poll+0x220/0x220 [ 27.899118] ? SyS_socket+0x12f/0x1b0 [ 27.902908] ? security_file_ioctl+0x83/0xb0 [ 27.907298] SyS_ioctl+0x7f/0xb0 [ 27.910649] ? do_vfs_ioctl+0xff0/0xff0 [ 27.914600] do_syscall_64+0x1d5/0x640 [ 27.918519] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 27.923690] RIP: 0033:0x7f1a82ed9509 [ 27.927375] RSP: 002b:00007fffdf40d708 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 27.935054] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f1a82ed9509 [ 27.942297] RDX: 00000000200000c0 RSI: 00000000000089a1 RDI: 0000000000000004 executing program [ 27.949538] RBP: 0000000000000000 R08: 00007fffdf40d8a8 R09: 00007fffdf40d8a8 [ 27.956824] R10: 00007fffdf40d8a8 R11: 0000000000000246 R12: 00007fffdf40d71c [ 27.964069] R13: 431bde82d7b634db R14: 0000000000000000 R15: 0000000000000000 executing program [ 28.015884] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 28.074960] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 28.148247] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program executing program [ 28.210689] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 28.266560] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 28.321900] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 28.381203] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program executing program [ 28.445437] 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 [ 32.252446] net_ratelimit: 75 callbacks suppressed [ 32.252449] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program executing program [ 32.321140] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 32.382933] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program executing program [ 32.461925] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 32.519000] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 32.562250] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 32.621487] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 32.673896] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 32.715722] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 32.767017] 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 [ 37.259039] net_ratelimit: 86 callbacks suppressed [ 37.259043] ip6_tables: ip6tables: counters copy to user failed while replacing table