================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:359 [inline] BUG: KASAN: slab-out-of-bounds in bacpy+0x23/0x30 include/net/bluetooth/bluetooth.h:236 Read of size 6 at addr ffff888095059c3b by task kworker/u5:0/1502 CPU: 0 PID: 1502 Comm: kworker/u5:0 Not tainted 5.1.0-rc7-next-20190501 #34 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+0x172/0x1f0 lib/dump_stack.c:113 print_address_description.cold+0x7c/0x20d mm/kasan/report.c:188 __kasan_report.cold+0x1b/0x40 mm/kasan/report.c:317 kasan_report+0x12/0x20 mm/kasan/common.c:614 check_memory_region_inline mm/kasan/generic.c:185 [inline] check_memory_region+0x123/0x190 mm/kasan/generic.c:191 memcpy+0x24/0x50 mm/kasan/common.c:124 memcpy include/linux/string.h:359 [inline] bacpy+0x23/0x30 include/net/bluetooth/bluetooth.h:236 hci_inquiry_result_with_rssi_evt net/bluetooth/hci_event.c:3986 [inline] hci_event_packet+0x4e86/0xaabf net/bluetooth/hci_event.c:5863 hci_rx_work+0x440/0xaa0 net/bluetooth/hci_core.c:4456 process_one_work+0x98e/0x1790 kernel/workqueue.c:2268 worker_thread+0x98/0xe40 kernel/workqueue.c:2414 kthread+0x357/0x430 kernel/kthread.c:254 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352 Allocated by task 7974: save_stack+0x23/0x90 mm/kasan/common.c:71 set_track mm/kasan/common.c:79 [inline] __kasan_kmalloc mm/kasan/common.c:489 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:462 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:503 __do_kmalloc_node mm/slab.c:3650 [inline] __kmalloc_node_track_caller+0x4e/0x70 mm/slab.c:3664 __kmalloc_reserve.isra.0+0x40/0xf0 net/core/skbuff.c:142 __alloc_skb+0x10b/0x5e0 net/core/skbuff.c:210 alloc_skb include/linux/skbuff.h:1058 [inline] bt_skb_alloc include/net/bluetooth/bluetooth.h:339 [inline] vhci_get_user drivers/bluetooth/hci_vhci.c:180 [inline] vhci_write+0xc4/0x470 drivers/bluetooth/hci_vhci.c:299 call_write_iter include/linux/fs.h:1866 [inline] new_sync_write+0x4c7/0x760 fs/read_write.c:474 __vfs_write+0xe4/0x110 fs/read_write.c:487 vfs_write+0x20c/0x580 fs/read_write.c:549 ksys_write+0x14f/0x2d0 fs/read_write.c:599 __do_sys_write fs/read_write.c:611 [inline] __se_sys_write fs/read_write.c:608 [inline] __x64_sys_write+0x73/0xb0 fs/read_write.c:608 do_syscall_64+0x103/0x670 arch/x86/entry/common.c:298 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 0: (stack is not available) The buggy address belongs to the object at ffff888095059a40 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 507 bytes inside of 512-byte region [ffff888095059a40, ffff888095059c40) The buggy address belongs to the page: page:ffffea0002541640 count:1 mapcount:0 mapping:ffff8880aa400940 index:0x0 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea0002641c48 ffff8880aa401748 ffff8880aa400940 raw: 0000000000000000 ffff888095059040 0000000100000006 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888095059b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888095059b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888095059c00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ^ ffff888095059c80: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ffff888095059d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================