================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:380 [inline] BUG: KASAN: slab-out-of-bounds in bacpy+0xe/0x10 include/net/bluetooth/bluetooth.h:236 Read of size 6 at addr ffff8880a538bdfb by task kworker/u5:0/1525 CPU: 1 PID: 1525 Comm: kworker/u5:0 Not tainted 5.5.0-rc1-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+0x12d/0x187 lib/dump_stack.c:118 print_address_description.constprop.8.cold.10+0x9/0x31d mm/kasan/report.c:374 __kasan_report.cold.11+0x1b/0x3a mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:639 check_memory_region_inline mm/kasan/generic.c:185 [inline] check_memory_region+0x153/0x1d0 mm/kasan/generic.c:192 memcpy+0x23/0x50 mm/kasan/common.c:125 memcpy include/linux/string.h:380 [inline] bacpy+0xe/0x10 include/net/bluetooth/bluetooth.h:236 hci_inquiry_result_with_rssi_evt net/bluetooth/hci_event.c:4070 [inline] hci_event_packet+0x1d09/0x9a96 net/bluetooth/hci_event.c:5947 hci_rx_work+0x53d/0x930 net/bluetooth/hci_core.c:4491 process_one_work+0x85b/0x1630 kernel/workqueue.c:2264 worker_thread+0x85/0xb60 kernel/workqueue.c:2410 kthread+0x334/0x3f0 kernel/kthread.c:255 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352 Allocated by task 7418: save_stack+0x21/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc.constprop.9+0xc7/0xd0 mm/kasan/common.c:513 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:527 __do_kmalloc_node mm/slab.c:3616 [inline] __kmalloc_node_track_caller+0x4d/0x70 mm/slab.c:3630 __kmalloc_reserve.isra.46+0x2c/0xc0 net/core/skbuff.c:141 __alloc_skb+0xd7/0x570 net/core/skbuff.c:209 alloc_skb include/linux/skbuff.h:1049 [inline] bt_skb_alloc include/net/bluetooth/bluetooth.h:339 [inline] vhci_get_user drivers/bluetooth/hci_vhci.c:165 [inline] vhci_write+0xa8/0x3e0 drivers/bluetooth/hci_vhci.c:284 call_write_iter include/linux/fs.h:1902 [inline] new_sync_write+0x402/0x7e0 fs/read_write.c:483 __vfs_write+0x97/0x110 fs/read_write.c:496 vfs_write+0x18a/0x520 fs/read_write.c:558 ksys_write+0x105/0x220 fs/read_write.c:611 __do_sys_write fs/read_write.c:623 [inline] __se_sys_write fs/read_write.c:620 [inline] __x64_sys_write+0x6e/0xb0 fs/read_write.c:620 do_syscall_64+0xd0/0x600 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 6615: save_stack+0x21/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] kasan_set_free_info mm/kasan/common.c:335 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:474 kasan_slab_free+0xe/0x10 mm/kasan/common.c:483 __cache_free mm/slab.c:3426 [inline] kfree+0x108/0x2c0 mm/slab.c:3757 free_bprm+0x170/0x1d0 fs/exec.c:1433 __do_execve_file.isra.34+0x17cf/0x1fd0 fs/exec.c:1831 do_execveat_common fs/exec.c:1867 [inline] do_execve fs/exec.c:1884 [inline] __do_sys_execve fs/exec.c:1960 [inline] __se_sys_execve fs/exec.c:1955 [inline] __x64_sys_execve+0x8a/0xb0 fs/exec.c:1955 do_syscall_64+0xd0/0x600 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8880a538bc00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 507 bytes inside of 512-byte region [ffff8880a538bc00, ffff8880a538be00) The buggy address belongs to the page: page:ffffea000294e2c0 refcount:1 mapcount:0 mapping:ffff8880aa800a80 index:0x0 raw: 01fffc0000000200 ffffea0002656708 ffffea0002a774c8 ffff8880aa800a80 raw: 0000000000000000 ffff8880a538b000 0000000100000004 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a538bd00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880a538bd80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880a538be00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880a538be80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a538bf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================