------------[ cut here ]------------
refcount_t: addition on 0; use-after-free.
WARNING: CPU: 0 PID: 4527 at lib/refcount.c:25 refcount_warn_saturate+0xff/0x1a0 lib/refcount.c:25
Modules linked in:
CPU: 0 PID: 4527 Comm: syz.3.84 Not tainted 5.15.185-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
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:ffffc90000007848 EFLAGS: 00010246
RAX: 29f8084951f26f00 RBX: 0000000000000002 RCX: ffff888029319dc0
RDX: 0000000000000100 RSI: 0000000000000101 RDI: 0000000000000000
RBP: ffffc900000079b0 R08: dffffc0000000000 R09: fffff52000000e6d
R10: fffff52000000e6d R11: 1ffff92000000e6c R12: ffff888078d70000
R13: dffffc0000000000 R14: 0000000000000002 R15: 0000000000000000
FS: 00007f0134ec76c0(0000) GS:ffff8880b9000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f1e55466286 CR3: 000000007d5be000 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_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:arch_atomic64_read arch/x86/include/asm/atomic64_64.h:22 [inline]
RIP: 0010:arch_atomic_long_read include/linux/atomic/atomic-long.h:29 [inline]
RIP: 0010:atomic_long_read include/linux/atomic/atomic-instrumented.h:1184 [inline]
RIP: 0010:__mutex_owner kernel/locking/mutex.c:78 [inline]
RIP: 0010:mutex_spin_on_owner+0x295/0x380 kernel/locking/mutex.c:352
Code: 4c 89 ef e8 1d 11 62 00 49 f7 45 00 01 00 00 00 0f 85 8b 00 00 00 f3 90 4c 89 ef be 08 00 00 00 e8 90 12 62 00 42 80 3c 3b 00 <0f> 84 84 fe ff ff 4c 89 ef e8 ed 10 62 00 e9 77 fe ff ff 48 8b 4c
RSP: 0018:ffffc9000307f0d0 EFLAGS: 00000246
RAX: ffff8880b9100001 RBX: 1ffffffff1a4551c RCX: ffffffff815b2930
RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffffffff8d22a8e0
RBP: ffffffff8d22a930 R08: dffffc0000000000 R09: fffffbfff1a4551d
R10: fffffbfff1a4551d R11: 1ffffffff1a4551c R12: ffff88802773bb80
R13: ffffffff8d22a8e0 R14: ffffffff8d22a930 R15: dffffc0000000000
mutex_optimistic_spin+0x38/0x300 kernel/locking/mutex.c:469
__mutex_lock_common+0x210/0x2390 kernel/locking/mutex.c:599
__mutex_lock kernel/locking/mutex.c:729 [inline]
mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743
netdev_run_todo+0x86b/0xa40 net/core/dev.c:10696
rtnl_unlock net/core/rtnetlink.c:112 [inline]
rtnetlink_rcv_msg+0x9c0/0xe60 net/core/rtnetlink.c:5651
netlink_rcv_skb+0x1e0/0x430 net/netlink/af_netlink.c:2489
netlink_unicast_kernel net/netlink/af_netlink.c:1311 [inline]
netlink_unicast+0x77c/0x920 net/netlink/af_netlink.c:1337
netlink_sendmsg+0x8ab/0xbc0 net/netlink/af_netlink.c:1905
sock_sendmsg_nosec net/socket.c:704 [inline]
__sock_sendmsg net/socket.c:716 [inline]
____sys_sendmsg+0x5a2/0x8c0 net/socket.c:2436
___sys_sendmsg+0x1f0/0x260 net/socket.c:2490
__sys_sendmsg net/socket.c:2519 [inline]
__do_sys_sendmsg net/socket.c:2528 [inline]
__se_sys_sendmsg+0x190/0x250 net/socket.c:2526
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f013705f929
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f0134ec7038 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007f0137286fa0 RCX: 00007f013705f929
RDX: 0000000000000000 RSI: 0000200000000200 RDI: 0000000000000005
RBP: 00007f01370e1b39 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f0137286fa0 R15: 00007fff8588d9b8
----------------
Code disassembly (best guess):
0: 4c 89 ef mov %r13,%rdi
3: e8 1d 11 62 00 call 0x621125
8: 49 f7 45 00 01 00 00 testq $0x1,0x0(%r13)
f: 00
10: 0f 85 8b 00 00 00 jne 0xa1
16: f3 90 pause
18: 4c 89 ef mov %r13,%rdi
1b: be 08 00 00 00 mov $0x8,%esi
20: e8 90 12 62 00 call 0x6212b5
25: 42 80 3c 3b 00 cmpb $0x0,(%rbx,%r15,1)
* 2a: 0f 84 84 fe ff ff je 0xfffffeb4 <-- trapping instruction
30: 4c 89 ef mov %r13,%rdi
33: e8 ed 10 62 00 call 0x621125
38: e9 77 fe ff ff jmp 0xfffffeb4
3d: 48 rex.W
3e: 8b .byte 0x8b
3f: 4c rex.WR