[BUG] KASAN: slab-use-after-free Read in udp_tunnel_nic_device_sync_work

From: Jie Zhu

Date: Sun Jun 07 2026 - 22:06:18 EST


Hi,

While running a syzkaller fuzzing campaign against Linux mainline I hit
the following crash. I checked syzbot upstream (open / moderation / fixed,
snapshot 2026-06-06) and could not find a matching entry, so I am reporting
it here.

Happy to test patches, share the full .config / console log, or send the
full reproducer. Please let me know what would be most useful.

Thanks,
Jie Zhu

Build / environment:

Tree: Linus mainline
HEAD: f5e5d3509bffb95c6648eb9795f7f236852ae62d
(Linus mainline @ f5e5d3509bff (Merge tag
spi-fix-v7.1-rc5, 2026-05-29))
Arch: x86_64
Compiler: gcc 12+ (Debian)
Userspace: Debian bullseye (syzkaller image)
VM: QEMU 8.2, 2 vCPU, 4 GB RAM, KVM acceleration

The kernel .config and the full kernel console log are large, so they are
not inlined here per Documentation/admin-guide/reporting-issues.rst. I will
send them in a follow-up reply, or can paste them to a public service if
preferred.

Crash report (symbolicated):

==================================================================
BUG: KASAN: slab-use-after-free in __mutex_lock_common
kernel/locking/mutex.c:625 [inline]
BUG: KASAN: slab-use-after-free in __mutex_lock+0x135/0x1270
kernel/locking/mutex.c:820
Read of size 8 at addr ffff88807c67dca8 by task kworker/u8:7/2595

CPU: 1 UID: 0 PID: 2595 Comm: kworker/u8:7 Not tainted
7.0.0-g27d128c1cff6 #5 PREEMPT(full)
Hardware name: QEMU Ubuntu 24.04 PC v2 (i440FX + PIIX, arch_caps fix,
1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Workqueue: udp_tunnel_nic udp_tunnel_nic_device_sync_work
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x10e/0x1f0 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0xf7/0x600 mm/kasan/report.c:482
kasan_report+0xe4/0x120 mm/kasan/report.c:595
__mutex_lock_common kernel/locking/mutex.c:625 [inline]
__mutex_lock+0x135/0x1270 kernel/locking/mutex.c:820
udp_tunnel_nic_device_sync_work+0x34/0x610 net/ipv4/udp_tunnel_nic.c:737
process_one_work+0x62b/0xfd0 kernel/workqueue.c:3302
process_scheduled_works kernel/workqueue.c:3385 [inline]
worker_thread+0x3fd/0x7e0 kernel/workqueue.c:3466
kthread+0x221/0x280 kernel/kthread.c:436
ret_from_fork+0x899/0x9b0 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
</TASK>

Allocated by task 20160:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:57
kasan_save_track+0x14/0x30 mm/kasan/common.c:78
poison_kmalloc_redzone mm/kasan/common.c:398 [inline]
__kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:415
kasan_kmalloc include/linux/kasan.h:263 [inline]
__do_kmalloc_node mm/slub.c:5295 [inline]
__kmalloc_noprof+0x319/0x820 mm/slub.c:5307
kmalloc_noprof include/linux/slab.h:954 [inline]
kzalloc_noprof include/linux/slab.h:1188 [inline]
udp_tunnel_nic_alloc net/ipv4/udp_tunnel_nic.c:756 [inline]
udp_tunnel_nic_register net/ipv4/udp_tunnel_nic.c:833 [inline]
udp_tunnel_nic_netdevice_event+0xb59/0xf90 net/ipv4/udp_tunnel_nic.c:931
notifier_call_chain+0x77/0x330 kernel/notifier.c:85
call_netdevice_notifiers_info+0x95/0xd0 net/core/dev.c:2249
call_netdevice_notifiers_extack net/core/dev.c:2287 [inline]
call_netdevice_notifiers net/core/dev.c:2301 [inline]
register_netdevice+0x12f2/0x16c0 net/core/dev.c:11458
nsim_init_netdevsim drivers/net/netdevsim/netdev.c:1069 [inline]
nsim_create+0x7f3/0xab0 drivers/net/netdevsim/netdev.c:1151
__nsim_dev_port_add+0x39a/0x600 drivers/net/netdevsim/dev.c:1509
nsim_dev_port_add_all drivers/net/netdevsim/dev.c:1570 [inline]
nsim_dev_reload_create drivers/net/netdevsim/dev.c:1622 [inline]
nsim_dev_reload_up+0x434/0x560 drivers/net/netdevsim/dev.c:1058
devlink_reload+0x25b/0x550 net/devlink/dev.c:475
devlink_nl_reload_doit+0x92a/0xb10 net/devlink/dev.c:585
genl_family_rcv_msg_doit+0x198/0x230 net/netlink/genetlink.c:1114
genl_family_rcv_msg net/netlink/genetlink.c:1194 [inline]
genl_rcv_msg+0x404/0x570 net/netlink/genetlink.c:1209
netlink_rcv_skb+0x108/0x2b0 net/netlink/af_netlink.c:2550
genl_rcv+0x28/0x40 net/netlink/genetlink.c:1218
netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
netlink_unicast+0x44c/0x5c0 net/netlink/af_netlink.c:1344
netlink_sendmsg+0x493/0x8c0 net/netlink/af_netlink.c:1894
sock_sendmsg_nosec net/socket.c:787 [inline]
__sock_sendmsg net/socket.c:802 [inline]
____sys_sendmsg+0x722/0x750 net/socket.c:2698
___sys_sendmsg+0x129/0x1b0 net/socket.c:2752
__sys_sendmsg+0x141/0x1e0 net/socket.c:2784
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x116/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f

Freed by task 20169:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:57
kasan_save_track+0x14/0x30 mm/kasan/common.c:78
kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:584
poison_slab_object mm/kasan/common.c:253 [inline]
__kasan_slab_free+0x5f/0x80 mm/kasan/common.c:285
kasan_slab_free include/linux/kasan.h:235 [inline]
slab_free_hook mm/slub.c:2689 [inline]
slab_free mm/slub.c:6246 [inline]
kfree+0x2e3/0x6c0 mm/slub.c:6561
udp_tunnel_nic_free net/ipv4/udp_tunnel_nic.c:785 [inline]
udp_tunnel_nic_unregister net/ipv4/udp_tunnel_nic.c:910 [inline]
udp_tunnel_nic_netdevice_event+0x7dd/0xf90 net/ipv4/udp_tunnel_nic.c:942
notifier_call_chain+0x77/0x330 kernel/notifier.c:85
call_netdevice_notifiers_info+0x95/0xd0 net/core/dev.c:2249
call_netdevice_notifiers_extack net/core/dev.c:2287 [inline]
call_netdevice_notifiers net/core/dev.c:2301 [inline]
unregister_netdevice_many_notify+0xd97/0x1790 net/core/dev.c:12418
unregister_netdevice_many net/core/dev.c:12481 [inline]
unregister_netdevice_queue net/core/dev.c:12291 [inline]
unregister_netdevice_queue+0x226/0x260 net/core/dev.c:12281
unregister_netdevice include/linux/netdevice.h:3444 [inline]
nsim_destroy+0x12b/0x540 drivers/net/netdevsim/netdev.c:1192
__nsim_dev_port_del+0xdb/0x150 drivers/net/netdevsim/dev.c:1547
nsim_dev_port_del_all drivers/net/netdevsim/dev.c:1561 [inline]
nsim_dev_reload_destroy+0xc5/0x260 drivers/net/netdevsim/dev.c:1785
nsim_dev_reload_down+0x50/0xa0 drivers/net/netdevsim/dev.c:1038
devlink_reload+0x156/0x550 net/devlink/dev.c:462
devlink_nl_reload_doit+0x92a/0xb10 net/devlink/dev.c:585
genl_family_rcv_msg_doit+0x198/0x230 net/netlink/genetlink.c:1114
genl_family_rcv_msg net/netlink/genetlink.c:1194 [inline]
genl_rcv_msg+0x404/0x570 net/netlink/genetlink.c:1209
netlink_rcv_skb+0x108/0x2b0 net/netlink/af_netlink.c:2550
genl_rcv+0x28/0x40 net/netlink/genetlink.c:1218
netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
netlink_unicast+0x44c/0x5c0 net/netlink/af_netlink.c:1344
netlink_sendmsg+0x493/0x8c0 net/netlink/af_netlink.c:1894
sock_sendmsg_nosec net/socket.c:787 [inline]
__sock_sendmsg net/socket.c:802 [inline]
____sys_sendmsg+0x722/0x750 net/socket.c:2698
___sys_sendmsg+0x129/0x1b0 net/socket.c:2752
__sys_sendmsg+0x141/0x1e0 net/socket.c:2784
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x116/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f

Last potentially related work creation:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:57
kasan_record_aux_stack+0xa7/0xc0 mm/kasan/generic.c:556
insert_work+0x36/0x140 kernel/workqueue.c:2226
__queue_work+0x2d7/0xc40 kernel/workqueue.c:2385
queue_work_on+0x185/0x1e0 kernel/workqueue.c:2432
queue_work include/linux/workqueue.h:696 [inline]
udp_tunnel_nic_device_sync net/ipv4/udp_tunnel_nic.c:307 [inline]
udp_tunnel_nic_device_sync net/ipv4/udp_tunnel_nic.c:302 [inline]
__udp_tunnel_nic_add_port+0x495/0x7a0 net/ipv4/udp_tunnel_nic.c:523
udp_tunnel_nic_add_port include/net/udp_tunnel.h:402 [inline]
udp_tunnel_nic_add_port include/net/udp_tunnel.h:397 [inline]
udp_tunnel_push_rx_port+0x11e/0x160 net/ipv4/udp_tunnel_core.c:112
geneve_offload_rx_ports+0x89/0x110 drivers/net/geneve.c:1657
geneve_netdevice_event+0x68/0xa0 drivers/net/geneve.c:2421
notifier_call_chain+0x77/0x330 kernel/notifier.c:85
call_netdevice_notifiers_info+0x95/0xd0 net/core/dev.c:2249
call_netdevice_notifiers_extack net/core/dev.c:2287 [inline]
call_netdevice_notifiers+0x7c/0xb0 net/core/dev.c:2301
udp_tunnel_get_rx_info include/net/udp_tunnel.h:469 [inline]
udp_tunnel_get_rx_info include/net/udp_tunnel.h:463 [inline]
udp_tunnel_nic_netdevice_event+0x473/0xf90 net/ipv4/udp_tunnel_nic.c:953
notifier_call_chain+0x77/0x330 kernel/notifier.c:85
call_netdevice_notifiers_info+0x95/0xd0 net/core/dev.c:2249
call_netdevice_notifiers_extack net/core/dev.c:2287 [inline]
call_netdevice_notifiers net/core/dev.c:2301 [inline]
register_netdevice+0x12f2/0x16c0 net/core/dev.c:11458
nsim_init_netdevsim drivers/net/netdevsim/netdev.c:1069 [inline]
nsim_create+0x7f3/0xab0 drivers/net/netdevsim/netdev.c:1151
__nsim_dev_port_add+0x39a/0x600 drivers/net/netdevsim/dev.c:1509
nsim_dev_port_add_all drivers/net/netdevsim/dev.c:1570 [inline]
nsim_dev_reload_create drivers/net/netdevsim/dev.c:1622 [inline]
nsim_dev_reload_up+0x434/0x560 drivers/net/netdevsim/dev.c:1058
devlink_reload+0x25b/0x550 net/devlink/dev.c:475
devlink_nl_reload_doit+0x92a/0xb10 net/devlink/dev.c:585
genl_family_rcv_msg_doit+0x198/0x230 net/netlink/genetlink.c:1114
genl_family_rcv_msg net/netlink/genetlink.c:1194 [inline]
genl_rcv_msg+0x404/0x570 net/netlink/genetlink.c:1209
netlink_rcv_skb+0x108/0x2b0 net/netlink/af_netlink.c:2550
genl_rcv+0x28/0x40 net/netlink/genetlink.c:1218
netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
netlink_unicast+0x44c/0x5c0 net/netlink/af_netlink.c:1344
netlink_sendmsg+0x493/0x8c0 net/netlink/af_netlink.c:1894
sock_sendmsg_nosec net/socket.c:787 [inline]
__sock_sendmsg net/socket.c:802 [inline]
____sys_sendmsg+0x722/0x750 net/socket.c:2698
___sys_sendmsg+0x129/0x1b0 net/socket.c:2752
__sys_sendmsg+0x141/0x1e0 net/socket.c:2784
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x116/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f

Second to last potentially related work creation:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:57
kasan_record_aux_stack+0xa7/0xc0 mm/kasan/generic.c:556
insert_work+0x36/0x140 kernel/workqueue.c:2226
__queue_work+0x782/0xc40 kernel/workqueue.c:2381
queue_work_on+0x185/0x1e0 kernel/workqueue.c:2432
queue_work include/linux/workqueue.h:696 [inline]
udp_tunnel_nic_device_sync net/ipv4/udp_tunnel_nic.c:307 [inline]
udp_tunnel_nic_device_sync net/ipv4/udp_tunnel_nic.c:302 [inline]
__udp_tunnel_nic_add_port+0x495/0x7a0 net/ipv4/udp_tunnel_nic.c:523
udp_tunnel_nic_add_port include/net/udp_tunnel.h:402 [inline]
udp_tunnel_nic_add_port include/net/udp_tunnel.h:397 [inline]
udp_tunnel_push_rx_port+0x11e/0x160 net/ipv4/udp_tunnel_core.c:112
geneve_offload_rx_ports+0x89/0x110 drivers/net/geneve.c:1657
geneve_netdevice_event+0x68/0xa0 drivers/net/geneve.c:2421
notifier_call_chain+0x77/0x330 kernel/notifier.c:85
call_netdevice_notifiers_info+0x95/0xd0 net/core/dev.c:2249
call_netdevice_notifiers_extack net/core/dev.c:2287 [inline]
call_netdevice_notifiers+0x7c/0xb0 net/core/dev.c:2301
udp_tunnel_get_rx_info include/net/udp_tunnel.h:469 [inline]
udp_tunnel_get_rx_info include/net/udp_tunnel.h:463 [inline]
udp_tunnel_nic_netdevice_event+0x473/0xf90 net/ipv4/udp_tunnel_nic.c:953
notifier_call_chain+0x77/0x330 kernel/notifier.c:85
call_netdevice_notifiers_info+0x95/0xd0 net/core/dev.c:2249
call_netdevice_notifiers_extack net/core/dev.c:2287 [inline]
call_netdevice_notifiers net/core/dev.c:2301 [inline]
register_netdevice+0x12f2/0x16c0 net/core/dev.c:11458
nsim_init_netdevsim drivers/net/netdevsim/netdev.c:1069 [inline]
nsim_create+0x7f3/0xab0 drivers/net/netdevsim/netdev.c:1151
__nsim_dev_port_add+0x39a/0x600 drivers/net/netdevsim/dev.c:1509
nsim_dev_port_add_all drivers/net/netdevsim/dev.c:1570 [inline]
nsim_dev_reload_create drivers/net/netdevsim/dev.c:1622 [inline]
nsim_dev_reload_up+0x434/0x560 drivers/net/netdevsim/dev.c:1058
devlink_reload+0x25b/0x550 net/devlink/dev.c:475
devlink_nl_reload_doit+0x92a/0xb10 net/devlink/dev.c:585
genl_family_rcv_msg_doit+0x198/0x230 net/netlink/genetlink.c:1114
genl_family_rcv_msg net/netlink/genetlink.c:1194 [inline]
genl_rcv_msg+0x404/0x570 net/netlink/genetlink.c:1209
netlink_rcv_skb+0x108/0x2b0 net/netlink/af_netlink.c:2550
genl_rcv+0x28/0x40 net/netlink/genetlink.c:1218
netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
netlink_unicast+0x44c/0x5c0 net/netlink/af_netlink.c:1344
netlink_sendmsg+0x493/0x8c0 net/netlink/af_netlink.c:1894
sock_sendmsg_nosec net/socket.c:787 [inline]
__sock_sendmsg net/socket.c:802 [inline]
____sys_sendmsg+0x722/0x750 net/socket.c:2698
___sys_sendmsg+0x129/0x1b0 net/socket.c:2752
__sys_sendmsg+0x141/0x1e0 net/socket.c:2784
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x116/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f

The buggy address belongs to the object at ffff88807c67dc00
which belongs to the cache kmalloc-256 of size 256
The buggy address is located 168 bytes inside of
freed 256-byte region [ffff88807c67dc00, ffff88807c67dd00)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7c67c
head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000040 ffff888100041b40 dead000000000100 dead000000000122
raw: 0000000000000000 0000000800100010 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff888100041b40 dead000000000100 dead000000000122
head: 0000000000000000 0000000800100010 00000000f5000000 0000000000000000
head: 00fff00000000001 ffffffffffffff81 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 1, migratetype Unmovable, gfp_mask
0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC),
pid 8813, tgid 8813 (syz-executor), ts 245934632606, free_ts
245872820688
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x110/0x130 mm/page_alloc.c:1858
prep_new_page mm/page_alloc.c:1866 [inline]
get_page_from_freelist+0x589/0x1cd0 mm/page_alloc.c:3946
__alloc_frozen_pages_noprof+0x221/0x1cd0 mm/page_alloc.c:5226
alloc_slab_page mm/slub.c:3278 [inline]
allocate_slab mm/slub.c:3467 [inline]
new_slab+0xa6/0x670 mm/slub.c:3525
refill_objects+0x278/0x420 mm/slub.c:7251
refill_sheaf mm/slub.c:2816 [inline]
__pcs_replace_empty_main+0x2ed/0x640 mm/slub.c:4651
alloc_from_pcs mm/slub.c:4749 [inline]
slab_alloc_node mm/slub.c:4883 [inline]
__kmalloc_cache_noprof+0x576/0x6e0 mm/slub.c:5410
kmalloc_noprof include/linux/slab.h:950 [inline]
tc_action_net_init include/net/act_api.h:163 [inline]
ct_init_net+0xf6/0x380 net/sched/act_ct.c:1654
ops_init+0x12c/0x3b0 net/core/net_namespace.c:137
setup_net+0xf7/0x290 net/core/net_namespace.c:446
copy_net_ns+0x3a4/0x5d0 net/core/net_namespace.c:579
create_new_namespaces+0x26e/0x5b0 kernel/nsproxy.c:132
unshare_nsproxy_namespaces+0xdc/0x180 kernel/nsproxy.c:234
ksys_unshare+0x3c2/0x8c0 kernel/fork.c:3245
__do_sys_unshare kernel/fork.c:3319 [inline]
__se_sys_unshare kernel/fork.c:3317 [inline]
__x64_sys_unshare+0x1f/0x30 kernel/fork.c:3317
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x116/0xf80 arch/x86/entry/syscall_64.c:94
page last free pid 4503 tgid 4503 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
__free_pages_prepare mm/page_alloc.c:1402 [inline]
__free_frozen_pages+0x4f8/0x930 mm/page_alloc.c:2943
rcu_do_batch kernel/rcu/tree.c:2617 [inline]
rcu_core+0x454/0xb20 kernel/rcu/tree.c:2869
handle_softirqs+0x168/0x760 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0x10c/0x190 kernel/softirq.c:735
irq_exit_rcu+0x9/0x30 kernel/softirq.c:752
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1061 [inline]
sysvec_apic_timer_interrupt+0xa3/0xc0 arch/x86/kernel/apic/apic.c:1061
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697

Memory state around the buggy address:
ffff88807c67db80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88807c67dc00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88807c67dc80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88807c67dd00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88807c67dd80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
netdevsim netdevsim1 eth3: set [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim1 eth1: set [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim1 eth2: set [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim0 eth1: set [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim2 eth1: set [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim1 eth0: set [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim1 eth1: set [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim1 eth2: set [1, 0] type 2 family 0 port 6081 - 0

I do not have a C reproducer for this one. A syzkaller program is
available; happy to send it on request.