Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.1.4' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 33.293332] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 33.420369] [ 33.422306] ====================================================== [ 33.432449] WARNING: possible circular locking dependency detected [ 33.440086] 4.14.231-syzkaller #0 Not tainted [ 33.445257] ------------------------------------------------------ [ 33.453122] syz-executor287/8004 is trying to acquire lock: [ 33.460109] (rtnl_mutex){+.+.}, at: [] unregister_netdevice_notifier+0x5e/0x2b0 [ 33.471073] [ 33.471073] but task is already holding lock: [ 33.477855] (&xt[i].mutex){+.+.}, at: [] xt_find_table_lock+0x38/0x3d0 [ 33.487115] [ 33.487115] which lock already depends on the new lock. [ 33.487115] [ 33.497410] [ 33.497410] the existing dependency chain (in reverse order) is: [ 33.507350] [ 33.507350] -> #2 (&xt[i].mutex){+.+.}: [ 33.515749] __mutex_lock+0xc4/0x1310 [ 33.520951] match_revfn+0x43/0x210 [ 33.528903] xt_find_revision+0x8d/0x1d0 [ 33.536286] nfnl_compat_get+0x1f7/0x870 [ 33.542734] nfnetlink_rcv_msg+0x9bb/0xc00 [ 33.549640] netlink_rcv_skb+0x125/0x390 [ 33.556569] nfnetlink_rcv+0x1ab/0x1da0 [ 33.562242] netlink_unicast+0x437/0x610 [ 33.567999] netlink_sendmsg+0x62e/0xb80 [ 33.573335] sock_sendmsg+0xb5/0x100 [ 33.578819] ___sys_sendmsg+0x6c8/0x800 [ 33.585978] __sys_sendmsg+0xa3/0x120 [ 33.591996] SyS_sendmsg+0x27/0x40 [ 33.598675] do_syscall_64+0x1d5/0x640 [ 33.604772] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 33.612745] [ 33.612745] -> #1 (&table[i].mutex){+.+.}: [ 33.620444] __mutex_lock+0xc4/0x1310 [ 33.626613] nf_tables_netdev_event+0x10d/0x4d0 [ 33.634334] notifier_call_chain+0x108/0x1a0 [ 33.641958] rollback_registered_many+0x765/0xba0 [ 33.648688] rollback_registered+0xca/0x170 [ 33.656097] unregister_netdevice_queue+0x1b4/0x360 [ 33.662520] br_del_bridge+0xa9/0xe0 [ 33.667431] br_ioctl_deviceless_stub+0x1ff/0x5f0 [ 33.673861] sock_ioctl+0x254/0x4c0 [ 33.678181] do_vfs_ioctl+0x75a/0xff0 [ 33.684292] SyS_ioctl+0x7f/0xb0 [ 33.688685] do_syscall_64+0x1d5/0x640 [ 33.693940] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 33.700478] [ 33.700478] -> #0 (rtnl_mutex){+.+.}: [ 33.706391] lock_acquire+0x170/0x3f0 [ 33.711497] __mutex_lock+0xc4/0x1310 [ 33.716680] unregister_netdevice_notifier+0x5e/0x2b0 [ 33.723943] tee_tg_destroy+0x5c/0xb0 [ 33.728641] cleanup_entry+0x232/0x310 [ 33.735514] __do_replace+0x38d/0x580 [ 33.741296] do_ip6t_set_ctl+0x256/0x3b0 [ 33.746636] nf_setsockopt+0x5f/0xb0 [ 33.753821] ipv6_setsockopt+0xc0/0x120 [ 33.759410] tcp_setsockopt+0x7b/0xc0 [ 33.764729] SyS_setsockopt+0x110/0x1e0 [ 33.770702] do_syscall_64+0x1d5/0x640 [ 33.775655] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 33.781590] [ 33.781590] other info that might help us debug this: [ 33.781590] [ 33.792068] Chain exists of: [ 33.792068] rtnl_mutex --> &table[i].mutex --> &xt[i].mutex [ 33.792068] [ 33.803191] Possible unsafe locking scenario: [ 33.803191] [ 33.812186] CPU0 CPU1 [ 33.817617] ---- ---- [ 33.823508] lock(&xt[i].mutex); [ 33.827454] lock(&table[i].mutex); [ 33.835659] lock(&xt[i].mutex); [ 33.843728] lock(rtnl_mutex); [ 33.847382] [ 33.847382] *** DEADLOCK *** [ 33.847382] [ 33.855494] 1 lock held by syz-executor287/8004: [ 33.861248] #0: (&xt[i].mutex){+.+.}, at: [] xt_find_table_lock+0x38/0x3d0 [ 33.871134] [ 33.871134] stack backtrace: [ 33.877154] CPU: 1 PID: 8004 Comm: syz-executor287 Not tainted 4.14.231-syzkaller #0 [ 33.886290] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 33.897109] Call Trace: [ 33.900660] dump_stack+0x1b2/0x281 [ 33.904521] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 33.912101] __lock_acquire+0x2e0e/0x3f20 [ 33.916506] ? lock_acquire+0x170/0x3f0 [ 33.921098] ? lock_downgrade+0x740/0x740 [ 33.926329] ? trace_hardirqs_on+0x10/0x10 [ 33.932066] ? is_bpf_text_address+0xb8/0x150 [ 33.937411] ? kernel_text_address+0xbd/0xf0 [ 33.941951] ? __lock_acquire+0x5fc/0x3f20 [ 33.946215] ? __kernel_text_address+0x9/0x30 [ 33.951493] ? __save_stack_trace+0xa0/0x160 [ 33.956121] lock_acquire+0x170/0x3f0 [ 33.960785] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 33.966959] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 33.972573] __mutex_lock+0xc4/0x1310 [ 33.976788] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 33.982925] ? unregister_netdevice_notifier+0x5e/0x2b0 [ 33.988328] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 33.993863] ? trace_hardirqs_on+0x10/0x10 [ 33.999400] ? lock_acquire+0x170/0x3f0 [ 34.003545] ? trace_hardirqs_on+0x10/0x10 [ 34.007995] ? xt_find_table_lock+0x38/0x3d0 [ 34.012751] ? __mutex_lock+0x360/0x1310 [ 34.016939] unregister_netdevice_notifier+0x5e/0x2b0 [ 34.022514] ? fs_reclaim_release+0xd0/0x110 [ 34.026978] ? register_netdevice_notifier+0x4d0/0x4d0 [ 34.032291] tee_tg_destroy+0x5c/0xb0 [ 34.036111] ? tee_tg6+0x160/0x160 [ 34.039685] cleanup_entry+0x232/0x310 [ 34.043868] ? cpumask_next+0x30/0x40 [ 34.047923] ? compat_do_ip6t_get_ctl+0x820/0x820 [ 34.052885] __do_replace+0x38d/0x580 [ 34.056718] ? ip6t_unregister_table+0x60/0x60 [ 34.062444] do_ip6t_set_ctl+0x256/0x3b0 [ 34.070461] ? compat_do_ip6t_set_ctl+0x140/0x140 [ 34.076057] ? nf_sockopt_find.constprop.0+0x1ad/0x220 [ 34.081425] nf_setsockopt+0x5f/0xb0 [ 34.085972] ipv6_setsockopt+0xc0/0x120 [ 34.090395] tcp_setsockopt+0x7b/0xc0 [ 34.094422] SyS_setsockopt+0x110/0x1e0 [ 34.099260] ? SyS_recv+0x40/0x40 [ 34.102820] ? do_syscall_64+0x4c/0x640 [ 34.106830] ? SyS_recv+0x40/0x40 [ 34.110386] do_syscall_64+0x1d5/0x640 [ 34.114289] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 34.119610] RIP: 0033:0x441239 [ 34.122815] RSP: 002b:00007fffc2ea30c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 [ 34.130951] RAX: ffffffffffffffda RBX: 000000306e616c77 RCX: 0000000000441239 [ 34.138224] RDX: 0000000000000040 RSI: 0000000000000029 RDI: 0000000000000004 [ 34.146140] RBP: 0000000000000000 R08: 0000000000000530 R09: 00007fffc2ea3268 [ 34.154795] R10: 0000000020000140 R11: 0000000000000246 R12: 00007fffc2ea30dc [ 34.162065] R13: 431bde82d7b634db R14: 00000000004af018 R15: 0000000000400488 executing program [ 34.172105] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 34.238197] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 34.298210] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 34.367956] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 34.447666] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 34.508739] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 34.568048] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 34.637746] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 34.697515] 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 [ 38.316593] net_ratelimit: 66 callbacks suppressed [ 38.316598] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 38.374606] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 38.435020] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 38.534422] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 38.604746] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 38.664850] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 38.723980] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 38.794056] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 38.853940] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 38.914058] 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 [ 43.352682] net_ratelimit: 85 callbacks suppressed [ 43.352686] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program