==================================================================
BUG: KASAN: slab-use-after-free in ax25_heartbeat_expiry+0x115/0x140 net/ax25/ax25_timer.c:127
Read of size 4 at addr ffff888084e63c60 by task syz.2.5343/28601
CPU: 0 UID: 0 PID: 28601 Comm: syz.2.5343 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/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_irq include/linux/spinlock_api_smp.h:188 [inline]
RIP: 0010:_raw_spin_unlock_irq+0x29/0x50 kernel/locking/spinlock.c:206
Code: 90 f3 0f 1e fa 53 48 89 fb 48 83 c7 18 48 8b 74 24 08 e8 fa 6e e6 f5 48 89 df e8 02 e4 e6 f5 e8 0d 6f 12 f6 fb bf 01 00 00 00 62 66 d8 f5 65 8b 05 ab 42 85 07 85 c0 74 07 5b e9 d1 47 00 00
RSP: 0018:ffffc90005d4f480 EFLAGS: 00000202
RAX: 0000000000002773 RBX: ffff8880322b2188 RCX: 0000000080000002
RDX: 0000000000000006 RSI: ffffffff8dfd8f45 RDI: 0000000000000001
RBP: 1ffff11006456430 R08: ffffffff903386f7 R09: 1ffffffff20670de
R10: dffffc0000000000 R11: fffffbfff20670df R12: ffff8880322b2188
R13: dffffc0000000000 R14: 00fff6800002002d R15: ffff8880322b2180
spin_unlock_irq include/linux/spinlock.h:402 [inline]
filemap_remove_folio+0x102/0x3a0 mm/filemap.c:259
truncate_inode_folio+0x5d/0x70 mm/truncate.c:176
shmem_undo_range+0x42f/0x1660 mm/shmem.c:1145
shmem_truncate_range mm/shmem.c:1277 [inline]
shmem_evict_inode+0x289/0xae0 mm/shmem.c:1407
evict+0x61e/0xb10 fs/inode.c:841
__dentry_kill+0x1a2/0x690 fs/dcache.c:718
finish_dput+0xc9/0x480 fs/dcache.c:927
__fput+0x691/0xa60 fs/file_table.c:518
task_work_run+0x1d9/0x270 kernel/task_work.c:233
exit_task_work include/linux/task_work.h:40 [inline]
do_exit+0x70f/0x22c0 kernel/exit.c:975
do_group_exit+0x21b/0x2d0 kernel/exit.c:1117
__do_sys_exit_group kernel/exit.c:1128 [inline]
__se_sys_exit_group kernel/exit.c:1126 [inline]
__x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1126
x64_sys_call+0x221a/0x2240 arch/x86/include/generated/asm/syscalls_64.h:232
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:0x7f1a05d9cdd9
Code: Unable to access opcode bytes at 0x7f1a05d9cdaf.
RSP: 002b:00007ffe44f43f78 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 000000000000000b RCX: 00007f1a05d9cdd9
RDX: 0000000000000001 RSI: 0000000000000000 RDI: 000000000000000b
RBP: 00000000000010ff R08: 00007ffe44f44427 R09: 000000000000000b
R10: 00007f1a06015fa0 R11: 0000000000000246 R12: 0000000000000003
R13: 00007f1a0601627c R14: 00007f1a06016278 R15: 00007f1a06016270
Allocated by task 25572:
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:5415
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:2287 [inline]
call_netdevice_notifiers net/core/dev.c:2301 [inline]
__dev_notify_flags+0x1a9/0x310 net/core/dev.c:9801
netif_change_flags+0xe8/0x1a0 net/core/dev.c:9830
dev_change_flags+0x130/0x270 net/core/dev_api.c:68
dev_ioctl+0x7b4/0x1150 net/core/dev_ioctl.c:816
sock_do_ioctl+0x23e/0x320 net/socket.c:1327
sock_ioctl+0x5c6/0x7f0 net/socket.c:1434
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 28518:
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:5845
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
__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
The buggy address belongs to the object at ffff888084e63c00
which belongs to the cache kmalloc-256 of size 256
The buggy address is located 96 bytes inside of
freed 256-byte region [ffff888084e63c00, ffff888084e63d00)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888084e62e00 pfn:0x84e62
head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0xfff00000000240(workingset|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000240 ffff88813fe2eb40 ffffea0002945c10 ffffea0000aed390
raw: ffff888084e62e00 0000000800100006 00000000f5000000 0000000000000000
head: 00fff00000000240 ffff88813fe2eb40 ffffea0002945c10 ffffea0000aed390
head: ffff888084e62e00 0000000800100006 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 18991, tgid 18982 (syz.2.3070), ts 502002822359, free_ts 501469378552
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:7251
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:5294 [inline]
__kmalloc_noprof+0x474/0x760 mm/slub.c:5307
kmalloc_noprof include/linux/slab.h:954 [inline]
kzalloc_noprof include/linux/slab.h:1188 [inline]
iter_file_splice_write+0x1da/0x10f0 fs/splice.c:678
do_splice_from fs/splice.c:936 [inline]
direct_splice_actor+0x101/0x160 fs/splice.c:1159
splice_direct_to_actor+0x53a/0xc70 fs/splice.c:1103
do_splice_direct_actor fs/splice.c:1202 [inline]
do_splice_direct+0x195/0x290 fs/splice.c:1228
do_sendfile+0x535/0x7d0 fs/read_write.c:1372
__do_sys_sendfile64 fs/read_write.c:1433 [inline]
__se_sys_sendfile64+0x144/0x1a0 fs/read_write.c:1419
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
page last free pid 18572 tgid 18572 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
__slab_free+0x274/0x2c0 mm/slub.c:5608
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x99/0x100 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:350
kasan_slab_alloc include/linux/kasan.h:253 [inline]
slab_post_alloc_hook mm/slub.c:4569 [inline]
slab_alloc_node mm/slub.c:4898 [inline]
kmem_cache_alloc_noprof+0x2bc/0x650 mm/slub.c:4905
__kernfs_new_node+0xea/0x970 fs/kernfs/dir.c:664
kernfs_new_node+0x102/0x210 fs/kernfs/dir.c:748
__kernfs_create_file+0x4b/0x2e0 fs/kernfs/file.c:1057
sysfs_add_file_mode_ns+0x238/0x300 fs/sysfs/file.c:313
create_files fs/sysfs/group.c:82 [inline]
internal_create_group+0x673/0x1180 fs/sysfs/group.c:189
internal_create_groups fs/sysfs/group.c:229 [inline]
sysfs_create_groups+0x59/0x120 fs/sysfs/group.c:255
netdev_queue_add_kobject net/core/net-sysfs.c:1988 [inline]
netdev_queue_update_kobjects+0x2a6/0x6c0 net/core/net-sysfs.c:2041
register_queue_kobjects net/core/net-sysfs.c:2104 [inline]
netdev_register_kobject+0x258/0x310 net/core/net-sysfs.c:2347
register_netdevice+0x1456/0x1ec0 net/core/dev.c:11427
macsec_newlink+0x6f9/0x1200 drivers/net/macsec.c:4211
Memory state around the buggy address:
ffff888084e63b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888084e63b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888084e63c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888084e63c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888084e63d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
----------------
Code disassembly (best guess):
0: 90 nop
1: f3 0f 1e fa endbr64
5: 53 push %rbx
6: 48 89 fb mov %rdi,%rbx
9: 48 83 c7 18 add $0x18,%rdi
d: 48 8b 74 24 08 mov 0x8(%rsp),%rsi
12: e8 fa 6e e6 f5 call 0xf5e66f11
17: 48 89 df mov %rbx,%rdi
1a: e8 02 e4 e6 f5 call 0xf5e6e421
1f: e8 0d 6f 12 f6 call 0xf6126f31
24: fb sti
25: bf 01 00 00 00 mov $0x1,%edi
* 2a: e8 62 66 d8 f5 call 0xf5d86691 <-- trapping instruction
2f: 65 8b 05 ab 42 85 07 mov %gs:0x78542ab(%rip),%eax # 0x78542e1
36: 85 c0 test %eax,%eax
38: 74 07 je 0x41
3a: 5b pop %rbx
3b: e9 d1 47 00 00 jmp 0x4811