[v5.15] KASAN: use-after-free Read in ax25_unregister_dev_sysctl

3 views
Skip to first unread message

syzbot

unread,
May 21, 2025, 1:30:31 PM5/21/25
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: a68c15152131 Linux 5.15.183
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=14c960e8580000
kernel config: https://syzkaller.appspot.com/x/.config?x=ef02e502f5873d8
dashboard link: https://syzkaller.appspot.com/bug?extid=5a18a7a7d20f1f24ef2e
compiler: Debian clang version 20.1.6 (++20250514063057+1e4d39e07757-1~exp1~20250514183223.118), Debian LLD 20.1.6

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/9057058298cc/disk-a68c1515.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/3e83bf000c3a/vmlinux-a68c1515.xz
kernel image: https://storage.googleapis.com/syzbot-assets/6809226eafd9/bzImage-a68c1515.xz

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

netlink: 8 bytes leftover after parsing attributes in process `syz.5.835'.
==================================================================
BUG: KASAN: use-after-free in ax25_unregister_dev_sysctl+0x33/0xa0 net/ax25/sysctl_net_ax25.c:172
Read of size 8 at addr ffff88801abbee18 by task syz.5.835/7742

CPU: 1 PID: 7742 Comm: syz.5.835 Not tainted 5.15.183-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Call Trace:
<TASK>
dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106
print_address_description+0x60/0x2d0 mm/kasan/report.c:248
__kasan_report mm/kasan/report.c:434 [inline]
kasan_report+0xdf/0x130 mm/kasan/report.c:451
ax25_unregister_dev_sysctl+0x33/0xa0 net/ax25/sysctl_net_ax25.c:172
ax25_dev_device_down+0x5b/0x520 net/ax25/ax25_dev.c:101
ax25_device_event+0x4b4/0x4f0 net/ax25/af_ax25.c:144
notifier_call_chain kernel/notifier.c:83 [inline]
raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:391
call_netdevice_notifiers_extack net/core/dev.c:2061 [inline]
call_netdevice_notifiers net/core/dev.c:2075 [inline]
dev_close_many+0x28d/0x400 net/core/dev.c:1650
dev_close+0x14c/0x200 net/core/dev.c:1672
bpq_device_event+0x2f4/0x9c0 drivers/net/hamradio/bpqether.c:548
notifier_call_chain kernel/notifier.c:83 [inline]
raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:391
call_netdevice_notifiers_extack net/core/dev.c:2061 [inline]
call_netdevice_notifiers net/core/dev.c:2075 [inline]
__dev_notify_flags+0x178/0x2d0 net/core/dev.c:-1
dev_change_flags+0xe3/0x1a0 net/core/dev.c:8929
dev_ifsioc+0x147/0xe70 net/core/dev_ioctl.c:324
dev_ioctl+0x55f/0xe50 net/core/dev_ioctl.c:587
sock_do_ioctl+0x222/0x2f0 net/socket.c:1154
sock_ioctl+0x4ed/0x6e0 net/socket.c:1257
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:874 [inline]
__se_sys_ioctl+0xfa/0x170 fs/ioctl.c:860
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:0x7f2a11862969
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:00007f2a0f6ca038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f2a11a89fa0 RCX: 00007f2a11862969
RDX: 0000200000000700 RSI: 0000000000008914 RDI: 000000000000000d
RBP: 00007f2a118e4ab1 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f2a11a89fa0 R15: 00007ffcc682a548
</TASK>

Allocated by task 7143:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track mm/kasan/common.c:46 [inline]
set_alloc_info mm/kasan/common.c:434 [inline]
____kasan_kmalloc mm/kasan/common.c:513 [inline]
__kasan_kmalloc+0xb5/0xf0 mm/kasan/common.c:522
kmalloc include/linux/slab.h:604 [inline]
kzalloc include/linux/slab.h:735 [inline]
snd_seq_oss_readq_new+0x4d/0x240 sound/core/seq/oss/seq_oss_readq.c:37
snd_seq_oss_open+0x725/0xe40 sound/core/seq/oss/seq_oss_init.c:232
odev_open+0x63/0x90 sound/core/seq/oss/seq_oss.c:128
chrdev_open+0x597/0x670 fs/char_dev.c:414
do_dentry_open+0x7ff/0xf80 fs/open.c:826
do_open fs/namei.c:3608 [inline]
path_openat+0x2682/0x2f30 fs/namei.c:3742
do_filp_open+0x1b3/0x3e0 fs/namei.c:3769
do_sys_openat2+0x142/0x4a0 fs/open.c:1253
do_sys_open fs/open.c:1269 [inline]
__do_sys_openat fs/open.c:1285 [inline]
__se_sys_openat fs/open.c:1280 [inline]
__x64_sys_openat+0x135/0x160 fs/open.c:1280
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

Last potentially related work creation:
kasan_save_stack+0x35/0x60 mm/kasan/common.c:38
kasan_record_aux_stack+0xb8/0x100 mm/kasan/generic.c:348
kvfree_call_rcu+0x10a/0x7c0 kernel/rcu/tree.c:3596
ip6mr_rules_exit+0x1cd/0x1e0 net/ipv6/ip6mr.c:268
ip6mr_net_exit+0x6f/0xc0 net/ipv6/ip6mr.c:1345
ops_exit_list net/core/net_namespace.c:172 [inline]
cleanup_net+0x6f0/0xb80 net/core/net_namespace.c:635
process_one_work+0x863/0x1000 kernel/workqueue.c:2310
worker_thread+0xaa8/0x12a0 kernel/workqueue.c:2457
kthread+0x436/0x520 kernel/kthread.c:334
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287

The buggy address belongs to the object at ffff88801abbee00
which belongs to the cache kmalloc-192 of size 192
The buggy address is located 24 bytes inside of
192-byte region [ffff88801abbee00, ffff88801abbeec0)
The buggy address belongs to the page:
page:ffffea00006aef80 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88801abbe700 pfn:0x1abbe
flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000200 ffffea0000897448 ffffea0000697448 ffff888016841a00
raw: ffff88801abbe700 000000000010000c 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 1, ts 2355938129, free_ts 0
prep_new_page mm/page_alloc.c:2426 [inline]
get_page_from_freelist+0x1b77/0x1c60 mm/page_alloc.c:4192
__alloc_pages+0x1e1/0x470 mm/page_alloc.c:5466
alloc_page_interleave+0x24/0x1e0 mm/mempolicy.c:2031
alloc_slab_page mm/slub.c:1775 [inline]
allocate_slab mm/slub.c:1912 [inline]
new_slab+0xc0/0x4b0 mm/slub.c:1975
___slab_alloc+0x81e/0xdf0 mm/slub.c:3008
__slab_alloc mm/slub.c:3095 [inline]
slab_alloc_node mm/slub.c:3186 [inline]
slab_alloc mm/slub.c:3228 [inline]
kmem_cache_alloc_trace+0x1a5/0x2a0 mm/slub.c:3245
kmalloc include/linux/slab.h:604 [inline]
kzalloc include/linux/slab.h:735 [inline]
call_usermodehelper_setup+0x8a/0x260 kernel/umh.c:365
kobject_uevent_env+0x65e/0x890 lib/kobject_uevent.c:629
version_sysfs_builtin+0x8b/0xd0 kernel/params.c:878
param_sysfs_init+0x61/0x70 kernel/params.c:971
do_one_initcall+0x1ee/0x680 init/main.c:1302
do_initcall_level+0x137/0x1f0 init/main.c:1375
do_initcalls+0x4b/0x90 init/main.c:1391
kernel_init_freeable+0x3ce/0x560 init/main.c:1615
kernel_init+0x19/0x1b0 init/main.c:1506
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
page_owner free stack trace missing

Memory state around the buggy address:
ffff88801abbed00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88801abbed80: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc
>ffff88801abbee00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88801abbee80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
ffff88801abbef00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================


---
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

syzbot

unread,
Feb 3, 2026, 8:07:24 AMFeb 3
to syzkaller...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages