[v6.6] KASAN: slab-use-after-free Read in ax25_disconnect

0 views
Skip to first unread message

syzbot

unread,
Sep 24, 2025, 6:48:34 AM (2 days ago) Sep 24
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: af1544b5d072 Linux 6.6.107
git tree: linux-6.6.y
console output: https://syzkaller.appspot.com/x/log.txt?x=16cf94e2580000
kernel config: https://syzkaller.appspot.com/x/.config?x=12606d4b8832c7e4
dashboard link: https://syzkaller.appspot.com/bug?extid=d06234942ee88191e32b
compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/70417990f48e/disk-af1544b5.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/1513b6e63f4f/vmlinux-af1544b5.xz
kernel image: https://storage.googleapis.com/syzbot-assets/5648a8356789/bzImage-af1544b5.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+d06234...@syzkaller.appspotmail.com

==================================================================
BUG: KASAN: slab-use-after-free in ax25_disconnect+0x19c/0x3b0 net/ax25/ax25_subr.c:283
Read of size 8 at addr ffff88807aea6bc0 by task syz.0.3011/17720

CPU: 1 PID: 17720 Comm: syz.0.3011 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025
Call Trace:
<IRQ>
dump_stack_lvl+0x16c/0x230 lib/dump_stack.c:106
print_address_description mm/kasan/report.c:364 [inline]
print_report+0xac/0x220 mm/kasan/report.c:468
kasan_report+0x117/0x150 mm/kasan/report.c:581
ax25_disconnect+0x19c/0x3b0 net/ax25/ax25_subr.c:283
call_timer_fn+0x16e/0x530 kernel/time/timer.c:1700
expire_timers kernel/time/timer.c:1751 [inline]
__run_timers+0x52d/0x7d0 kernel/time/timer.c:2022
run_timer_softirq+0x67/0xf0 kernel/time/timer.c:2035
handle_softirqs+0x280/0x820 kernel/softirq.c:578
__do_softirq kernel/softirq.c:612 [inline]
invoke_softirq kernel/softirq.c:452 [inline]
__irq_exit_rcu+0xc7/0x190 kernel/softirq.c:661
irq_exit_rcu+0x9/0x20 kernel/softirq.c:673
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1088 [inline]
sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1088
</IRQ>
<TASK>
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:687
RIP: 0010:unix_copy_addr net/unix/af_unix.c:2381 [inline]
RIP: 0010:__unix_dgram_recvmsg+0x4f9/0xd60 net/unix/af_unix.c:2442
Code: 89 d8 48 c1 e8 03 42 80 3c 28 00 74 08 48 89 df e8 1c 3d b9 f8 41 be 18 05 00 00 4c 03 33 4c 89 f0 48 c1 e8 03 42 80 3c 28 00 <74> 08 4c 89 f7 e8 fd 3c b9 f8 49 8b 1e 48 85 db 0f 84 90 00 00 00
RSP: 0018:ffffc9000bd4f700 EFLAGS: 00000246
RAX: 1ffff11004ba08a3 RBX: ffff888024405658 RCX: 0000000000080000
RDX: ffffc9000db6e000 RSI: 000000000007ffff RDI: ffffc9000bd4fd20
RBP: ffffc9000bd4f898 R08: ffffffff90da75af R09: 1ffffffff21b4eb5
R10: dffffc0000000000 R11: fffffbfff21b4eb6 R12: 1ffff920017a9fa4
R13: dffffc0000000000 R14: ffff888025d04518 R15: ffff888024405640
sock_recvmsg_nosec+0x82/0xd0 net/socket.c:1046
____sys_recvmsg+0x49b/0x5b0 net/socket.c:2812
___sys_recvmsg+0x1b6/0x510 net/socket.c:2856
do_recvmmsg+0x360/0x7d0 net/socket.c:2950
__sys_recvmmsg net/socket.c:3029 [inline]
__do_sys_recvmmsg net/socket.c:3052 [inline]
__se_sys_recvmmsg net/socket.c:3045 [inline]
__x64_sys_recvmmsg+0x191/0x240 net/socket.c:3045
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7fe2dff8eec9
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:00007fe2e0edd038 EFLAGS: 00000246 ORIG_RAX: 000000000000012b
RAX: ffffffffffffffda RBX: 00007fe2e01e6090 RCX: 00007fe2dff8eec9
RDX: 0000000000010106 RSI: 00002000000000c0 RDI: 0000000000000003
RBP: 00007fe2e0011f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000002 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fe2e01e6128 R14: 00007fe2e01e6090 R15: 00007fffa94fc748
</TASK>

Allocated by task 12026:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4e/0x70 mm/kasan/common.c:52
____kasan_kmalloc mm/kasan/common.c:374 [inline]
__kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:383
kmalloc include/linux/slab.h:600 [inline]
kzalloc include/linux/slab.h:721 [inline]
ax25_create_cb+0x4e/0x580 net/ax25/af_ax25.c:531
ax25_send_frame+0x445/0x9f0 net/ax25/ax25_out.c:67
rose_send_frame+0x111/0x220 net/rose/rose_link.c:106
rose_transmit_restart_request net/rose/rose_link.c:198 [inline]
rose_transmit_link+0x46a/0x740 net/rose/rose_link.c:284
rose_write_internal+0x11d1/0x1ab0 net/rose/rose_subr.c:198
rose_connect+0x909/0x10a0 net/rose/af_rose.c:880
__sys_connect_file net/socket.c:2057 [inline]
__sys_connect+0x397/0x420 net/socket.c:2074
__do_sys_connect net/socket.c:2084 [inline]
__se_sys_connect net/socket.c:2081 [inline]
__x64_sys_connect+0x7a/0x90 net/socket.c:2081
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2

Freed by task 17720:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4e/0x70 mm/kasan/common.c:52
kasan_save_free_info+0x2e/0x50 mm/kasan/generic.c:522
____kasan_slab_free+0x126/0x1e0 mm/kasan/common.c:236
kasan_slab_free include/linux/kasan.h:164 [inline]
slab_free_hook mm/slub.c:1811 [inline]
slab_free_freelist_hook+0x130/0x1b0 mm/slub.c:1837
slab_free mm/slub.c:3830 [inline]
__kmem_cache_free+0xba/0x1f0 mm/slub.c:3843
ax25_cb_put include/net/ax25.h:281 [inline]
rose_link_failed+0xf9/0x150 net/rose/rose_route.c:830
ax25_link_failed+0x57/0xa0 net/ax25/ax25_iface.c:196
ax25_disconnect+0x17e/0x3b0 net/ax25/ax25_subr.c:281
call_timer_fn+0x16e/0x530 kernel/time/timer.c:1700
expire_timers kernel/time/timer.c:1751 [inline]
__run_timers+0x52d/0x7d0 kernel/time/timer.c:2022
run_timer_softirq+0x67/0xf0 kernel/time/timer.c:2035
handle_softirqs+0x280/0x820 kernel/softirq.c:578
__do_softirq kernel/softirq.c:612 [inline]
invoke_softirq kernel/softirq.c:452 [inline]
__irq_exit_rcu+0xc7/0x190 kernel/softirq.c:661
irq_exit_rcu+0x9/0x20 kernel/softirq.c:673
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1088 [inline]
sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1088
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:687

Last potentially related work creation:
kasan_save_stack+0x3e/0x60 mm/kasan/common.c:45
__kasan_record_aux_stack+0xaf/0xc0 mm/kasan/generic.c:492
kvfree_call_rcu+0xee/0x780 kernel/rcu/tree.c:3452
neigh_periodic_work+0x3f7/0xd70 net/core/neighbour.c:1010
process_one_work kernel/workqueue.c:2634 [inline]
process_scheduled_works+0xa45/0x15b0 kernel/workqueue.c:2711
worker_thread+0xa55/0xfc0 kernel/workqueue.c:2792
kthread+0x2fa/0x390 kernel/kthread.c:388
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293

The buggy address belongs to the object at ffff88807aea6800
which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 960 bytes inside of
freed 1024-byte region [ffff88807aea6800, ffff88807aea6c00)

The buggy address belongs to the physical page:
page:ffffea0001eba800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7aea0
head:ffffea0001eba800 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff888017841dc0 ffffea0001603600 dead000000000002
raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1f2820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_MEMALLOC|__GFP_HARDWALL), pid 1000, tgid 1000 (kworker/u4:6), ts 124433242007, free_ts 124331252215
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x1cd/0x210 mm/page_alloc.c:1554
prep_new_page mm/page_alloc.c:1561 [inline]
get_page_from_freelist+0x195c/0x19f0 mm/page_alloc.c:3191
__alloc_pages+0x1e3/0x460 mm/page_alloc.c:4457
alloc_slab_page+0x5d/0x170 mm/slub.c:1881
allocate_slab mm/slub.c:2028 [inline]
new_slab+0x87/0x2e0 mm/slub.c:2081
___slab_alloc+0xc6d/0x1300 mm/slub.c:3253
__slab_alloc mm/slub.c:3339 [inline]
__slab_alloc_node mm/slub.c:3392 [inline]
slab_alloc_node mm/slub.c:3485 [inline]
__kmem_cache_alloc_node+0x1a2/0x260 mm/slub.c:3534
__do_kmalloc_node mm/slab_common.c:1006 [inline]
__kmalloc_node_track_caller+0xa2/0x230 mm/slab_common.c:1027
kmalloc_reserve+0x117/0x260 net/core/skbuff.c:581
__alloc_skb+0x138/0x2c0 net/core/skbuff.c:650
__netdev_alloc_skb+0x10c/0x500 net/core/skbuff.c:714
__netdev_alloc_skb_ip_align include/linux/skbuff.h:3292 [inline]
netdev_alloc_skb_ip_align include/linux/skbuff.h:3302 [inline]
batadv_iv_ogm_aggregate_new net/batman-adv/bat_iv_ogm.c:557 [inline]
batadv_iv_ogm_queue_add+0x73e/0xcf0 net/batman-adv/bat_iv_ogm.c:669
batadv_iv_ogm_schedule_buff net/batman-adv/bat_iv_ogm.c:832 [inline]
batadv_iv_ogm_schedule+0x815/0xe90 net/batman-adv/bat_iv_ogm.c:867
batadv_iv_send_outstanding_bat_ogm_packet+0x731/0x840 net/batman-adv/bat_iv_ogm.c:1711
process_one_work kernel/workqueue.c:2634 [inline]
process_scheduled_works+0xa45/0x15b0 kernel/workqueue.c:2711
worker_thread+0xa55/0xfc0 kernel/workqueue.c:2792
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1154 [inline]
free_unref_page_prepare+0x7ce/0x8e0 mm/page_alloc.c:2336
free_unref_page+0x32/0x2e0 mm/page_alloc.c:2429
__slab_free+0x35e/0x410 mm/slub.c:3736
qlink_free mm/kasan/quarantine.c:166 [inline]
qlist_free_all+0x75/0xe0 mm/kasan/quarantine.c:185
kasan_quarantine_reduce+0x143/0x160 mm/kasan/quarantine.c:292
__kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:305
kasan_slab_alloc include/linux/kasan.h:188 [inline]
slab_post_alloc_hook+0x6e/0x4d0 mm/slab.h:767
slab_alloc_node mm/slub.c:3495 [inline]
slab_alloc mm/slub.c:3503 [inline]
__kmem_cache_alloc_lru mm/slub.c:3510 [inline]
kmem_cache_alloc+0x11e/0x2e0 mm/slub.c:3519
kmem_cache_zalloc include/linux/slab.h:711 [inline]
__kernfs_new_node+0xd8/0x7e0 fs/kernfs/dir.c:624
kernfs_new_node+0x14c/0x260 fs/kernfs/dir.c:700
__kernfs_create_file+0x4b/0x2e0 fs/kernfs/file.c:1068
sysfs_add_file_mode_ns+0x238/0x300 fs/sysfs/file.c:294
create_files fs/sysfs/group.c:64 [inline]
internal_create_group+0x428/0xd00 fs/sysfs/group.c:152
internal_create_groups fs/sysfs/group.c:192 [inline]
sysfs_create_groups+0x59/0x120 fs/sysfs/group.c:218
device_add_groups drivers/base/core.c:2785 [inline]
device_add_attrs+0xdf/0x810 drivers/base/core.c:2894
device_add+0x528/0xc20 drivers/base/core.c:3637

Memory state around the buggy address:
ffff88807aea6a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88807aea6b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88807aea6b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88807aea6c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88807aea6c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
----------------
Code disassembly (best guess):
0: 89 d8 mov %ebx,%eax
2: 48 c1 e8 03 shr $0x3,%rax
6: 42 80 3c 28 00 cmpb $0x0,(%rax,%r13,1)
b: 74 08 je 0x15
d: 48 89 df mov %rbx,%rdi
10: e8 1c 3d b9 f8 call 0xf8b93d31
15: 41 be 18 05 00 00 mov $0x518,%r14d
1b: 4c 03 33 add (%rbx),%r14
1e: 4c 89 f0 mov %r14,%rax
21: 48 c1 e8 03 shr $0x3,%rax
25: 42 80 3c 28 00 cmpb $0x0,(%rax,%r13,1)
* 2a: 74 08 je 0x34 <-- trapping instruction
2c: 4c 89 f7 mov %r14,%rdi
2f: e8 fd 3c b9 f8 call 0xf8b93d31
34: 49 8b 1e mov (%r14),%rbx
37: 48 85 db test %rbx,%rbx
3a: 0f 84 90 00 00 00 je 0xd0


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages