================================================================== BUG: KASAN: slab-out-of-bounds in hci_inquiry_result_evt net/bluetooth/hci_event.c:2415 [inline] BUG: KASAN: slab-out-of-bounds in hci_event_packet+0xa063/0xa8bf net/bluetooth/hci_event.c:5789 Read of size 3 at addr ffff888095abfc7f by task kworker/u5:1/30682 CPU: 1 PID: 30682 Comm: kworker/u5:1 Not tainted 5.2.0-rc5+ #57 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 __asan_report_load_n_noabort+0xf/0x20 mm/kasan/generic_report.c:142 hci_inquiry_result_evt net/bluetooth/hci_event.c:2415 [inline] hci_event_packet+0xa063/0xa8bf net/bluetooth/hci_event.c:5789 hci_rx_work+0x440/0xaa0 net/bluetooth/hci_core.c:4459 process_one_work+0x989/0x1790 kernel/workqueue.c:2269 worker_thread+0x98/0xe40 kernel/workqueue.c:2415 kthread+0x354/0x420 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 Allocated by task 30845: 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:3620 [inline] __kmalloc_node_track_caller+0x4e/0x70 mm/slab.c:3634 __kmalloc_reserve.isra.0+0x40/0xf0 net/core/skbuff.c:138 __alloc_skb+0x10b/0x5e0 net/core/skbuff.c:206 alloc_skb include/linux/skbuff.h:1054 [inline] bt_skb_alloc include/net/bluetooth/bluetooth.h:339 [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:1872 [inline] new_sync_write+0x4d3/0x770 fs/read_write.c:483 __vfs_write+0xe1/0x110 fs/read_write.c:496 vfs_write+0x20c/0x580 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+0xfd/0x680 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 24290: save_stack+0x23/0x90 mm/kasan/common.c:71 set_track mm/kasan/common.c:79 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:451 kasan_slab_free+0xe/0x10 mm/kasan/common.c:459 __cache_free mm/slab.c:3432 [inline] kfree+0xcf/0x220 mm/slab.c:3755 kernfs_fop_release+0x129/0x1a0 fs/kernfs/file.c:782 __fput+0x2ff/0x890 fs/file_table.c:280 ____fput+0x16/0x20 fs/file_table.c:313 task_work_run+0x145/0x1c0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:185 [inline] exit_to_usermode_loop+0x273/0x2c0 arch/x86/entry/common.c:168 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:279 [inline] do_syscall_64+0x58e/0x680 arch/x86/entry/common.c:304 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff888095abfa80 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 511 bytes inside of 512-byte region [ffff888095abfa80, ffff888095abfc80) The buggy address belongs to the page: page:ffffea000256afc0 refcount:1 mapcount:0 mapping:ffff8880aa400940 index:0xffff888095abf300 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea000298d6c8 ffffea000298b808 ffff8880aa400940 raw: ffff888095abf300 ffff888095abf080 0000000100000005 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888095abfb80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888095abfc00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888095abfc80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888095abfd00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888095abfd80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================