================================================================== BUG: KASAN: slab-out-of-bounds in hci_extended_inquiry_result_evt net/bluetooth/hci_event.c:4162 [inline] BUG: KASAN: slab-out-of-bounds in hci_event_packet+0x48f5/0xa9d9 net/bluetooth/hci_event.c:5844 Read of size 6 at addr ffff8880927c42c8 by task kworker/u5:5/9998 CPU: 1 PID: 9998 Comm: kworker/u5:5 Not tainted 4.19.109-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: hci0 hci_rx_work Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x188/0x20d lib/dump_stack.c:118 print_address_description.cold+0x7c/0x212 mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report mm/kasan/report.c:412 [inline] kasan_report.cold+0x88/0x2b9 mm/kasan/report.c:396 memcpy+0x20/0x50 mm/kasan/kasan.c:302 hci_extended_inquiry_result_evt net/bluetooth/hci_event.c:4162 [inline] hci_event_packet+0x48f5/0xa9d9 net/bluetooth/hci_event.c:5844 hci_rx_work+0x47b/0xab0 net/bluetooth/hci_core.c:4359 process_one_work+0x91f/0x1640 kernel/workqueue.c:2153 worker_thread+0x96/0xe20 kernel/workqueue.c:2296 kthread+0x34a/0x420 kernel/kthread.c:246 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 Allocated by task 10583: set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc mm/kasan/kasan.c:553 [inline] kasan_kmalloc+0xbf/0xe0 mm/kasan/kasan.c:531 __do_kmalloc_node mm/slab.c:3689 [inline] __kmalloc_node_track_caller+0x4c/0x70 mm/slab.c:3703 __kmalloc_reserve.isra.0+0x39/0xe0 net/core/skbuff.c:137 __alloc_skb+0xef/0x5b0 net/core/skbuff.c:205 alloc_skb include/linux/skbuff.h:995 [inline] bt_skb_alloc include/net/bluetooth/bluetooth.h:339 [inline] vhci_get_user drivers/bluetooth/hci_vhci.c:180 [inline] vhci_write+0xbd/0x460 drivers/bluetooth/hci_vhci.c:299 call_write_iter include/linux/fs.h:1820 [inline] new_sync_write fs/read_write.c:474 [inline] __vfs_write+0x512/0x760 fs/read_write.c:487 vfs_write+0x206/0x550 fs/read_write.c:549 ksys_write+0x12b/0x2a0 fs/read_write.c:599 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 10447: set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0xf7/0x140 mm/kasan/kasan.c:521 __cache_free mm/slab.c:3503 [inline] kfree+0xce/0x220 mm/slab.c:3822 skb_free_head+0x91/0xb0 net/core/skbuff.c:554 skb_release_data+0x600/0x8c0 net/core/skbuff.c:574 skb_release_all+0x46/0x60 net/core/skbuff.c:631 __kfree_skb net/core/skbuff.c:645 [inline] kfree_skb net/core/skbuff.c:663 [inline] kfree_skb+0xe1/0x390 net/core/skbuff.c:657 skb_queue_purge+0x14/0x30 net/core/skbuff.c:2858 netlink_sock_destruct+0x101/0x280 net/netlink/af_netlink.c:403 __sk_destruct+0x4c/0x780 net/core/sock.c:1558 sk_destruct+0xb9/0xf0 net/core/sock.c:1598 __sk_free+0xc2/0x2e0 net/core/sock.c:1609 sk_free+0x3b/0x50 net/core/sock.c:1620 deferred_put_nlk_sk+0x10d/0x280 net/netlink/af_netlink.c:743 __rcu_reclaim kernel/rcu/rcu.h:236 [inline] rcu_do_batch kernel/rcu/tree.c:2584 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2897 [inline] __rcu_process_callbacks kernel/rcu/tree.c:2864 [inline] rcu_process_callbacks+0xb2d/0x17f0 kernel/rcu/tree.c:2881 __do_softirq+0x26c/0x93c kernel/softirq.c:292 The buggy address belongs to the object at ffff8880927c40c0 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 8 bytes to the right of 512-byte region [ffff8880927c40c0, ffff8880927c42c0) The buggy address belongs to the page: page:ffffea000249f100 count:1 mapcount:0 mapping:ffff88812c3dc940 index:0xffff8880927c4d40 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffffea00014b6608 ffffea00022f0d88 ffff88812c3dc940 raw: ffff8880927c4d40 ffff8880927c40c0 0000000100000005 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880927c4180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880927c4200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880927c4280: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ^ ffff8880927c4300: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ffff8880927c4380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================