------------[ cut here ]------------ refcount_t: addition on 0; use-after-free. WARNING: CPU: 0 PID: 4580 at lib/refcount.c:25 refcount_warn_saturate+0xff/0x1a0 lib/refcount.c:25 Modules linked in: CPU: 0 PID: 4580 Comm: kworker/u4:30 Not tainted 6.1.141-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 a0 d2 be 8a e8 ad 30 45 fd 0f 0b eb e0 e8 f4 1d 79 fd c6 05 fa 72 e2 09 01 48 c7 c7 e0 d1 be 8a e8 91 30 45 fd <0f> 0b eb c4 e8 d8 1d 79 fd c6 05 df 72 e2 09 01 48 c7 c7 40 d2 be RSP: 0018:ffffc90000007688 EFLAGS: 00010246 RAX: b40616fe250d9300 RBX: 0000000000000002 RCX: ffff888054f19dc0 RDX: 0000000000000100 RSI: 0000000000000000 RDI: 0000000000000002 RBP: ffffc900000077e8 R08: dffffc0000000000 R09: fffff52000000e61 R10: fffff52000000e61 R11: 1ffff92000000e60 R12: ffff88805992b880 R13: dffffc0000000000 R14: 0000000000000002 R15: ffff888028bfdc48 FS: 0000000000000000(0000) GS:ffff8880b8e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000110c393189 CR3: 000000007aff7000 CR4: 00000000003526f0 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:257 [inline] tipc_aead_encrypt net/tipc/crypto.c:821 [inline] tipc_crypto_xmit+0x17a9/0x2300 net/tipc/crypto.c:1761 tipc_crypto_clone_msg+0x91/0x160 net/tipc/crypto.c:1656 tipc_crypto_xmit+0x1928/0x2300 net/tipc/crypto.c:1717 tipc_bearer_xmit_skb+0x242/0x3f0 net/tipc/bearer.c:574 tipc_disc_timeout+0x568/0x6b0 net/tipc/discover.c:338 call_timer_fn+0x1a0/0x670 kernel/time/timer.c:1504 expire_timers kernel/time/timer.c:1549 [inline] __run_timers+0x525/0x7c0 kernel/time/timer.c:1820 run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1833 handle_softirqs+0x2a1/0x920 kernel/softirq.c:596 __do_softirq kernel/softirq.c:630 [inline] invoke_softirq kernel/softirq.c:470 [inline] __irq_exit_rcu+0x12f/0x220 kernel/softirq.c:679 irq_exit_rcu+0x5/0x20 kernel/softirq.c:691 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1118 [inline] sysvec_apic_timer_interrupt+0xa0/0xc0 arch/x86/kernel/apic/apic.c:1118 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:691 RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0xa5/0x100 kernel/locking/spinlock.c:194 Code: 74 05 e8 ce 97 6d f7 48 c7 44 24 20 00 00 00 00 9c 8f 44 24 20 f6 44 24 21 02 75 4b f7 c3 00 02 00 00 74 01 fb bf 01 00 00 00 c6 13 3e f7 65 8b 05 97 d4 e8 75 85 c0 74 3c 48 c7 04 24 0e 36 RSP: 0018:ffffc90004baf4e0 EFLAGS: 00000206 RAX: b40616fe250d9300 RBX: 0000000000000a06 RCX: b40616fe250d9300 RDX: dffffc0000000000 RSI: ffffffff8a6bffe0 RDI: 0000000000000001 RBP: ffffc90004baf568 R08: dffffc0000000000 R09: fffffbfff2117066 R10: fffffbfff2117066 R11: 1ffffffff2117065 R12: dffffc0000000000 R13: dffffc0000000000 R14: ffff888063b427c0 R15: 1ffff92000975e9c try_to_wake_up+0x64c/0x1080 kernel/sched/core.c:4229 wake_up_process kernel/sched/core.c:4361 [inline] wake_up_q+0x78/0xc0 kernel/sched/core.c:1009 __mutex_unlock_slowpath+0x406/0x6a0 kernel/locking/mutex.c:951 __rtnl_unlock+0x64/0xe0 net/core/rtnetlink.c:133 netdev_run_todo+0x2b7/0xd80 net/core/dev.c:10469 nsim_destroy+0xb2/0x150 drivers/net/netdevsim/netdev.c:387 __nsim_dev_port_del+0x155/0x1c0 drivers/net/netdevsim/dev.c:1433 nsim_dev_port_del_all drivers/net/netdevsim/dev.c:1445 [inline] nsim_dev_reload_destroy+0x283/0x480 drivers/net/netdevsim/dev.c:1662 nsim_dev_reload_down+0x86/0xb0 drivers/net/netdevsim/dev.c:968 devlink_reload+0x1f1/0x660 net/devlink/leftover.c:4472 devlink_pernet_pre_exit+0x116/0x270 net/devlink/leftover.c:12501 ops_pre_exit_list net/core/net_namespace.c:162 [inline] cleanup_net+0x57b/0xb80 net/core/net_namespace.c:620 process_one_work+0x898/0x1160 kernel/workqueue.c:2292 worker_thread+0xaa2/0x1250 kernel/workqueue.c:2439 kthread+0x29d/0x330 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 ---------------- Code disassembly (best guess): 0: 74 05 je 0x7 2: e8 ce 97 6d f7 call 0xf76d97d5 7: 48 c7 44 24 20 00 00 movq $0x0,0x20(%rsp) e: 00 00 10: 9c pushf 11: 8f 44 24 20 pop 0x20(%rsp) 15: f6 44 24 21 02 testb $0x2,0x21(%rsp) 1a: 75 4b jne 0x67 1c: f7 c3 00 02 00 00 test $0x200,%ebx 22: 74 01 je 0x25 24: fb sti 25: bf 01 00 00 00 mov $0x1,%edi * 2a: e8 c6 13 3e f7 call 0xf73e13f5 <-- trapping instruction 2f: 65 8b 05 97 d4 e8 75 mov %gs:0x75e8d497(%rip),%eax # 0x75e8d4cd 36: 85 c0 test %eax,%eax 38: 74 3c je 0x76 3a: 48 rex.W 3b: c7 .byte 0xc7 3c: 04 24 add $0x24,%al 3e: 0e (bad) 3f: 36 ss