==================================================================
BUG: KASAN: slab-use-after-free in ax25_heartbeat_expiry+0x115/0x140 net/ax25/ax25_timer.c:127
Read of size 4 at addr ffff8880697b8460 by task syz.9.2996/18286
CPU: 0 UID: 0 PID: 18286 Comm: syz.9.2996 Tainted: G L syzkaller #0 PREEMPT(full)
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/18/2026
Call Trace:
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
print_address_description+0x55/0x1e0 mm/kasan/report.c:378
print_report+0x58/0x70 mm/kasan/report.c:482
kasan_report+0x117/0x150 mm/kasan/report.c:595
ax25_heartbeat_expiry+0x115/0x140 net/ax25/ax25_timer.c:127
call_timer_fn+0x192/0x5e0 kernel/time/timer.c:1748
expire_timers kernel/time/timer.c:1799 [inline]
__run_timers kernel/time/timer.c:2374 [inline]
__run_timer_base+0x652/0x8b0 kernel/time/timer.c:2386
run_timer_base kernel/time/timer.c:2395 [inline]
run_timer_softirq+0xb7/0x170 kernel/time/timer.c:2405
handle_softirqs+0x22a/0x840 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0xca/0x220 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+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1061
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:179 [inline]
RIP: 0010:_raw_spin_unlock_irqrestore+0x47/0x80 kernel/locking/spinlock.c:198
Code: f7 e8 2d 4c ed f5 f7 c3 00 02 00 00 74 05 e8 e0 b3 18 f6 9c 58 a9 00 02 00 00 75 27 f7 c3 00 02 00 00 74 01 fb bf 01 00 00 00 94 e5 de f5 65 8b 05 dd b7 68 07 85 c0 74 18 5b 41 5e e9 41 48
RSP: 0018:ffffc90005467688 EFLAGS: 00000206
RAX: 0000000000000002 RBX: 0000000000000286 RCX: 0000000080000001
RDX: 0000000000000006 RSI: ffffffff8df45aa1 RDI: 0000000000000001
RBP: 0000000000000000 R08: ffffffff90129cf7 R09: 1ffffffff202539e
R10: dffffc0000000000 R11: fffffbfff202539f R12: 0000000000000001
R13: ffff8880571fa0c0 R14: ffff8880571fa080 R15: ffff8880571fa0c0
spin_unlock_irqrestore include/linux/spinlock.h:408 [inline]
__wake_up_common_lock+0x190/0x1f0 kernel/sched/wait.c:127
__unix_dgram_recvmsg+0x485/0xd60 net/unix/af_unix.c:2602
sock_recvmsg_nosec+0x10c/0x140 net/socket.c:1136
____sys_recvmsg+0x3e3/0x4a0 net/socket.c:2868
___sys_recvmsg+0x215/0x590 net/socket.c:2912
do_recvmmsg+0x334/0x800 net/socket.c:3007
__sys_recvmmsg net/socket.c:3081 [inline]
__do_sys_recvmmsg net/socket.c:3104 [inline]
__se_sys_recvmmsg net/socket.c:3097 [inline]
__x64_sys_recvmmsg+0x198/0x250 net/socket.c:3097
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fd2fc19c819
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fd2fcff6028 EFLAGS: 00000246 ORIG_RAX: 000000000000012b
RAX: ffffffffffffffda RBX: 00007fd2fc416090 RCX: 00007fd2fc19c819
RDX: 0000000000010106 RSI: 00002000000000c0 RDI: 0000000000000004
RBP: 00007fd2fc232c91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000002 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fd2fc416128 R14: 00007fd2fc416090 R15: 00007ffc9ac89978
Allocated by task 16236:
kasan_save_stack mm/kasan/common.c:57 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
poison_kmalloc_redzone mm/kasan/common.c:398 [inline]
__kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:415
kasan_kmalloc include/linux/kasan.h:263 [inline]
__kmalloc_cache_noprof+0x31c/0x660 mm/slub.c:5412
kmalloc_noprof include/linux/slab.h:950 [inline]
kzalloc_noprof include/linux/slab.h:1188 [inline]
ax25_dev_device_up+0x54/0x5f0 net/ax25/ax25_dev.c:57
ax25_device_event+0x127/0x8a0 net/ax25/af_ax25.c:143
notifier_call_chain+0x1ad/0x3d0 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2285 [inline]
call_netdevice_notifiers net/core/dev.c:2299 [inline]
__dev_notify_flags+0x1a9/0x310 net/core/dev.c:9835
netif_change_flags+0xe8/0x1a0 net/core/dev.c:9864
dev_change_flags+0x130/0x260 net/core/dev_api.c:68
dev_ioctl+0x7b4/0x1150 net/core/dev_ioctl.c:814
sock_do_ioctl+0x23e/0x320 net/socket.c:1326
sock_ioctl+0x5c6/0x7f0 net/socket.c:1433
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:597 [inline]
__se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 15:
kasan_save_stack mm/kasan/common.c:57 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:584
poison_slab_object mm/kasan/common.c:253 [inline]
__kasan_slab_free+0x5c/0x80 mm/kasan/common.c:285
kasan_slab_free include/linux/kasan.h:235 [inline]
slab_free_hook mm/slub.c:2689 [inline]
__rcu_free_sheaf_prepare+0x12d/0x2a0 mm/slub.c:2940
rcu_free_sheaf+0x31/0x200 mm/slub.c:5842
rcu_do_batch kernel/rcu/tree.c:2617 [inline]
rcu_core+0x7cd/0x1070 kernel/rcu/tree.c:2869
handle_softirqs+0x22a/0x840 kernel/softirq.c:622
run_ksoftirqd+0x36/0x60 kernel/softirq.c:1076
smpboot_thread_fn+0x541/0xa50 kernel/smpboot.c:160
kthread+0x388/0x470 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
The buggy address belongs to the object at ffff8880697b8400
which belongs to the cache kmalloc-256 of size 256
The buggy address is located 96 bytes inside of
freed 256-byte region [ffff8880697b8400, ffff8880697b8500)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x697b8
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 ffff88813fea9b40 dead000000000100 dead000000000122
raw: 0000000000000000 0000000800100010 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff88813fea9b40 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 0xd2820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 6698, tgid 6697 (syz.1.190), ts 142732541695, free_ts 139960642789
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x231/0x280 mm/page_alloc.c:1858
prep_new_page mm/page_alloc.c:1866 [inline]
get_page_from_freelist+0x24ba/0x2540 mm/page_alloc.c:3946
__alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5226
alloc_slab_page mm/slub.c:3278 [inline]
allocate_slab+0x77/0x660 mm/slub.c:3467
new_slab mm/slub.c:3525 [inline]
refill_objects+0x339/0x3d0 mm/slub.c:7247
refill_sheaf mm/slub.c:2816 [inline]
__pcs_replace_empty_main+0x321/0x720 mm/slub.c:4651
alloc_from_pcs mm/slub.c:4749 [inline]
slab_alloc_node mm/slub.c:4883 [inline]
__do_kmalloc_node mm/slub.c:5291 [inline]
__kmalloc_noprof+0x474/0x760 mm/slub.c:5304
kmalloc_noprof include/linux/slab.h:954 [inline]
kzalloc_noprof include/linux/slab.h:1188 [inline]
hash_ipportnet6_add+0x1634/0x2eb0 net/netfilter/ipset/ip_set_hash_gen.h:950
hash_ipportnet6_uadt+0xa88/0xe00 net/netfilter/ipset/ip_set_hash_ipportnet.c:504
call_ad+0x398/0xb60 net/netfilter/ipset/ip_set_core.c:1751
ip_set_ad+0x824/0x9d0 net/netfilter/ipset/ip_set_core.c:1841
nfnetlink_rcv_msg+0xc03/0x12c0 net/netfilter/nfnetlink.c:300
netlink_rcv_skb+0x232/0x4b0 net/netlink/af_netlink.c:2550
nfnetlink_rcv+0x2c0/0x27b0 net/netfilter/nfnetlink.c:667
netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
netlink_unicast+0x80f/0x9b0 net/netlink/af_netlink.c:1344
netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1894
page last free pid 6704 tgid 6699 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
__free_pages_prepare mm/page_alloc.c:1402 [inline]
__free_frozen_pages+0xbc7/0xd30 mm/page_alloc.c:2943
kasan_depopulate_vmalloc_pte+0x6d/0x90 mm/kasan/shadow.c:484
apply_to_pte_range mm/memory.c:3324 [inline]
apply_to_pmd_range mm/memory.c:3368 [inline]
apply_to_pud_range mm/memory.c:3404 [inline]
apply_to_p4d_range mm/memory.c:3440 [inline]
__apply_to_page_range+0xbdc/0x1420 mm/memory.c:3476
__kasan_release_vmalloc+0xa2/0xd0 mm/kasan/shadow.c:602
kasan_release_vmalloc include/linux/kasan.h:593 [inline]
kasan_release_vmalloc_node mm/vmalloc.c:2284 [inline]
purge_vmap_node+0x220/0x960 mm/vmalloc.c:2306
__purge_vmap_area_lazy+0x779/0xb40 mm/vmalloc.c:2396
_vm_unmap_aliases+0x73d/0x7e0 mm/vmalloc.c:2990
change_page_attr_set_clr+0x305/0xf70 arch/x86/mm/pat/set_memory.c:2095
set_memory_rox+0xbe/0x100 arch/x86/mm/pat/set_memory.c:2327
machine_kexec_prepare+0x13c6/0x1640 arch/x86/kernel/machine_kexec_64.c:381
do_kexec_load+0x5e2/0x7c0 kernel/kexec.c:142
__do_sys_kexec_load kernel/kexec.c:261 [inline]
__se_sys_kexec_load+0x134/0x160 kernel/kexec.c:242
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff8880697b8300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8880697b8380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff8880697b8400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff8880697b8480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880697b8500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
----------------
Code disassembly (best guess):
0: f7 e8 imul %eax
2: 2d 4c ed f5 f7 sub $0xf7f5ed4c,%eax
7: c3 ret
8: 00 02 add %al,(%rdx)
a: 00 00 add %al,(%rax)
c: 74 05 je 0x13
e: e8 e0 b3 18 f6 call 0xf618b3f3
13: 9c pushf
14: 58 pop %rax
15: a9 00 02 00 00 test $0x200,%eax
1a: 75 27 jne 0x43
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 94 e5 de f5 call 0xf5dee5c3 <-- trapping instruction
2f: 65 8b 05 dd b7 68 07 mov %gs:0x768b7dd(%rip),%eax # 0x768b813
36: 85 c0 test %eax,%eax
38: 74 18 je 0x52
3a: 5b pop %rbx
3b: 41 5e pop %r14
3d: e9 .byte 0xe9
3e: 41 rex.B
3f: 48 rex.W