Hello,
syzbot found the following issue on:
HEAD commit: d27334b2888c Linux 6.6.151
git tree: linux-6.6.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=1373e679580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=f0bc3d90c30838b5
dashboard link:
https://syzkaller.appspot.com/bug?extid=51895fd72f16150d9f6b
compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/695139abd971/disk-d27334b2.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/b11fc121442a/vmlinux-d27334b2.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/e226f54f9286/bzImage-d27334b2.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+51895f...@syzkaller.appspotmail.com
==================================================================
BUG: KASAN: slab-use-after-free in snd_card_do_free sound/core/init.c:608 [inline]
BUG: KASAN: slab-use-after-free in release_card_device+0x196/0x1a0 sound/core/init.c:153
Read of size 1 at addr ffff88802c59c8f1 by task syz.7.2202/14561
CPU: 1 PID: 14561 Comm: syz.7.2202 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Call Trace:
<TASK>
dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106
print_address_description mm/kasan/report.c:364 [inline]
print_report+0xa8/0x210 mm/kasan/report.c:468
kasan_report+0x117/0x150 mm/kasan/report.c:581
snd_card_do_free sound/core/init.c:608 [inline]
release_card_device+0x196/0x1a0 sound/core/init.c:153
device_release+0xbc/0x1e0 drivers/base/core.c:-1
kobject_cleanup lib/kobject.c:689 [inline]
kobject_release lib/kobject.c:720 [inline]
kref_put include/linux/kref.h:65 [inline]
kobject_put+0x21b/0x450 lib/kobject.c:737
snd_card_file_remove+0x331/0x380 sound/core/init.c:1140
snd_pcm_release+0x12f/0x150 sound/core/pcm_native.c:2941
__fput+0x221/0x940 fs/file_table.c:418
task_work_run+0x1d4/0x260 kernel/task_work.c:245
resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
exit_to_user_mode_loop+0xe6/0x110 kernel/entry/common.c:177
exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:210
__syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline]
syscall_exit_to_user_mode+0x1a/0x50 kernel/entry/common.c:302
do_syscall_64+0x61/0xb0 arch/x86/entry/common.c:82
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f02d059e0d9
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:00007ffc13c1b1e8 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4
RAX: 0000000000000000 RBX: 00007f02d0827da0 RCX: 00007f02d059e0d9
RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003
RBP: 00007f02d0827da0 R08: 0000000000000006 R09: 0000000000000000
R10: 00007f02d0827cb0 R11: 0000000000000246 R12: 0000000000167def
R13: 00007f02d0825fac R14: 0000000000167bf8 R15: 00007ffc13c1b2f0
</TASK>
Allocated by task 1:
kasan_save_stack mm/kasan/common.c:46 [inline]
kasan_set_track+0x4e/0x70 mm/kasan/common.c:53
____kasan_kmalloc mm/kasan/common.c:375 [inline]
__kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:384
kasan_kmalloc include/linux/kasan.h:198 [inline]
__do_kmalloc_node mm/slab_common.c:1007 [inline]
__kmalloc_node_track_caller+0xb4/0x230 mm/slab_common.c:1027
alloc_dr drivers/base/devres.c:119 [inline]
__devres_alloc_node+0x4c/0x120 drivers/base/devres.c:167
snd_devm_card_new+0x78/0x150 sound/core/init.c:235
loopback_probe+0x151/0x1a30 sound/drivers/aloop.c:1716
platform_probe+0x13b/0x1c0 drivers/base/platform.c:1376
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x247/0xae0 drivers/base/dd.c:717
__driver_probe_device+0x1f5/0x390 drivers/base/dd.c:879
driver_probe_device+0x4f/0x420 drivers/base/dd.c:909
__device_attach_driver+0x2ca/0x510 drivers/base/dd.c:1037
bus_for_each_drv+0x252/0x2e0 drivers/base/bus.c:459
__device_attach+0x2c1/0x420 drivers/base/dd.c:1109
bus_probe_device+0x180/0x260 drivers/base/bus.c:580
device_add+0x87c/0xc40 drivers/base/core.c:3700
platform_device_add+0x4c3/0x830 drivers/base/platform.c:716
platform_device_register_full+0x472/0x560 drivers/base/platform.c:843
platform_device_register_resndata include/linux/platform_device.h:164 [inline]
platform_device_register_simple include/linux/platform_device.h:193 [inline]
alsa_card_loopback_init+0x156/0x2b0 sound/drivers/aloop.c:1810
do_one_initcall+0x242/0x790 init/main.c:1210
do_initcall_level+0x13d/0x1f0 init/main.c:1272
do_initcalls+0x69/0xd0 init/main.c:1288
kernel_init_freeable+0x3d9/0x560 init/main.c:1525
kernel_init+0x1d/0x1c0 init/main.c:1415
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293
Freed by task 14562:
kasan_save_stack mm/kasan/common.c:46 [inline]
kasan_set_track+0x4e/0x70 mm/kasan/common.c:53
kasan_save_free_info+0x28/0x40 mm/kasan/generic.c:522
____kasan_slab_free+0x126/0x1f0 mm/kasan/common.c:237
kasan_slab_free include/linux/kasan.h:164 [inline]
slab_free_hook mm/slub.c:1811 [inline]
slab_free_freelist_hook+0x130/0x1a0 mm/slub.c:1837
slab_free mm/slub.c:3830 [inline]
__kmem_cache_free+0xba/0x1f0 mm/slub.c:3843
release_nodes drivers/base/devres.c:506 [inline]
devres_release_all+0x1ad/0x230 drivers/base/devres.c:535
device_unbind_cleanup drivers/base/dd.c:608 [inline]
__device_release_driver drivers/base/dd.c:1356 [inline]
device_release_driver_internal+0x4c0/0x6f0 drivers/base/dd.c:1374
unbind_store+0x1a1/0x1d0 drivers/base/bus.c:244
kernfs_fop_write_iter+0x3a4/0x520 fs/kernfs/file.c:352
call_write_iter include/linux/fs.h:2018 [inline]
new_sync_write fs/read_write.c:491 [inline]
vfs_write+0x474/0x9a0 fs/read_write.c:584
ksys_write+0x151/0x260 fs/read_write.c:637
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
The buggy address belongs to the object at ffff88802c59c000
which belongs to the cache kmalloc-8k of size 8192
The buggy address is located 2289 bytes inside of
freed 8192-byte region [ffff88802c59c000, ffff88802c59e000)
The buggy address belongs to the physical page:
page:ffffea0000b16600 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2c598
head:ffffea0000b16600 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 ffff888017c42280 dead000000000122 0000000000000000
raw: 0000000000000000 0000000000020002 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 23762290662, free_ts 0
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x1c1/0x200 mm/page_alloc.c:1582
prep_new_page mm/page_alloc.c:1589 [inline]
get_page_from_freelist+0x2181/0x22a0 mm/page_alloc.c:3221
__alloc_pages+0x1f0/0x460 mm/page_alloc.c:4501
alloc_page_interleave+0x24/0x1e0 mm/mempolicy.c:2118
alloc_slab_page+0x5d/0x180 mm/slub.c:1881
allocate_slab mm/slub.c:2028 [inline]
new_slab+0x87/0x2d0 mm/slub.c:2081
___slab_alloc+0xc5c/0x12f0 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+0x11f/0x250 mm/slub.c:3534
kmalloc_trace+0x2a/0xe0 mm/slab_common.c:1098
kmalloc include/linux/slab.h:600 [inline]
kmalloc_array include/linux/slab.h:636 [inline]
kcalloc include/linux/slab.h:668 [inline]
snd_mixer_oss_notify_handler+0x14a/0xff0 sound/core/oss/mixer_oss.c:1378
snd_card_register+0x56b/0x6f0 sound/core/init.c:940
snd_dummy_probe+0x11b5/0x18e0 sound/drivers/dummy.c:1094
platform_probe+0x13b/0x1c0 drivers/base/platform.c:1376
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x247/0xae0 drivers/base/dd.c:717
__driver_probe_device+0x1f5/0x390 drivers/base/dd.c:879
driver_probe_device+0x4f/0x420 drivers/base/dd.c:909
page_owner free stack trace missing
Memory state around the buggy address:
ffff88802c59c780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88802c59c800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88802c59c880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88802c59c900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88802c59c980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
---
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