================================================================== BUG: KASAN: slab-out-of-bounds in create_monitor_event+0x7a8/0x84c net/bluetooth/hci_sock.c:491 Read of size 8 at addr ffff0000c7102acf by task syz-executor.4/7908 CPU: 0 PID: 7908 Comm: syz-executor.4 Not tainted 6.6.0-rc6-syzkaller-g78124b0c1d10 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023 Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:233 show_stack+0x2c/0x44 arch/arm64/kernel/stacktrace.c:240 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd0/0x124 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0x174/0x514 mm/kasan/report.c:475 kasan_report+0xd8/0x138 mm/kasan/report.c:588 __asan_report_load_n_noabort+0x1c/0x28 mm/kasan/report_generic.c:391 create_monitor_event+0x7a8/0x84c net/bluetooth/hci_sock.c:491 send_monitor_replay+0x88/0x52c net/bluetooth/hci_sock.c:723 hci_sock_bind+0x464/0xe88 net/bluetooth/hci_sock.c:1387 __sys_bind+0x1e8/0x284 net/socket.c:1849 __do_sys_bind net/socket.c:1860 [inline] __se_sys_bind net/socket.c:1858 [inline] __arm64_sys_bind+0x7c/0x94 net/socket.c:1858 __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155 el0_svc+0x54/0x158 arch/arm64/kernel/entry-common.c:678 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595 Allocated by task 6070: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4c/0x7c mm/kasan/common.c:52 kasan_save_alloc_info+0x24/0x30 mm/kasan/generic.c:511 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0xac/0xc4 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+0xd0/0x1c0 mm/slab_common.c:1043 kvasprintf+0x108/0x1dc lib/kasprintf.c:25 kvasprintf_const+0xdc/0x230 lib/kasprintf.c:49 kobject_set_name_vargs+0xd0/0x1b8 lib/kobject.c:272 dev_set_name+0xe0/0x12c drivers/base/core.c:3427 hci_register_dev+0x14c/0x954 net/bluetooth/hci_core.c:2620 __vhci_create_device drivers/bluetooth/hci_vhci.c:434 [inline] vhci_create_device+0x358/0x6c4 drivers/bluetooth/hci_vhci.c:475 vhci_get_user drivers/bluetooth/hci_vhci.c:532 [inline] vhci_write+0x318/0x3b8 drivers/bluetooth/hci_vhci.c:612 call_write_iter include/linux/fs.h:1956 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x628/0x93c fs/read_write.c:584 ksys_write+0x15c/0x26c fs/read_write.c:637 __do_sys_write fs/read_write.c:649 [inline] __se_sys_write fs/read_write.c:646 [inline] __arm64_sys_write+0x7c/0x90 fs/read_write.c:646 __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155 el0_svc+0x54/0x158 arch/arm64/kernel/entry-common.c:678 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595 The buggy address belongs to the object at ffff0000c7102ac8 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 [ffff0000c7102ac8, ffff0000c7102acd) The buggy address belongs to the physical page: page:00000000a350502f refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107102 flags: 0x5ffc00000000800(slab|node=0|zone=2|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 05ffc00000000800 ffff0000c0001280 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000660066 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000c7102980: fc 06 fc fc fc fc 05 fc fc fc fc 02 fc fc fc fc ffff0000c7102a00: fa fc fc fc fc 06 fc fc fc fc 06 fc fc fc fc 06 >ffff0000c7102a80: fc fc fc fc 05 fc fc fc fc 05 fc fc fc fc 05 fc ^ ffff0000c7102b00: fc fc fc 06 fc fc fc fc 06 fc fc fc fc 06 fc fc ffff0000c7102b80: fc fc 05 fc fc fc fc 05 fc fc fc fc fa fc fc fc ==================================================================