================================================================== BUG: KASAN: use-after-free in snd_card_do_free sound/core/init.c:612 [inline] BUG: KASAN: use-after-free in release_card_device+0x192/0x1a0 sound/core/init.c:145 Read of size 1 at addr ffff88802ecf4d11 by task syz.5.1929/12114 CPU: 0 PID: 12114 Comm: syz.5.1929 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 Call Trace: dump_stack_lvl+0x188/0x24e lib/dump_stack.c:106 print_address_description mm/kasan/report.c:316 [inline] print_report+0xa8/0x210 mm/kasan/report.c:420 kasan_report+0x10b/0x140 mm/kasan/report.c:524 snd_card_do_free sound/core/init.c:612 [inline] release_card_device+0x192/0x1a0 sound/core/init.c:145 device_release+0x92/0x1c0 drivers/base/core.c:-1 kobject_cleanup lib/kobject.c:681 [inline] kobject_release lib/kobject.c:712 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x217/0x450 lib/kobject.c:729 snd_card_file_remove+0x32d/0x380 sound/core/init.c:1147 snd_pcm_oss_release+0x1fd/0x240 sound/core/oss/pcm_oss.c:2597 __fput+0x20a/0x8b0 fs/file_table.c:320 task_work_run+0x1d0/0x260 kernel/task_work.c:203 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:292 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:303 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f5327d9e0d9 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:00007ffe1c23e678 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4 RAX: 0000000000000000 RBX: 00007f5328027da0 RCX: 00007f5327d9e0d9 RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003 RBP: 00007f5328027da0 R08: 0000000000000006 R09: 0000000000000000 R10: 00007f5328027cb0 R11: 0000000000000246 R12: 0000000000116c98 R13: 00007f532802609c R14: 0000000000116b2c R15: 00007ffe1c23e780 The buggy address belongs to the physical page: page:ffffea0000bb3d00 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2ecf4 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea0001e0a108 ffff8880b8f415f0 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 2, migratetype Unmovable, gfp_mask 0x40dc0(GFP_KERNEL|__GFP_COMP|__GFP_ZERO), pid 1, tgid 1 (swapper/0), ts 22882431793, free_ts 1142040970181 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2560 prep_new_page mm/page_alloc.c:2567 [inline] get_page_from_freelist+0x206b/0x2180 mm/page_alloc.c:4358 __alloc_pages+0x1ec/0x4f0 mm/page_alloc.c:5658 __alloc_pages_node include/linux/gfp.h:237 [inline] alloc_pages_node include/linux/gfp.h:260 [inline] __kmalloc_large_node+0x8c/0x1f0 mm/slab_common.c:1077 __do_kmalloc_node mm/slab_common.c:924 [inline] __kmalloc_node_track_caller+0x10f/0x240 mm/slab_common.c:956 alloc_dr drivers/base/devres.c:116 [inline] __devres_alloc_node+0x49/0x110 drivers/base/devres.c:164 snd_devm_card_new+0x74/0x150 sound/core/init.c:227 loopback_probe+0x14d/0x1a20 sound/drivers/aloop.c:1716 platform_probe+0x137/0x1c0 drivers/base/platform.c:1400 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x24a/0xb40 drivers/base/dd.c:638 __driver_probe_device+0x1f5/0x390 drivers/base/dd.c:804 driver_probe_device+0x4f/0x420 drivers/base/dd.c:834 __device_attach_driver+0x2c6/0x510 drivers/base/dd.c:962 bus_for_each_drv+0x184/0x210 drivers/base/bus.c:429 __device_attach+0x2a7/0x480 drivers/base/dd.c:1034 bus_probe_device+0xba/0x1d0 drivers/base/bus.c:489 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1487 [inline] free_pcp_prepare mm/page_alloc.c:1537 [inline] free_unref_page_prepare+0x8e5/0x9e0 mm/page_alloc.c:3414 free_unref_page+0x2e/0x3f0 mm/page_alloc.c:3509 free_large_kmalloc+0xfd/0x1a0 mm/slab_common.c:913 release_nodes drivers/base/devres.c:503 [inline] devres_release_all+0x1a9/0x230 drivers/base/devres.c:532 device_unbind_cleanup drivers/base/dd.c:529 [inline] __device_release_driver drivers/base/dd.c:1284 [inline] device_release_driver_internal+0x53b/0x7c0 drivers/base/dd.c:1305 unbind_store+0x2e2/0x300 drivers/base/bus.c:193 kernfs_fop_write_iter+0x3a0/0x520 fs/kernfs/file.c:352 call_write_iter include/linux/fs.h:2271 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x482/0x9a0 fs/read_write.c:584 ksys_write+0x14d/0x260 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Memory state around the buggy address: ffff88802ecf4c00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88802ecf4c80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88802ecf4d00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88802ecf4d80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88802ecf4e00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================