================================================================== BUG: KASAN: slab-use-after-free in msft_opcode_get+0x6d/0x80 drivers/bluetooth/hci_vhci.c:222 Read of size 2 at addr ffff88807489ea32 by task syz.0.2564/19086 CPU: 1 UID: 0 PID: 19086 Comm: syz.0.2564 Not tainted 6.15.0-syzkaller-13473-gc0c9379f235d #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0xcd/0x680 mm/kasan/report.c:521 kasan_report+0xe0/0x110 mm/kasan/report.c:634 msft_opcode_get+0x6d/0x80 drivers/bluetooth/hci_vhci.c:222 simple_attr_read+0x16b/0x370 fs/libfs.c:1335 debugfs_attr_read+0x76/0xa0 fs/debugfs/file.c:534 full_proxy_read+0x13c/0x200 fs/debugfs/file.c:393 vfs_read+0x1e1/0xc60 fs/read_write.c:570 ksys_read+0x12a/0x250 fs/read_write.c:715 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x490 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f48ee38e929 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:00007f48ef121038 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 00007f48ee5b5fa0 RCX: 00007f48ee38e929 RDX: 000000000000ffff RSI: 0000200000006740 RDI: 0000000000000004 RBP: 00007f48ee410b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f48ee5b5fa0 R15: 00007fff1ca144d8 Allocated by task 18925: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:394 kmalloc_noprof include/linux/slab.h:905 [inline] snd_pcm_hw_param_near.constprop.0+0xbc/0x8e0 sound/core/oss/pcm_oss.c:400 snd_pcm_oss_change_params_locked+0x13f9/0x3a30 sound/core/oss/pcm_oss.c:958 snd_pcm_oss_change_params sound/core/oss/pcm_oss.c:1104 [inline] snd_pcm_oss_make_ready+0xe6/0x1b0 sound/core/oss/pcm_oss.c:1163 snd_pcm_oss_sync+0x1de/0x840 sound/core/oss/pcm_oss.c:1729 snd_pcm_oss_release+0x28b/0x310 sound/core/oss/pcm_oss.c:2574 __fput+0x402/0xb70 fs/file_table.c:465 task_work_run+0x150/0x240 kernel/task_work.c:227 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop+0xeb/0x110 kernel/entry/common.c:114 exit_to_user_mode_prepare include/linux/entry-common.h:330 [inline] syscall_exit_to_user_mode_work include/linux/entry-common.h:414 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:449 [inline] do_syscall_64+0x3f6/0x490 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 18925: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x51/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2381 [inline] slab_free mm/slub.c:4643 [inline] kfree+0x2b4/0x4d0 mm/slub.c:4842 __free_kfree include/linux/slab.h:476 [inline] snd_pcm_hw_param_near.constprop.0+0x72f/0x8e0 sound/core/oss/pcm_oss.c:380 snd_pcm_oss_change_params_locked+0x13f9/0x3a30 sound/core/oss/pcm_oss.c:958 snd_pcm_oss_change_params sound/core/oss/pcm_oss.c:1104 [inline] snd_pcm_oss_make_ready+0xe6/0x1b0 sound/core/oss/pcm_oss.c:1163 snd_pcm_oss_sync+0x1de/0x840 sound/core/oss/pcm_oss.c:1729 snd_pcm_oss_release+0x28b/0x310 sound/core/oss/pcm_oss.c:2574 __fput+0x402/0xb70 fs/file_table.c:465 task_work_run+0x150/0x240 kernel/task_work.c:227 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop+0xeb/0x110 kernel/entry/common.c:114 exit_to_user_mode_prepare include/linux/entry-common.h:330 [inline] syscall_exit_to_user_mode_work include/linux/entry-common.h:414 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:449 [inline] do_syscall_64+0x3f6/0x490 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88807489e800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 562 bytes inside of freed 1024-byte region [ffff88807489e800, ffff88807489ec00) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x74898 head: order:3 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 ffff88801b441dc0 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88801b441dc0 dead000000000100 dead000000000122 head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 00fff00000000003 ffffea0001d22601 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5824, tgid 5824 (sh), ts 83241120334, free_ts 81733604983 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1704 prep_new_page mm/page_alloc.c:1712 [inline] get_page_from_freelist+0x1321/0x3890 mm/page_alloc.c:3669 __alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:4959 alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2419 alloc_slab_page mm/slub.c:2451 [inline] allocate_slab mm/slub.c:2619 [inline] new_slab+0x23b/0x330 mm/slub.c:2673 ___slab_alloc+0xd9c/0x1940 mm/slub.c:3859 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3949 __slab_alloc_node mm/slub.c:4024 [inline] slab_alloc_node mm/slub.c:4185 [inline] __do_kmalloc_node mm/slub.c:4327 [inline] __kmalloc_noprof+0x2f2/0x510 mm/slub.c:4340 kmalloc_noprof include/linux/slab.h:909 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] tomoyo_init_log+0x1385/0x2140 security/tomoyo/audit.c:275 tomoyo_supervisor+0x302/0x13b0 security/tomoyo/common.c:2198 tomoyo_audit_env_log security/tomoyo/environ.c:36 [inline] tomoyo_env_perm+0x191/0x200 security/tomoyo/environ.c:63 tomoyo_environ security/tomoyo/domain.c:672 [inline] tomoyo_find_next_domain+0xec2/0x20b0 security/tomoyo/domain.c:888 tomoyo_bprm_check_security security/tomoyo/tomoyo.c:102 [inline] tomoyo_bprm_check_security+0x12e/0x1d0 security/tomoyo/tomoyo.c:92 security_bprm_check+0x1b9/0x1e0 security/security.c:1302 search_binary_handler fs/exec.c:1655 [inline] exec_binprm fs/exec.c:1697 [inline] bprm_execve fs/exec.c:1749 [inline] bprm_execve+0x810/0x1650 fs/exec.c:1725 do_execveat_common.isra.0+0x4a5/0x610 fs/exec.c:1855 page last free pid 5500 tgid 5500 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1248 [inline] __free_frozen_pages+0x7fe/0x1180 mm/page_alloc.c:2706 discard_slab mm/slub.c:2717 [inline] __put_partials+0x16d/0x1c0 mm/slub.c:3186 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4d/0x120 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4148 [inline] slab_alloc_node mm/slub.c:4197 [inline] kmem_cache_alloc_node_noprof+0x1d5/0x3b0 mm/slub.c:4249 __alloc_skb+0x2b2/0x380 net/core/skbuff.c:660 alloc_skb include/linux/skbuff.h:1336 [inline] alloc_skb_with_frags+0xe0/0x860 net/core/skbuff.c:6668 sock_alloc_send_pskb+0x7fb/0x990 net/core/sock.c:2999 unix_dgram_sendmsg+0x41a/0x1840 net/unix/af_unix.c:2071 unix_seqpacket_sendmsg+0x12a/0x1c0 net/unix/af_unix.c:2457 sock_sendmsg_nosec net/socket.c:712 [inline] __sock_sendmsg net/socket.c:727 [inline] sock_write_iter+0x4fc/0x5b0 net/socket.c:1131 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x6c4/0x1150 fs/read_write.c:686 ksys_write+0x1f8/0x250 fs/read_write.c:738 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x490 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff88807489e900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88807489e980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88807489ea00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88807489ea80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88807489eb00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================