================================================================== BUG: KASAN: slab-out-of-bounds in create_monitor_event+0x826/0x8d0 net/bluetooth/hci_sock.c:491 Read of size 8 at addr ffff88810d66b5cf by task syz-executor.0/2323 CPU: 0 PID: 2323 Comm: syz-executor.0 Not tainted 6.6.0-rc1-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xf8/0x260 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0x163/0x540 mm/kasan/report.c:475 kasan_report+0x175/0x1b0 mm/kasan/report.c:588 create_monitor_event+0x826/0x8d0 net/bluetooth/hci_sock.c:491 send_monitor_replay+0x80/0x520 net/bluetooth/hci_sock.c:723 hci_sock_bind+0x730/0xeb0 net/bluetooth/hci_sock.c:1387 __sys_bind+0x230/0x2f0 net/socket.c:1832 __do_sys_bind net/socket.c:1843 [inline] __se_sys_bind net/socket.c:1841 [inline] __x64_sys_bind+0x75/0x80 net/socket.c:1841 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7feb0087cae9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007feb016690c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000031 RAX: ffffffffffffffda RBX: 00007feb0099bf80 RCX: 00007feb0087cae9 RDX: 0000000000000006 RSI: 0000000020000000 RDI: 0000000000000004 RBP: 00007feb008c847a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000006 R14: 00007feb0099bf80 R15: 00007fff57b31178 Allocated by task 1920: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4f/0x70 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:198 [inline] __do_kmalloc_node mm/slab_common.c:1023 [inline] __kmalloc_node_track_caller+0xab/0x1c0 mm/slab_common.c:1043 kvasprintf lib/kasprintf.c:25 [inline] kvasprintf_const+0xff/0x280 lib/kasprintf.c:49 kobject_set_name_vargs+0x5a/0xf0 lib/kobject.c:272 dev_set_name+0xd0/0x120 drivers/base/core.c:3427 hci_register_dev+0x10b/0x820 net/bluetooth/hci_core.c:2620 __vhci_create_device drivers/bluetooth/hci_vhci.c:434 [inline] vhci_create_device+0x336/0x670 drivers/bluetooth/hci_vhci.c:475 vhci_get_user drivers/bluetooth/hci_vhci.c:532 [inline] vhci_write+0x2cc/0x3c0 drivers/bluetooth/hci_vhci.c:612 call_write_iter include/linux/fs.h:1985 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x65b/0xcf0 fs/read_write.c:584 ksys_write+0x163/0x250 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff88810d66b5c8 which belongs to the cache kmalloc-8 of size 8 The buggy address is located 2 bytes to the right of allocated 5-byte region [ffff88810d66b5c8, ffff88810d66b5cd) The buggy address belongs to the physical page: page:ffffea0004359ac0 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88810d66b7a8 pfn:0x10d66b anon flags: 0x100000000000800(slab|node=0|zone=2) page_type: 0xffffffff() raw: 0100000000000800 ffff888100041280 0000000000000000 dead000000000001 raw: ffff88810d66b7a8 0000000080660036 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, tgid 1 (swapper/0), ts 2902305990, free_ts 0 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x26e/0x290 mm/page_alloc.c:1536 prep_new_page mm/page_alloc.c:1543 [inline] get_page_from_freelist+0x3baa/0x3da0 mm/page_alloc.c:3170 __alloc_pages+0x255/0x650 mm/page_alloc.c:4426 alloc_page_interleave+0xf/0x130 mm/mempolicy.c:2131 alloc_slab_page+0x6a/0x160 mm/slub.c:1870 allocate_slab mm/slub.c:2017 [inline] new_slab+0x70/0x260 mm/slub.c:2070 ___slab_alloc+0x833/0xd50 mm/slub.c:3223 __slab_alloc mm/slub.c:3322 [inline] __slab_alloc_node mm/slub.c:3375 [inline] slab_alloc_node mm/slub.c:3468 [inline] __kmem_cache_alloc_node+0x1a6/0x260 mm/slub.c:3517 __do_kmalloc_node mm/slab_common.c:1022 [inline] __kmalloc+0x99/0x1d0 mm/slab_common.c:1036 kmalloc include/linux/slab.h:603 [inline] kzalloc include/linux/slab.h:720 [inline] acpi_os_allocate_zeroed include/acpi/platform/aclinuxex.h:57 [inline] acpi_ns_internalize_name+0x39c/0x5a0 drivers/acpi/acpica/nsutils.c:331 acpi_ns_get_node_unlocked drivers/acpi/acpica/nsutils.c:666 [inline] acpi_ns_get_node+0x145/0x370 drivers/acpi/acpica/nsutils.c:726 acpi_ns_evaluate+0x348/0x8c0 drivers/acpi/acpica/nseval.c:62 acpi_evaluate_object+0x4d4/0x8e0 drivers/acpi/acpica/nsxfeval.c:354 acpi_evaluate_integer+0x112/0x290 drivers/acpi/utils.c:260 acpi_get_pxm drivers/acpi/numa/srat.c:554 [inline] acpi_get_node+0xf0/0x200 drivers/acpi/numa/srat.c:566 pci_acpi_root_get_node arch/x86/pci/acpi.c:333 [inline] pci_acpi_scan_root+0xa2/0x570 arch/x86/pci/acpi.c:415 page_owner free stack trace missing Memory state around the buggy address: ffff88810d66b480: fc fa fc fc fc fc fa fc fc fc fc fa fc fc fc fc ffff88810d66b500: 00 fc fc fc fc 00 fc fc fc fc 00 fc fc fc fc 05 >ffff88810d66b580: fc fc fc fc 05 fc fc fc fc 05 fc fc fc fc fa fc ^ ffff88810d66b600: fc fc fc fa fc fc fc fc fa fc fc fc fc 00 fc fc ffff88810d66b680: fc fc 00 fc fc fc fc 00 fc fc fc fc fb fc fc fc ==================================================================