================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:347 [inline] BUG: KASAN: slab-out-of-bounds in bacpy include/net/bluetooth/bluetooth.h:233 [inline] BUG: KASAN: slab-out-of-bounds in hci_inquiry_result_with_rssi_evt net/bluetooth/hci_event.c:3629 [inline] BUG: KASAN: slab-out-of-bounds in hci_event_packet+0x9524/0x9d13 net/bluetooth/hci_event.c:5363 Read of size 6 at addr ffff888094af0f3b by task kworker/u5:1/11646 CPU: 1 PID: 11646 Comm: kworker/u5:1 Not tainted 4.14.114 #4 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:17 [inline] dump_stack+0x138/0x19c lib/dump_stack.c:53 print_address_description.cold+0x7c/0x1dc mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report mm/kasan/report.c:409 [inline] kasan_report.cold+0xaf/0x2b5 mm/kasan/report.c:393 __asan_report_load_n_noabort+0xf/0x20 mm/kasan/report.c:440 memcpy include/linux/string.h:347 [inline] bacpy include/net/bluetooth/bluetooth.h:233 [inline] hci_inquiry_result_with_rssi_evt net/bluetooth/hci_event.c:3629 [inline] hci_event_packet+0x9524/0x9d13 net/bluetooth/hci_event.c:5363 hci_rx_work+0x3ab/0x900 net/bluetooth/hci_core.c:4237 process_one_work+0x868/0x1610 kernel/workqueue.c:2114 worker_thread+0x5d9/0x1050 kernel/workqueue.c:2248 kthread+0x31c/0x430 kernel/kthread.c:232 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:402 Allocated by task 13655: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x45/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc mm/kasan/kasan.c:551 [inline] kasan_kmalloc+0xce/0xf0 mm/kasan/kasan.c:529 __do_kmalloc_node mm/slab.c:3682 [inline] __kmalloc_node_track_caller+0x51/0x80 mm/slab.c:3696 __kmalloc_reserve.isra.0+0x40/0xe0 net/core/skbuff.c:137 __alloc_skb+0xcf/0x500 net/core/skbuff.c:205 alloc_skb include/linux/skbuff.h:980 [inline] bt_skb_alloc include/net/bluetooth/bluetooth.h:336 [inline] vhci_get_user drivers/bluetooth/hci_vhci.c:180 [inline] vhci_write+0xb6/0x437 drivers/bluetooth/hci_vhci.c:299 call_write_iter include/linux/fs.h:1774 [inline] new_sync_write fs/read_write.c:469 [inline] __vfs_write+0x4ae/0x6c0 fs/read_write.c:482 vfs_write+0x198/0x500 fs/read_write.c:544 SYSC_write fs/read_write.c:589 [inline] SyS_write+0xb8/0x180 fs/read_write.c:581 do_syscall_64+0x1eb/0x630 arch/x86/entry/common.c:289 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 12348: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x45/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x75/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xcc/0x270 mm/slab.c:3815 kernfs_fop_release+0x112/0x180 fs/kernfs/file.c:783 __fput+0x277/0x7a0 fs/file_table.c:210 ____fput+0x16/0x20 fs/file_table.c:244 task_work_run+0x119/0x190 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x1da/0x220 arch/x86/entry/common.c:163 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:267 [inline] do_syscall_64+0x4a9/0x630 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x42/0xb7 The buggy address belongs to the object at ffff888094af0d40 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 507 bytes inside of 512-byte region [ffff888094af0d40, ffff888094af0f40) The buggy address belongs to the page: page:ffffea000252bc00 count:1 mapcount:0 mapping:ffff888094af00c0 index:0x0 flags: 0x1fffc0000000100(slab) raw: 01fffc0000000100 ffff888094af00c0 0000000000000000 0000000100000006 raw: ffffea0002a4fe20 ffffea0001a542a0 ffff8880aa800940 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888094af0e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888094af0e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888094af0f00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ^ ffff888094af0f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888094af1000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================