------------[ cut here ]------------ refcount_t: addition on 0; use-after-free. WARNING: CPU: 0 PID: 59 at lib/refcount.c:25 refcount_warn_saturate+0xfa/0x1d0 lib/refcount.c:25 Modules linked in: CPU: 0 UID: 0 PID: 59 Comm: kworker/u8:4 Not tainted 6.15.0-syzkaller-11802-g1af80d00e1e0 #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Workqueue: netns cleanup_net RIP: 0010:refcount_warn_saturate+0xfa/0x1d0 lib/refcount.c:25 Code: 00 00 e8 a9 76 00 fd 5b 41 5e e9 3c 5b 50 fc cc e8 9b 76 00 fd c6 05 9a 09 cb 0a 01 90 48 c7 c7 c0 27 e2 8b e8 37 24 c4 fc 90 <0f> 0b 90 90 eb d7 e8 7b 76 00 fd c6 05 7b 09 cb 0a 01 90 48 c7 c7 RSP: 0018:ffffc90000007828 EFLAGS: 00010246 RAX: d3c63ba06e2e0e00 RBX: 0000000000000002 RCX: ffff8880212a5a00 RDX: 0000000000000100 RSI: 0000000000000000 RDI: 0000000000000002 RBP: ffffc900000079b0 R08: 0000000000000003 R09: 0000000000000004 R10: dffffc0000000000 R11: fffffbfff1bfaa44 R12: ffff888077458000 R13: dffffc0000000000 R14: ffff88807745816c R15: ffff888055efcc00 FS: 0000000000000000(0000) GS:ffff888125c5c000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f07e5a80fe0 CR3: 0000000075612000 CR4: 0000000000350ef0 Call Trace: __refcount_add include/linux/refcount.h:-1 [inline] __refcount_inc include/linux/refcount.h:366 [inline] refcount_inc include/linux/refcount.h:383 [inline] get_net include/net/net_namespace.h:268 [inline] tipc_aead_encrypt net/tipc/crypto.c:821 [inline] tipc_crypto_xmit+0x1820/0x22c0 net/tipc/crypto.c:1761 tipc_bearer_xmit_skb+0x245/0x400 net/tipc/bearer.c:572 tipc_disc_timeout+0x580/0x6d0 net/tipc/discover.c:338 call_timer_fn+0x17e/0x5f0 kernel/time/timer.c:1747 expire_timers kernel/time/timer.c:1798 [inline] __run_timers kernel/time/timer.c:2372 [inline] __run_timer_base+0x61a/0x860 kernel/time/timer.c:2384 run_timer_base kernel/time/timer.c:2393 [inline] run_timer_softirq+0xb7/0x180 kernel/time/timer.c:2403 handle_softirqs+0x286/0x870 kernel/softirq.c:579 __do_softirq kernel/softirq.c:613 [inline] invoke_softirq kernel/softirq.c:453 [inline] __irq_exit_rcu+0xca/0x1f0 kernel/softirq.c:680 irq_exit_rcu+0x9/0x30 kernel/softirq.c:696 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1050 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1050 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:finish_task_switch+0x26b/0x950 kernel/sched/core.c:5264 Code: 0f 84 3c 01 00 00 48 85 db 0f 85 63 01 00 00 0f 1f 44 00 00 4c 8b 75 d0 4c 89 e7 e8 1f 4c d5 09 e8 3a f9 35 00 fb 4c 8b 65 c0 <49> 8d bc 24 18 16 00 00 48 89 f8 48 c1 e8 03 42 0f b6 04 28 84 c0 RSP: 0018:ffffc9000210e638 EFLAGS: 00000282 RAX: d3c63ba06e2e0e00 RBX: 0000000000000000 RCX: d3c63ba06e2e0e00 RDX: 0000000000000006 RSI: ffffffff8d979f2e RDI: ffffffff8be27240 RBP: ffffc9000210e690 R08: ffffffff8fa0f5f7 R09: 1ffffffff1f41ebe R10: dffffc0000000000 R11: fffffbfff1f41ebf R12: ffff8880212a5a00 R13: dffffc0000000000 R14: ffff88802f0d1e00 R15: ffff8880b863c4d8 context_switch kernel/sched/core.c:5399 [inline] __schedule+0x16fd/0x4d00 kernel/sched/core.c:6785 preempt_schedule_irq+0xb5/0x150 kernel/sched/core.c:7108 irqentry_exit+0x6f/0x90 kernel/entry/common.c:307 asm_sysvec_reschedule_ipi+0x1a/0x20 arch/x86/include/asm/idtentry.h:707 RIP: 0010:lock_acquire+0x175/0x360 kernel/locking/lockdep.c:5875 Code: 00 00 00 00 9c 8f 44 24 30 f7 44 24 30 00 02 00 00 0f 85 cd 00 00 00 f7 44 24 08 00 02 00 00 74 01 fb 65 48 8b 05 1b 0a fe 10 <48> 3b 44 24 58 0f 85 f2 00 00 00 48 83 c4 60 5b 41 5c 41 5d 41 5e RSP: 0018:ffffc9000210ea38 EFLAGS: 00000206 RAX: d3c63ba06e2e0e00 RBX: 0000000000000000 RCX: d3c63ba06e2e0e00 RDX: 0000000000000000 RSI: ffffffff8db66a62 RDI: ffffffff8be27240 RBP: ffffffff81729e15 R08: 0000000000000000 R09: ffffffff81729e15 R10: dffffc0000000000 R11: ffffffff81acf710 R12: 0000000000000002 R13: ffffffff8e13f060 R14: 0000000000000000 R15: 0000000000000246 rcu_lock_acquire include/linux/rcupdate.h:331 [inline] rcu_read_lock include/linux/rcupdate.h:841 [inline] class_rcu_constructor include/linux/rcupdate.h:1155 [inline] unwind_next_frame+0xc2/0x2390 arch/x86/kernel/unwind_orc.c:479 arch_stack_walk+0x11c/0x150 arch/x86/kernel/stacktrace.c:25 stack_trace_save+0x9c/0xe0 kernel/stacktrace.c:122 kasan_save_stack+0x3e/0x60 mm/kasan/common.c:47 kasan_record_aux_stack+0xbd/0xd0 mm/kasan/generic.c:548 __call_rcu_common kernel/rcu/tree.c:3090 [inline] call_rcu+0x142/0x990 kernel/rcu/tree.c:3210 kernfs_put+0x19e/0x480 fs/kernfs/dir.c:591 kernfs_remove_by_name_ns+0xb7/0x130 fs/kernfs/dir.c:1718 kernfs_remove_by_name include/linux/kernfs.h:633 [inline] remove_files fs/sysfs/group.c:28 [inline] sysfs_remove_group+0xfc/0x2c0 fs/sysfs/group.c:322 sysfs_remove_groups+0x54/0xb0 fs/sysfs/group.c:346 device_remove_groups drivers/base/core.c:2846 [inline] device_remove_attrs+0x1aa/0x260 drivers/base/core.c:2976 device_del+0x509/0x8e0 drivers/base/core.c:3880 unregister_netdevice_many_notify+0x1d52/0x2320 net/core/dev.c:12111 unregister_netdevice_many net/core/dev.c:12139 [inline] unregister_netdevice_queue+0x33c/0x380 net/core/dev.c:11983 unregister_netdevice include/linux/netdevice.h:3379 [inline] nsim_destroy+0x1f6/0x670 drivers/net/netdevsim/netdev.c:1068 __nsim_dev_port_del+0x14d/0x1b0 drivers/net/netdevsim/dev.c:1428 nsim_dev_port_del_all drivers/net/netdevsim/dev.c:1440 [inline] nsim_dev_reload_destroy+0x288/0x490 drivers/net/netdevsim/dev.c:1661 nsim_dev_reload_down+0x8a/0xc0 drivers/net/netdevsim/dev.c:968 devlink_reload+0x1b6/0x8d0 net/devlink/dev.c:461 devlink_pernet_pre_exit+0x1d9/0x3d0 net/devlink/core.c:509 ops_pre_exit_list net/core/net_namespace.c:162 [inline] ops_undo_list+0x187/0x990 net/core/net_namespace.c:235 cleanup_net+0x4c5/0x800 net/core/net_namespace.c:686 process_one_work kernel/workqueue.c:3238 [inline] process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3321 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3402 kthread+0x711/0x8a0 kernel/kthread.c:464 ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 ---------------- Code disassembly (best guess): 0: 0f 84 3c 01 00 00 je 0x142 6: 48 85 db test %rbx,%rbx 9: 0f 85 63 01 00 00 jne 0x172 f: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 14: 4c 8b 75 d0 mov -0x30(%rbp),%r14 18: 4c 89 e7 mov %r12,%rdi 1b: e8 1f 4c d5 09 call 0x9d54c3f 20: e8 3a f9 35 00 call 0x35f95f 25: fb sti 26: 4c 8b 65 c0 mov -0x40(%rbp),%r12 * 2a: 49 8d bc 24 18 16 00 lea 0x1618(%r12),%rdi <-- trapping instruction 31: 00 32: 48 89 f8 mov %rdi,%rax 35: 48 c1 e8 03 shr $0x3,%rax 39: 42 0f b6 04 28 movzbl (%rax,%r13,1),%eax 3e: 84 c0 test %al,%al