================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:373 [inline] BUG: KASAN: slab-out-of-bounds in hci_inquiry_result_evt net/bluetooth/hci_event.c:2375 [inline] BUG: KASAN: slab-out-of-bounds in hci_event_packet+0x3dbf/0x858f net/bluetooth/hci_event.c:5747 Read of size 3 at addr ffff88809eba5cbf by task kworker/u5:4/10085 CPU: 1 PID: 10085 Comm: kworker/u5:4 Not tainted 4.19.136-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: hci2 hci_rx_work Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2fe lib/dump_stack.c:118 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256 kasan_report_error.cold+0x8a/0x1c7 mm/kasan/report.c:354 kasan_report+0x8f/0x96 mm/kasan/report.c:412 memcpy+0x20/0x50 mm/kasan/kasan.c:302 memcpy include/linux/string.h:373 [inline] hci_inquiry_result_evt net/bluetooth/hci_event.c:2375 [inline] hci_event_packet+0x3dbf/0x858f net/bluetooth/hci_event.c:5747 hci_rx_work+0x46b/0xa90 net/bluetooth/hci_core.c:4359 process_one_work+0x864/0x1570 kernel/workqueue.c:2155 worker_thread+0x64c/0x1130 kernel/workqueue.c:2298 kthread+0x30b/0x410 kernel/kthread.c:246 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 Allocated by task 10211: __do_kmalloc_node mm/slab.c:3689 [inline] __kmalloc_node_track_caller+0x4c/0x70 mm/slab.c:3703 __kmalloc_reserve net/core/skbuff.c:137 [inline] __alloc_skb+0xae/0x560 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/0x450 drivers/bluetooth/hci_vhci.c:299 call_write_iter include/linux/fs.h:1821 [inline] new_sync_write fs/read_write.c:474 [inline] __vfs_write+0x51b/0x770 fs/read_write.c:487 vfs_write+0x1f3/0x540 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 3715: __cache_free mm/slab.c:3503 [inline] kfree+0xcc/0x210 mm/slab.c:3822 skb_free_head net/core/skbuff.c:554 [inline] skb_release_data+0x6de/0x920 net/core/skbuff.c:574 skb_release_all net/core/skbuff.c:631 [inline] __kfree_skb net/core/skbuff.c:645 [inline] consume_skb+0x113/0x3d0 net/core/skbuff.c:705 skb_free_datagram+0x16/0xf0 net/core/datagram.c:329 unix_dgram_recvmsg+0x73e/0xe80 net/unix/af_unix.c:2203 sock_recvmsg_nosec net/socket.c:795 [inline] sock_recvmsg net/socket.c:802 [inline] sock_recvmsg+0xca/0x110 net/socket.c:798 ___sys_recvmsg+0x255/0x570 net/socket.c:2277 __sys_recvmsg net/socket.c:2326 [inline] __do_sys_recvmsg net/socket.c:2336 [inline] __se_sys_recvmsg net/socket.c:2333 [inline] __x64_sys_recvmsg+0x12f/0x220 net/socket.c:2333 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff88809eba5ac0 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 511 bytes inside of 512-byte region [ffff88809eba5ac0, ffff88809eba5cc0) The buggy address belongs to the page: page:ffffea00027ae940 count:1 mapcount:0 mapping:ffff88812c39c940 index:0xffff88809eba5d40 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffffea0002804448 ffffea0002277d08 ffff88812c39c940 raw: ffff88809eba5d40 ffff88809eba50c0 0000000100000002 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809eba5b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88809eba5c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88809eba5c80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ^ ffff88809eba5d00: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff88809eba5d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== Bluetooth: hci5: SCO packet for unknown connection handle 48904 kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 7744 Comm: kworker/u5:2 Tainted: G B 4.19.136-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: hci5 hci_rx_work RIP: 0010:hci_phy_link_complete_evt.isra.0+0x24a/0x7a0 net/bluetooth/hci_event.c:4682 Code: 48 c1 ea 03 80 3c 02 00 0f 85 60 05 00 00 48 8b 9d 28 08 00 00 48 b8 00 00 00 00 00 fc ff df 48 8d 7b 10 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 23 05 00 00 48 b8 00 00 00 00 00 fc ff df 48 8b RSP: 0018:ffff888052fd7a78 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff867c041f RDX: 0000000000000002 RSI: ffffffff867c042c RDI: 0000000000000010 RBP: ffff88804e47e740 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000001 R11: 000000002616cc40 R12: dffffc0000000000 R13: ffff88804ebdd7c0 R14: 00000000000000c8 R15: ffff88804ebdc890 FS: 0000000000000000(0000) GS:ffff8880ae700000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000000052a178 CR3: 000000009948e000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: hci_event_packet+0x1973/0x858f net/bluetooth/hci_event.c:5898 hci_rx_work+0x46b/0xa90 net/bluetooth/hci_core.c:4359 process_one_work+0x864/0x1570 kernel/workqueue.c:2155 worker_thread+0x64c/0x1130 kernel/workqueue.c:2298 kthread+0x30b/0x410 kernel/kthread.c:246 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 Modules linked in: ---[ end trace 9bb89ceb325031ac ]--- RIP: 0010:hci_phy_link_complete_evt.isra.0+0x24a/0x7a0 net/bluetooth/hci_event.c:4682 Code: 48 c1 ea 03 80 3c 02 00 0f 85 60 05 00 00 48 8b 9d 28 08 00 00 48 b8 00 00 00 00 00 fc ff df 48 8d 7b 10 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 23 05 00 00 48 b8 00 00 00 00 00 fc ff df 48 8b