==================================================================
BUG: KASAN: slab-use-after-free in ax25_send_frame+0x67c/0x9f0 net/ax25/ax25_out.c:75
Read of size 7 at addr ffff88803ab40008 by task syz.2.6305/30882
CPU: 0 UID: 0 PID: 30882 Comm: syz.2.6305 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026
Call Trace:
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0xba/0x230 mm/kasan/report.c:482
kasan_report+0x117/0x150 mm/kasan/report.c:595
check_region_inline mm/kasan/generic.c:-1 [inline]
kasan_check_range+0x264/0x2c0 mm/kasan/generic.c:200
__asan_memcpy+0x29/0x70 mm/kasan/shadow.c:105
ax25_send_frame+0x67c/0x9f0 net/ax25/ax25_out.c:75
rose_send_frame net/rose/rose_link.c:106 [inline]
rose_transmit_restart_request net/rose/rose_link.c:198 [inline]
rose_t0timer_expiry+0x255/0x560 net/rose/rose_link.c:83
call_timer_fn+0x192/0x640 kernel/time/timer.c:1748
expire_timers kernel/time/timer.c:1799 [inline]
__run_timers kernel/time/timer.c:2373 [inline]
__run_timer_base+0x652/0x8b0 kernel/time/timer.c:2385
run_timer_base kernel/time/timer.c:2394 [inline]
run_timer_softirq+0xb7/0x170 kernel/time/timer.c:2404
handle_softirqs+0x22a/0x870 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0x5f/0x150 kernel/softirq.c:723
irq_exit_rcu+0x9/0x30 kernel/softirq.c:739
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1056 [inline]
sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1056
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
RIP: 0010:unwind_next_frame+0x4a5/0x23c0 arch/x86/kernel/unwind_orc.c:520
Code: e0 48 c1 e8 03 0f b6 04 28 84 c0 0f 85 66 18 00 00 4c 89 e8 48 c1 e8 03 0f b6 04 28 84 c0 0f 85 79 18 00 00 41 0f b6 44 24 01 <83> e0 07 0f 84 66 15 00 00 83 f8 01 4c 8b 7c 24 50 48 bd 00 00 00
RSP: 0000:ffffc900052bf2f8 EFLAGS: 00000246
RAX: 0000000000000002 RBX: ffffffff90327780 RCX: ffffffff90327784
RDX: ffffffff90b30c0a RSI: ffffffff90b30c0a RDI: ffffffff8c27a9a0
RBP: dffffc0000000000 R08: 0000000000000001 R09: ffffffff8e7602e0
R10: ffffc900052bf418 R11: ffffffff81b0b100 R12: ffffffff90b30c0e
R13: ffffffff90b30c0f R14: ffffc900052bf3c8 R15: ffffffff90327780
arch_stack_walk+0x11b/0x150 arch/x86/kernel/stacktrace.c:25
stack_trace_save+0xa9/0x100 kernel/stacktrace.c:122
save_stack+0x122/0x230 mm/page_owner.c:165
__set_page_owner+0x8d/0x4c0 mm/page_owner.c:341
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x231/0x280 mm/page_alloc.c:1889
prep_new_page mm/page_alloc.c:1897 [inline]
get_page_from_freelist+0x24dc/0x2580 mm/page_alloc.c:3962
__alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5250
alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2484
folio_alloc_mpol_noprof mm/mempolicy.c:2503 [inline]
vma_alloc_folio_noprof+0xea/0x210 mm/mempolicy.c:2538
folio_prealloc mm/memory.c:-1 [inline]
alloc_anon_folio mm/memory.c:5208 [inline]
do_anonymous_page mm/memory.c:5265 [inline]
do_pte_missing+0x1656/0x3750 mm/memory.c:4475
handle_pte_fault mm/memory.c:6316 [inline]
__handle_mm_fault mm/memory.c:6454 [inline]
handle_mm_fault+0x1bec/0x3310 mm/memory.c:6623
do_user_addr_fault+0xa73/0x1340 arch/x86/mm/fault.c:1334
handle_page_fault arch/x86/mm/fault.c:1474 [inline]
exc_page_fault+0x6a/0xc0 arch/x86/mm/fault.c:1527
asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:618
RIP: 0033:0x7f80c1559944
Code: 8d 3c 30 4c 89 de 4c 89 54 24 30 e8 66 2c 04 00 4c 8b 54 24 30 85 c0 0f 85 e1 00 00 00 48 8b 44 24 28 48 89 df 4c 89 54 24 30 <4c> 89 93 98 06 00 00 48 89 83 90 06 00 00 48 8d 83 10 03 00 00 4c
RSP: 002b:00007ffe0ffea490 EFLAGS: 00010246
RAX: 00007f80c24ca000 RBX: 00007f80c24ea6c0 RCX: 00007f80c159c597
RDX: 0000000000000003 RSI: 0000000000020000 RDI: 00007f80c24ea6c0
RBP: 0000000000000000 R08: 00000000ffffffff R09: 0000000000000000
R10: 0000000000021000 R11: 0000000000000206 R12: 00007ffe0ffea5e0
R13: ffffffffffffffc0 R14: 0000000000001000 R15: 0000000000000000
Allocated by task 24058:
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:5339
kmalloc_noprof include/linux/slab.h:962 [inline]
rose_add_node+0x23c/0xf00 net/rose/rose_route.c:85
rose_rt_ioctl+0xd35/0x12a0 net/rose/rose_route.c:748
rose_ioctl+0x3fb/0x8f0 net/rose/af_rose.c:1382
sock_do_ioctl+0x101/0x320 net/socket.c:1254
sock_ioctl+0x5c6/0x7f0 net/socket.c:1375
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+0x14d/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 30844:
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:2687 [inline]
slab_free mm/slub.c:6124 [inline]
kfree+0x1c1/0x630 mm/slub.c:6442
rose_neigh_put include/net/rose.h:166 [inline]
rose_timer_expiry+0x4cb/0x600 net/rose/rose_timer.c:183
call_timer_fn+0x192/0x640 kernel/time/timer.c:1748
expire_timers kernel/time/timer.c:1799 [inline]
__run_timers kernel/time/timer.c:2373 [inline]
__run_timer_base+0x652/0x8b0 kernel/time/timer.c:2385
run_timer_base kernel/time/timer.c:2394 [inline]
run_timer_softirq+0xb7/0x170 kernel/time/timer.c:2404
handle_softirqs+0x22a/0x870 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0x5f/0x150 kernel/softirq.c:723
irq_exit_rcu+0x9/0x30 kernel/softirq.c:739
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1056 [inline]
sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1056
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
The buggy address belongs to the object at ffff88803ab40000
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 8 bytes inside of
freed 512-byte region [ffff88803ab40000, ffff88803ab40200)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x3ab40
head: order:2 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 ffff88813fea3c80 dead000000000100 dead000000000122
raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff88813fea3c80 dead000000000100 dead000000000122
head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 00fff00000000002 ffffea0000ead001 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 20009, tgid 20008 (syz.4.3482), ts 501633274075, free_ts 501214455400
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x231/0x280 mm/page_alloc.c:1889
prep_new_page mm/page_alloc.c:1897 [inline]
get_page_from_freelist+0x24dc/0x2580 mm/page_alloc.c:3962
__alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5250
alloc_slab_page mm/slub.c:3255 [inline]
allocate_slab+0x77/0x660 mm/slub.c:3444
new_slab mm/slub.c:3502 [inline]
refill_objects+0x331/0x3c0 mm/slub.c:7134
refill_sheaf mm/slub.c:2804 [inline]
__pcs_replace_empty_main+0x2b9/0x620 mm/slub.c:4578
alloc_from_pcs mm/slub.c:4681 [inline]
slab_alloc_node mm/slub.c:4815 [inline]
__kmalloc_cache_noprof+0x392/0x660 mm/slub.c:5334
kmalloc_noprof include/linux/slab.h:962 [inline]
kzalloc_noprof include/linux/slab.h:1200 [inline]
mca_alloc net/ipv6/mcast.c:871 [inline]
__ipv6_dev_mc_inc+0x44f/0xa50 net/ipv6/mcast.c:961
ipv6_add_dev+0xe43/0x13a0 net/ipv6/addrconf.c:474
addrconf_notify+0x771/0x1050 net/ipv6/addrconf.c:3654
notifier_call_chain+0x1be/0x400 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2287 [inline]
call_netdevice_notifiers net/core/dev.c:2301 [inline]
register_netdevice+0x173a/0x1cf0 net/core/dev.c:11460
nsim_init_netdevsim drivers/net/netdevsim/netdev.c:1063 [inline]
nsim_create+0xb92/0x1100 drivers/net/netdevsim/netdev.c:1145
__nsim_dev_port_add+0x72a/0xb50 drivers/net/netdevsim/dev.c:1493
nsim_dev_port_add_all+0x37/0xf0 drivers/net/netdevsim/dev.c:1549
nsim_dev_reload_create drivers/net/netdevsim/dev.c:1601 [inline]
nsim_dev_reload_up+0x45f/0x7c0 drivers/net/netdevsim/dev.c:1058
page last free pid 9593 tgid 9593 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
__free_pages_prepare mm/page_alloc.c:1433 [inline]
__free_frozen_pages+0xc2b/0xdb0 mm/page_alloc.c:2978
__slab_free+0x263/0x2b0 mm/slub.c:5532
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x97/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:4501 [inline]
slab_alloc_node mm/slub.c:4830 [inline]
kmem_cache_alloc_node_noprof+0x384/0x690 mm/slub.c:4882
__alloc_skb+0x1d0/0x7d0 net/core/skbuff.c:702
alloc_skb include/linux/skbuff.h:1383 [inline]
mld_newpack+0x14c/0xc90 net/ipv6/mcast.c:1775
add_grhead+0x5a/0x2a0 net/ipv6/mcast.c:1886
add_grec+0x1452/0x1740 net/ipv6/mcast.c:2025
mld_send_cr net/ipv6/mcast.c:2148 [inline]
mld_ifc_work+0x6e6/0xe70 net/ipv6/mcast.c:2693
process_one_work kernel/workqueue.c:3275 [inline]
process_scheduled_works+0xb02/0x1830 kernel/workqueue.c:3358
worker_thread+0xa50/0xfc0 kernel/workqueue.c:3439
kthread+0x388/0x470 kernel/kthread.c:467
ret_from_fork+0x51e/0xb90 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Memory state around the buggy address:
ffff88803ab3ff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88803ab3ff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff88803ab40000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88803ab40080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88803ab40100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: e0 48 loopne 0x4a
2: c1 e8 03 shr $0x3,%eax
5: 0f b6 04 28 movzbl (%rax,%rbp,1),%eax
9: 84 c0 test %al,%al
b: 0f 85 66 18 00 00 jne 0x1877
11: 4c 89 e8 mov %r13,%rax
14: 48 c1 e8 03 shr $0x3,%rax
18: 0f b6 04 28 movzbl (%rax,%rbp,1),%eax
1c: 84 c0 test %al,%al
1e: 0f 85 79 18 00 00 jne 0x189d
24: 41 0f b6 44 24 01 movzbl 0x1(%r12),%eax
* 2a: 83 e0 07 and $0x7,%eax <-- trapping instruction
2d: 0f 84 66 15 00 00 je 0x1599
33: 83 f8 01 cmp $0x1,%eax
36: 4c 8b 7c 24 50 mov 0x50(%rsp),%r15
3b: 48 rex.W
3c: bd .byte 0xbd
3d: 00 00 add %al,(%rax)