------------[ cut here ]------------
refcount_t: addition on 0; use-after-free.
WARNING: CPU: 0 PID: 5953 at lib/refcount.c:25 refcount_warn_saturate+0xff/0x1a0 lib/refcount.c:25
Modules linked in:
CPU: 0 PID: 5953 Comm: kworker/u4:12 Not tainted 5.15.185-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Workqueue: netns cleanup_net
RIP: 0010:refcount_warn_saturate+0xff/0x1a0 lib/refcount.c:25
Code: 09 01 48 c7 c7 40 6b 59 8a e8 dd 27 bb 05 0f 0b eb e0 e8 04 42 9c fd c6 05 ae 8f 79 09 01 48 c7 c7 80 6a 59 8a e8 c1 27 bb 05 <0f> 0b eb c4 e8 e8 41 9c fd c6 05 93 8f 79 09 01 48 c7 c7 e0 6a 59
RSP: 0018:ffffc900000076a8 EFLAGS: 00010246
RAX: f8b01a784e703900 RBX: 0000000000000002 RCX: ffff888020fe8000
RDX: 0000000000000100 RSI: 0000000000000101 RDI: 0000000000000000
RBP: ffffc90000007808 R08: dffffc0000000000 R09: ffffed1017204f24
R10: ffffed1017204f24 R11: 1ffff11017204f23 R12: ffff888057a24f80
R13: dffffc0000000000 R14: 0000000000000002 R15: 0000000000000000
FS: 0000000000000000(0000) GS:ffff8880b9000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f29e34b16c0 CR3: 00000000611d2000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
__refcount_add include/linux/refcount.h:-1 [inline]
__refcount_inc include/linux/refcount.h:250 [inline]
refcount_inc include/linux/refcount.h:267 [inline]
get_net include/net/net_namespace.h:252 [inline]
tipc_aead_encrypt net/tipc/crypto.c:832 [inline]
tipc_crypto_xmit+0x1949/0x2560 net/tipc/crypto.c:1772
tipc_crypto_clone_msg+0x91/0x160 net/tipc/crypto.c:1667
tipc_crypto_xmit+0x1ac5/0x2560 net/tipc/crypto.c:1728
tipc_bearer_xmit_skb+0x228/0x3c0 net/tipc/bearer.c:574
tipc_disc_timeout+0x568/0x6b0 net/tipc/discover.c:338
call_timer_fn+0x16c/0x530 kernel/time/timer.c:1451
expire_timers kernel/time/timer.c:1496 [inline]
__run_timers+0x525/0x7c0 kernel/time/timer.c:1767
run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1780
handle_softirqs+0x328/0x820 kernel/softirq.c:576
__do_softirq kernel/softirq.c:610 [inline]
invoke_softirq kernel/softirq.c:450 [inline]
__irq_exit_rcu+0x12f/0x220 kernel/softirq.c:659
irq_exit_rcu+0x5/0x20 kernel/softirq.c:671
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1108 [inline]
sysvec_apic_timer_interrupt+0xa0/0xc0 arch/x86/kernel/apic/apic.c:1108
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:676
RIP: 0010:console_unlock+0xd90/0x1200 kernel/printk/printk.c:2749
Code: 00 48 83 7c 24 28 00 75 19 e8 ec 9e 18 00 eb 18 e8 e5 9e 18 00 e8 80 49 42 08 48 83 7c 24 28 00 74 e7 e8 d3 9e 18 00 fb 31 ff <89> de e8 29 a2 18 00 85 db 0f 94 c0 22 44 24 17 3c 01 75 1f e8 b7
RSP: 0018:ffffc900033bec20 EFLAGS: 00000246
RAX: ffffffff815f234d RBX: 0000000000000000 RCX: ffff888020fe8000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc900033bee90 R08: dffffc0000000000 R09: fffffbfff1ff3619
R10: fffffbfff1ff3619 R11: 1ffffffff1ff3618 R12: 1ffffffff194c725
R13: dffffc0000000000 R14: 0000000000000000 R15: 1ffffffff194c71e
vprintk_emit+0xc0/0x150 kernel/printk/printk.c:2274
dev_vprintk_emit+0x2cc/0x350 drivers/base/core.c:4638
dev_printk_emit+0xdd/0x120 drivers/base/core.c:4649
__netdev_printk+0x2ef/0x3d0 net/core/dev.c:11504
netdev_info+0x107/0x150 net/core/dev.c:11559
nsim_udp_tunnel_unset_port+0x2d4/0x540 drivers/net/netdevsim/udp_tunnels.c:64
udp_tunnel_nic_device_sync_one net/ipv4/udp_tunnel_nic.c:-1 [inline]
udp_tunnel_nic_device_sync_by_port net/ipv4/udp_tunnel_nic.c:246 [inline]
__udp_tunnel_nic_device_sync+0x9d2/0x1320 net/ipv4/udp_tunnel_nic.c:289
udp_tunnel_nic_flush+0x4db/0x6f0 net/ipv4/udp_tunnel_nic.c:668
udp_tunnel_nic_unregister net/ipv4/udp_tunnel_nic.c:869 [inline]
udp_tunnel_nic_netdevice_event+0xc9a/0x13b0 net/ipv4/udp_tunnel_nic.c:909
notifier_call_chain kernel/notifier.c:83 [inline]
raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:391
call_netdevice_notifiers_extack net/core/dev.c:2061 [inline]
call_netdevice_notifiers net/core/dev.c:2075 [inline]
unregister_netdevice_many+0xf57/0x18f0 net/core/dev.c:11134
unregister_netdevice_queue+0x31c/0x360 net/core/dev.c:11067
unregister_netdevice include/linux/netdevice.h:3020 [inline]
nsim_destroy+0x49/0x150 drivers/net/netdevsim/netdev.c:382
__nsim_dev_port_del+0x155/0x1c0 drivers/net/netdevsim/dev.c:1349
nsim_dev_port_del_all drivers/net/netdevsim/dev.c:1362 [inline]
nsim_dev_reload_destroy+0x16c/0x240 drivers/net/netdevsim/dev.c:1561
nsim_dev_reload_down+0xf9/0x160 drivers/net/netdevsim/dev.c:883
devlink_reload+0x265/0x770 net/core/devlink.c:3963
devlink_pernet_pre_exit+0x19d/0x300 net/core/devlink.c:11543
ops_pre_exit_list net/core/net_namespace.c:162 [inline]
cleanup_net+0x57b/0xb80 net/core/net_namespace.c:615
process_one_work+0x863/0x1000 kernel/workqueue.c:2310
worker_thread+0xaa8/0x12a0 kernel/workqueue.c:2457
kthread+0x436/0x520 kernel/kthread.c:334
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
----------------
Code disassembly (best guess):
0: 00 48 83 add %cl,-0x7d(%rax)
3: 7c 24 jl 0x29
5: 28 00 sub %al,(%rax)
7: 75 19 jne 0x22
9: e8 ec 9e 18 00 call 0x189efa
e: eb 18 jmp 0x28
10: e8 e5 9e 18 00 call 0x189efa
15: e8 80 49 42 08 call 0x842499a
1a: 48 83 7c 24 28 00 cmpq $0x0,0x28(%rsp)
20: 74 e7 je 0x9
22: e8 d3 9e 18 00 call 0x189efa
27: fb sti
28: 31 ff xor %edi,%edi
* 2a: 89 de mov %ebx,%esi <-- trapping instruction
2c: e8 29 a2 18 00 call 0x18a25a
31: 85 db test %ebx,%ebx
33: 0f 94 c0 sete %al
36: 22 44 24 17 and 0x17(%rsp),%al
3a: 3c 01 cmp $0x1,%al
3c: 75 1f jne 0x5d
3e: e8 .byte 0xe8
3f: b7 .byte 0xb7