================================================================== BUG: KASAN: slab-out-of-bounds in hci_le_ext_adv_report_evt net/bluetooth/hci_event.c:5933 [inline] BUG: KASAN: slab-out-of-bounds in hci_le_meta_evt+0xdd0/0x31c0 net/bluetooth/hci_event.c:6207 Read of size 1 at addr ffff0000d603ec04 by task kworker/u5:5/4042 CPU: 0 PID: 4042 Comm: kworker/u5:5 Not tainted 5.15.180-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Workqueue: hci1 hci_rx_work Call trace: dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 print_address_description+0x7c/0x3f0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0x174/0x1e4 mm/kasan/report.c:451 __asan_report_load1_noabort+0x44/0x50 mm/kasan/report_generic.c:306 hci_le_ext_adv_report_evt net/bluetooth/hci_event.c:5933 [inline] hci_le_meta_evt+0xdd0/0x31c0 net/bluetooth/hci_event.c:6207 hci_event_packet+0xd34/0x12b4 net/bluetooth/hci_event.c:6524 hci_rx_work+0x1d0/0x830 net/bluetooth/hci_core.c:5160 process_one_work+0x790/0x11b8 kernel/workqueue.c:2310 worker_thread+0x910/0x1034 kernel/workqueue.c:2457 kthread+0x37c/0x45c kernel/kthread.c:334 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870 Allocated by task 5787: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc+0xbc/0xfc mm/kasan/common.c:513 __kasan_kmalloc+0x10/0x1c mm/kasan/common.c:522 kasan_kmalloc include/linux/kasan.h:264 [inline] __kmalloc_node_track_caller+0x234/0x448 mm/slub.c:4963 kmalloc_reserve+0xe8/0x270 net/core/skbuff.c:356 __alloc_skb+0x1a4/0x584 net/core/skbuff.c:427 alloc_skb include/linux/skbuff.h:1162 [inline] bt_skb_alloc include/net/bluetooth/bluetooth.h:391 [inline] vhci_get_user drivers/bluetooth/hci_vhci.c:170 [inline] vhci_write+0xb8/0x3b8 drivers/bluetooth/hci_vhci.c:290 call_write_iter include/linux/fs.h:2172 [inline] new_sync_write fs/read_write.c:507 [inline] vfs_write+0x884/0xb44 fs/read_write.c:594 ksys_write+0x15c/0x26c fs/read_write.c:647 __do_sys_write fs/read_write.c:659 [inline] __se_sys_write fs/read_write.c:656 [inline] __arm64_sys_write+0x7c/0x90 fs/read_write.c:656 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 Last potentially related work creation: kasan_save_stack+0x38/0x68 mm/kasan/common.c:38 kasan_record_aux_stack+0xd4/0x11c mm/kasan/generic.c:348 kvfree_call_rcu+0xb8/0x684 kernel/rcu/tree.c:3596 batadv_hardif_release net/batman-adv/hard-interface.c:54 [inline] kref_put include/linux/kref.h:65 [inline] batadv_hardif_put+0x100/0x19c net/batman-adv/hard-interface.h:95 batadv_hard_if_event+0x678/0xe10 net/batman-adv/hard-interface.c:1008 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xd4/0x164 kernel/notifier.c:391 call_netdevice_notifiers_info net/core/dev.c:2049 [inline] call_netdevice_notifiers_extack net/core/dev.c:2061 [inline] call_netdevice_notifiers net/core/dev.c:2075 [inline] unregister_netdevice_many+0xec8/0x18a8 net/core/dev.c:11133 unregister_netdevice_queue+0x2d0/0x31c net/core/dev.c:11066 unregister_netdevice include/linux/netdevice.h:3020 [inline] _cfg80211_unregister_wdev+0x168/0x4a8 net/wireless/core.c:1129 cfg80211_unregister_wdev+0x24/0x34 net/wireless/core.c:1174 ieee80211_if_remove+0x1a4/0x294 net/mac80211/iface.c:2105 ieee80211_del_iface+0x20/0x34 net/mac80211/cfg.c:145 rdev_del_virtual_intf net/wireless/rdev-ops.h:57 [inline] nl80211_del_interface+0x1dc/0x66c net/wireless/nl80211.c:4118 genl_family_rcv_msg_doit net/netlink/genetlink.c:731 [inline] genl_family_rcv_msg net/netlink/genetlink.c:775 [inline] genl_rcv_msg+0xc48/0x1044 net/netlink/genetlink.c:792 netlink_rcv_skb+0x20c/0x3b8 net/netlink/af_netlink.c:2489 genl_rcv+0x38/0x50 net/netlink/genetlink.c:803 netlink_unicast_kernel net/netlink/af_netlink.c:1311 [inline] netlink_unicast+0x664/0x938 net/netlink/af_netlink.c:1337 netlink_sendmsg+0x844/0xb38 net/netlink/af_netlink.c:1905 sock_sendmsg_nosec net/socket.c:704 [inline] __sock_sendmsg net/socket.c:716 [inline] ____sys_sendmsg+0x584/0x870 net/socket.c:2436 ___sys_sendmsg+0x214/0x294 net/socket.c:2490 __sys_sendmsg net/socket.c:2519 [inline] __do_sys_sendmsg net/socket.c:2528 [inline] __se_sys_sendmsg net/socket.c:2526 [inline] __arm64_sys_sendmsg+0x1ac/0x25c net/socket.c:2526 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 The buggy address belongs to the object at ffff0000d603e800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 4 bytes to the right of 1024-byte region [ffff0000d603e800, ffff0000d603ec00) The buggy address belongs to the page: page:00000000b0a6ea07 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x116038 head:00000000b0a6ea07 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000010200 fffffc000357be00 0000000200000002 ffff0000c0002780 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000d603eb00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff0000d603eb80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff0000d603ec00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff0000d603ec80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000d603ed00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== Bluetooth: hci1: Unknown advertising packet type: 0x7000