================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:426 [inline] BUG: KASAN: slab-out-of-bounds in bacpy+0x23/0x30 include/net/bluetooth/bluetooth.h:238 Read of size 6 at addr ffff8880a6ce3e08 by task kworker/u5:1/10107 CPU: 0 PID: 10107 Comm: kworker/u5:1 Not tainted 5.5.0-rc5-next-20200107-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+0x197/0x210 lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd4/0x30b mm/kasan/report.c:374 __kasan_report.cold+0x1b/0x32 mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:641 check_memory_region_inline mm/kasan/generic.c:185 [inline] check_memory_region+0x134/0x1a0 mm/kasan/generic.c:192 memcpy+0x24/0x50 mm/kasan/common.c:127 memcpy include/linux/string.h:426 [inline] bacpy+0x23/0x30 include/net/bluetooth/bluetooth.h:238 hci_extended_inquiry_result_evt net/bluetooth/hci_event.c:4281 [inline] hci_event_packet+0x5efc/0xa991 net/bluetooth/hci_event.c:5984 hci_rx_work+0x4b7/0xb20 net/bluetooth/hci_core.c:4491 process_one_work+0x9af/0x1740 kernel/workqueue.c:2264 worker_thread+0x98/0xe40 kernel/workqueue.c:2410 kthread+0x361/0x430 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 Allocated by task 10125: save_stack+0x23/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc mm/kasan/common.c:515 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:488 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:529 __do_kmalloc_node mm/slab.c:3616 [inline] __kmalloc_node_track_caller+0x4e/0x70 mm/slab.c:3630 __kmalloc_reserve.isra.0+0x40/0xf0 net/core/skbuff.c:141 __alloc_skb+0x10b/0x5e0 net/core/skbuff.c:209 alloc_skb include/linux/skbuff.h:1049 [inline] bt_skb_alloc include/net/bluetooth/bluetooth.h:341 [inline] vhci_get_user drivers/bluetooth/hci_vhci.c:165 [inline] vhci_write+0xc4/0x470 drivers/bluetooth/hci_vhci.c:284 call_write_iter include/linux/fs.h:1901 [inline] new_sync_write+0x4d3/0x770 fs/read_write.c:483 __vfs_write+0xe1/0x110 fs/read_write.c:496 vfs_write+0x268/0x5d0 fs/read_write.c:558 ksys_write+0x14f/0x290 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+0x73/0xb0 fs/read_write.c:620 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 8986: save_stack+0x23/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] kasan_set_free_info mm/kasan/common.c:337 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:476 kasan_slab_free+0xe/0x10 mm/kasan/common.c:485 __cache_free mm/slab.c:3426 [inline] kfree+0x10a/0x2c0 mm/slab.c:3757 tomoyo_supervisor+0x2fe/0xe60 security/tomoyo/common.c:2149 tomoyo_audit_path_log security/tomoyo/file.c:168 [inline] tomoyo_path_permission security/tomoyo/file.c:587 [inline] tomoyo_path_permission+0x263/0x360 security/tomoyo/file.c:573 tomoyo_path_perm+0x318/0x430 security/tomoyo/file.c:838 tomoyo_inode_getattr+0x1d/0x30 security/tomoyo/tomoyo.c:129 security_inode_getattr+0xf2/0x150 security/security.c:1255 vfs_getattr+0x25/0x70 fs/stat.c:117 vfs_statx_fd+0x71/0xc0 fs/stat.c:147 vfs_fstat include/linux/fs.h:3264 [inline] __do_sys_newfstat+0x9b/0x120 fs/stat.c:388 __se_sys_newfstat fs/stat.c:385 [inline] __x64_sys_newfstat+0x54/0x80 fs/stat.c:385 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8880a6ce3c00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 8 bytes to the right of 512-byte region [ffff8880a6ce3c00, ffff8880a6ce3e00) The buggy address belongs to the page: page:ffffea00029b38c0 refcount:1 mapcount:0 mapping:ffff8880aa400a80 index:0x0 raw: 00fffe0000000200 ffffea00029fbd48 ffffea0002633fc8 ffff8880aa400a80 raw: 0000000000000000 ffff8880a6ce3000 0000000100000004 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a6ce3d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880a6ce3d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880a6ce3e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880a6ce3e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a6ce3f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================