possible deadlock in xsk_diag_dump (3)

Status: upstream: reported on 2026/08/24 19:47
Subsystems: bpf net
Labels: prio:normal
[Documentation on labels]
Reported-by: syzbot+aa48b5fe7bfda62d1682@syzkaller.appspotmail.com
First crash: 6d07h, last: 3d02h
✨ AI Jobs (1)
ID Workflow Result Correct Bug Created Started Finished Revision
82cb29a2 assessment-security DenialOfService: ❌ Exploitable: ❌ FilesystemTrigger: ❌ NetworkTrigger: ❌ PeripheralTrigger: ❌ RemoteTrigger: ❌ Unprivileged: ❌ UserNamespace: ✅ VMGuestTrigger: ❌ VMHostTrigger: ❌ possible deadlock in xsk_diag_dump (3) 2026/08/24 01:01 2026/08/24 01:01 2026/08/24 01:56 1e72964b
Discussions (6)
Title Replies (including bot) Last reply
[PATCH net] ipvlan: unregister upper devices outside pnodes_lock 2 (2) 2026/08/27 16:27
[PATCH bpf-next v4] xsk: Fix circular locking dependency between &net->xdp.lock, &xs->mutex, and netdev_lock_ops 3 (3) 2026/08/26 18:45
[PATCH bpf-next v3] xsk: Fix circular locking dependency between &net->xdp.lock, &xs->mutex, and netdev_lock_ops 3 (3) 2026/08/26 17:49
[PATCH bpf-next v2] xsk: Fix circular locking dependency in xsk_notifier 3 (3) 2026/08/26 17:41
[PATCH bpf-next] xsk: Fix circular locking dependency in xsk_bind 5 (5) 2026/08/25 16:21
[syzbot] [bpf?] [net?] possible deadlock in xsk_diag_dump (3) 0 (1) 2026/08/24 19:47
Similar bugs (2)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in xsk_diag_dump (2) net bpf 4 1 389d 388d 29/29 fixed on 2025/10/09 01:15
upstream possible deadlock in xsk_diag_dump net bpf 4 4 500d 507d 28/29 fixed on 2025/06/10 16:19

Sample crash report:
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Tainted: G             L     
------------------------------------------------------
syz.1.1897/14306 is trying to acquire lock:
ffff88802a5f36b8 (&xs->mutex){+.+.}-{4:4}, at: xsk_diag_fill net/xdp/xsk_diag.c:113 [inline]
ffff88802a5f36b8 (&xs->mutex){+.+.}-{4:4}, at: xsk_diag_dump+0x52f/0x1560 net/xdp/xsk_diag.c:166

but task is already holding lock:
ffff88807f559fd0 (&net->xdp.lock){+.+.}-{4:4}, at: xsk_diag_dump+0x184/0x1560 net/xdp/xsk_diag.c:158

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #3 (&net->xdp.lock){+.+.}-{4:4}:
       __mutex_lock_common kernel/locking/mutex.c:646 [inline]
       __mutex_lock+0x19d/0x1550 kernel/locking/mutex.c:821
       xsk_notifier+0x89/0x230 net/xdp/xsk.c:2106
       notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
       call_netdevice_notifiers_extack net/core/dev.c:2313 [inline]
       call_netdevice_notifiers net/core/dev.c:2327 [inline]
       unregister_netdevice_many_notify+0x17f9/0x2140 net/core/dev.c:12518
       ipvlan_device_event+0xf1f/0xfb0 drivers/net/ipvlan/ipvlan_main.c:851
       notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
       call_netdevice_notifiers_extack net/core/dev.c:2313 [inline]
       call_netdevice_notifiers net/core/dev.c:2327 [inline]
       unregister_netdevice_many_notify+0x17f9/0x2140 net/core/dev.c:12518
       unregister_netdevice_many net/core/dev.c:12589 [inline]
       unregister_netdevice_queue+0x2f5/0x340 net/core/dev.c:12390
       unregister_netdevice include/linux/netdevice.h:3487 [inline]
       _cfg80211_unregister_wdev+0x156/0x5a0 net/wireless/core.c:1425
       ieee80211_if_remove+0x289/0x340 net/mac80211/iface.c:2432
       ieee80211_del_iface+0x19/0x30 net/mac80211/cfg.c:254
       rdev_del_virtual_intf net/wireless/rdev-ops.h:62 [inline]
       cfg80211_remove_virtual_intf+0x221/0x3f0 net/wireless/util.c:3057
       genl_family_rcv_msg_doit+0x233/0x340 net/netlink/genetlink.c:1114
       genl_family_rcv_msg net/netlink/genetlink.c:1194 [inline]
       genl_rcv_msg+0x614/0x7a0 net/netlink/genetlink.c:1209
       netlink_rcv_skb+0x226/0x4a0 net/netlink/af_netlink.c:2556
       genl_rcv+0x28/0x40 net/netlink/genetlink.c:1218
       netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
       netlink_unicast+0x7bd/0x940 net/netlink/af_netlink.c:1345
       netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1900
       sock_sendmsg_nosec+0x13a/0x180 net/socket.c:800
       __sock_sendmsg net/socket.c:815 [inline]
       ____sys_sendmsg+0x54e/0x850 net/socket.c:2713
       ___sys_sendmsg+0x2a5/0x360 net/socket.c:2767
       __sys_sendmsg net/socket.c:2799 [inline]
       __do_sys_sendmsg net/socket.c:2804 [inline]
       __se_sys_sendmsg net/socket.c:2802 [inline]
       __x64_sys_sendmsg+0x1b1/0x290 net/socket.c:2802
       do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
       do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #2 (&port->pnodes_lock){+.+.}-{4:4}:
       __mutex_lock_common kernel/locking/mutex.c:646 [inline]
       __mutex_lock+0x19d/0x1550 kernel/locking/mutex.c:821
       ipvlan_device_event+0x489/0xfb0 drivers/net/ipvlan/ipvlan_main.c:810
       notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
       call_netdevice_notifiers_extack net/core/dev.c:2313 [inline]
       call_netdevice_notifiers net/core/dev.c:2327 [inline]
       netdev_features_change net/core/dev.c:1612 [inline]
       netdev_change_features net/core/dev.c:11182 [inline]
       netdev_compute_master_upper_features+0x944/0xb30 net/core/dev.c:13069
       bond_slave_netdev_event drivers/net/bonding/bond_main.c:4045 [inline]
       bond_netdev_event+0x7a3/0xf80 drivers/net/bonding/bond_main.c:4090
       notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
       call_netdevice_notifiers_extack net/core/dev.c:2313 [inline]
       call_netdevice_notifiers net/core/dev.c:2327 [inline]
       netdev_features_change net/core/dev.c:1612 [inline]
       netdev_sync_lower_features net/core/dev.c:10945 [inline]
       __netdev_update_features+0xde7/0x1ef0 net/core/dev.c:11107
       netdev_change_features net/core/dev.c:11181 [inline]
       netdev_compute_master_upper_features+0x90c/0xb30 net/core/dev.c:13069
       __bond_release_one+0x9db/0x11c0 drivers/net/bonding/bond_main.c:2543
       bond_slave_netdev_event drivers/net/bonding/bond_main.c:3972 [inline]
       bond_netdev_event+0x54a/0xf80 drivers/net/bonding/bond_main.c:4090
       notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
       call_netdevice_notifiers_extack net/core/dev.c:2313 [inline]
       call_netdevice_notifiers net/core/dev.c:2327 [inline]
       unregister_netdevice_many_notify+0x17f9/0x2140 net/core/dev.c:12518
       rtnl_delete_link net/core/rtnetlink.c:3652 [inline]
       rtnl_dellink+0x5be/0x810 net/core/rtnetlink.c:3694
       rtnetlink_rcv_msg+0x802/0xc00 net/core/rtnetlink.c:7132
       netlink_rcv_skb+0x226/0x4a0 net/netlink/af_netlink.c:2556
       netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
       netlink_unicast+0x7bd/0x940 net/netlink/af_netlink.c:1345
       netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1900
       sock_sendmsg_nosec+0x13a/0x180 net/socket.c:800
       __sock_sendmsg net/socket.c:815 [inline]
       sock_write_iter+0x2de/0x3e0 net/socket.c:1266
       new_sync_write fs/read_write.c:595 [inline]
       vfs_write+0x612/0xba0 fs/read_write.c:687
       ksys_write+0x150/0x270 fs/read_write.c:739
       do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
       do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #1 (&dev_instance_lock_key#23){+.+.}-{4:4}:
       __mutex_lock_common kernel/locking/mutex.c:646 [inline]
       __mutex_lock+0x19d/0x1550 kernel/locking/mutex.c:821
       netdev_lock include/linux/netdevice.h:2861 [inline]
       netdev_lock_ops include/net/netdev_lock.h:42 [inline]
       xsk_bind+0x331/0x1380 net/xdp/xsk.c:1627
       __sys_bind_socket net/socket.c:1945 [inline]
       __sys_bind+0x2e3/0x410 net/socket.c:1976
       __do_sys_bind net/socket.c:1981 [inline]
       __se_sys_bind net/socket.c:1979 [inline]
       __x64_sys_bind+0x7a/0x90 net/socket.c:1979
       do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
       do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #0 (&xs->mutex){+.+.}-{4:4}:
       check_prev_add kernel/locking/lockdep.c:3181 [inline]
       check_prevs_add kernel/locking/lockdep.c:3300 [inline]
       validate_chain kernel/locking/lockdep.c:3924 [inline]
       __lock_acquire+0x1520/0x2cf0 kernel/locking/lockdep.c:5253
       lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5886
       __mutex_lock_common kernel/locking/mutex.c:646 [inline]
       __mutex_lock+0x19d/0x1550 kernel/locking/mutex.c:821
       xsk_diag_fill net/xdp/xsk_diag.c:113 [inline]
       xsk_diag_dump+0x52f/0x1560 net/xdp/xsk_diag.c:166
       netlink_dump+0x711/0xee0 net/netlink/af_netlink.c:2331
       __netlink_dump_start+0x589/0x7b0 net/netlink/af_netlink.c:2446
       netlink_dump_start include/linux/netlink.h:341 [inline]
       xsk_diag_handler_dump+0x1a0/0x250 net/xdp/xsk_diag.c:193
       sock_diag_rcv_msg+0x4b0/0x5f0 net/core/sock_diag.c:-1
       netlink_rcv_skb+0x226/0x4a0 net/netlink/af_netlink.c:2556
       netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
       netlink_unicast+0x7bd/0x940 net/netlink/af_netlink.c:1345
       netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1900
       sock_sendmsg_nosec+0x13a/0x180 net/socket.c:800
       __sock_sendmsg net/socket.c:815 [inline]
       sock_write_iter+0x2de/0x3e0 net/socket.c:1266
       do_iter_readv_writev+0x612/0x8c0 fs/read_write.c:-1
       vfs_writev+0x343/0x990 fs/read_write.c:1058
       do_writev+0x154/0x2e0 fs/read_write.c:1104
       do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
       do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

other info that might help us debug this:

Chain exists of:
  &xs->mutex --> &port->pnodes_lock --> &net->xdp.lock

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&net->xdp.lock);
                               lock(&port->pnodes_lock);
                               lock(&net->xdp.lock);
  lock(&xs->mutex);

 *** DEADLOCK ***

locks held by syz.1.1897/14306: 2, last CPU#0:
 #0: ffff88802a5f46e8 (nlk_cb_mutex-SOCK_DIAG){+.+.}-{4:4}, at: __netlink_dump_start+0xf4/0x7b0 net/netlink/af_netlink.c:2410
 #1: ffff88807f559fd0 (&net->xdp.lock){+.+.}-{4:4}, at: xsk_diag_dump+0x184/0x1560 net/xdp/xsk_diag.c:158

stack backtrace:
CPU: 0 UID: 0 PID: 14306 Comm: syz.1.1897 Tainted: G             L      syzkaller #0 PREEMPT(full) 
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 print_circular_bug+0x2e1/0x300 kernel/locking/lockdep.c:2059
 check_noncircular+0x12e/0x150 kernel/locking/lockdep.c:2191
 check_prev_add kernel/locking/lockdep.c:3181 [inline]
 check_prevs_add kernel/locking/lockdep.c:3300 [inline]
 validate_chain kernel/locking/lockdep.c:3924 [inline]
 __lock_acquire+0x1520/0x2cf0 kernel/locking/lockdep.c:5253
 lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5886
 __mutex_lock_common kernel/locking/mutex.c:646 [inline]
 __mutex_lock+0x19d/0x1550 kernel/locking/mutex.c:821
 xsk_diag_fill net/xdp/xsk_diag.c:113 [inline]
 xsk_diag_dump+0x52f/0x1560 net/xdp/xsk_diag.c:166
 netlink_dump+0x711/0xee0 net/netlink/af_netlink.c:2331
 __netlink_dump_start+0x589/0x7b0 net/netlink/af_netlink.c:2446
 netlink_dump_start include/linux/netlink.h:341 [inline]
 xsk_diag_handler_dump+0x1a0/0x250 net/xdp/xsk_diag.c:193
 sock_diag_rcv_msg+0x4b0/0x5f0 net/core/sock_diag.c:-1
 netlink_rcv_skb+0x226/0x4a0 net/netlink/af_netlink.c:2556
 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
 netlink_unicast+0x7bd/0x940 net/netlink/af_netlink.c:1345
 netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1900
 sock_sendmsg_nosec+0x13a/0x180 net/socket.c:800
 __sock_sendmsg net/socket.c:815 [inline]
 sock_write_iter+0x2de/0x3e0 net/socket.c:1266
 do_iter_readv_writev+0x612/0x8c0 fs/read_write.c:-1
 vfs_writev+0x343/0x990 fs/read_write.c:1058
 do_writev+0x154/0x2e0 fs/read_write.c:1104
 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
 do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fdcad59e0d9
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fdcae3e5028 EFLAGS: 00000246 ORIG_RAX: 0000000000000014
RAX: ffffffffffffffda RBX: 00007fdcad825fa0 RCX: 00007fdcad59e0d9
RDX: 0000000000000001 RSI: 0000200000000100 RDI: 0000000000000006
RBP: 00007fdcad635024 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fdcad826038 R14: 00007fdcad825fa0 R15: 00007fdcad94fa48
 </TASK>

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/08/25 10:48 upstream 66498c75b4f8 614e416a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in xsk_diag_dump
2026/08/24 22:03 upstream 0a0d1d55dad5 23caa175 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in xsk_diag_dump
2026/08/22 06:37 upstream 26260251022f 1e72964b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in xsk_diag_dump
2026/08/25 10:58 upstream 66498c75b4f8 614e416a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in xsk_diag_dump
2026/08/25 06:55 upstream 818bebeb63dd 614e416a .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in xsk_diag_dump
* Struck through repros no longer work on HEAD.