================================================================== BUG: KASAN: slab-out-of-bounds in hci_inquiry_result_with_rssi_evt net/bluetooth/hci_event.c:4000 [inline] BUG: KASAN: slab-out-of-bounds in hci_event_packet+0x9d1f/0xa8f4 net/bluetooth/hci_event.c:5875 Read of size 1 at addr ffff8880a5f4dac0 by task kworker/u5:0/1502 CPU: 1 PID: 1502 Comm: kworker/u5:0 Not tainted 5.2.0-rc6-next-20190627 #24 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+0xd4/0x306 mm/kasan/report.c:351 __kasan_report.cold+0x1b/0x36 mm/kasan/report.c:482 kasan_report+0x12/0x17 mm/kasan/common.c:614 __asan_report_load1_noabort+0x14/0x20 mm/kasan/generic_report.c:129 hci_inquiry_result_with_rssi_evt net/bluetooth/hci_event.c:4000 [inline] hci_event_packet+0x9d1f/0xa8f4 net/bluetooth/hci_event.c:5875 hci_rx_work+0x47e/0xae0 net/bluetooth/hci_core.c:4459 process_one_work+0x9af/0x1740 kernel/workqueue.c:2269 worker_thread+0x98/0xe40 kernel/workqueue.c:2415 kthread+0x361/0x430 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:353 Allocated by task 9310: 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:3616 [inline] __kmalloc_node_track_caller+0x4e/0x70 mm/slab.c:3630 __kmalloc_reserve.isra.0+0x40/0xf0 net/core/skbuff.c:139 __alloc_skb+0x10b/0x5e0 net/core/skbuff.c:207 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:1870 [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+0xfd/0x6a0 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 5973: 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:3426 [inline] kfree+0x10a/0x2c0 mm/slab.c:3757 free_pipe_info+0x243/0x300 fs/pipe.c:708 put_pipe_info+0xd0/0xf0 fs/pipe.c:581 pipe_release+0x1e6/0x280 fs/pipe.c:602 __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:188 [inline] exit_to_usermode_loop+0x280/0x2d0 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+0x5a9/0x6a0 arch/x86/entry/common.c:304 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8880a5f4d6c0 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 0 bytes to the right of 1024-byte region [ffff8880a5f4d6c0, ffff8880a5f4dac0) The buggy address belongs to the page: page:ffffea000297d300 refcount:1 mapcount:0 mapping:ffff8880aa400c40 index:0xffff8880a5f4db40 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea00023f6388 ffffea0002473288 ffff8880aa400c40 raw: ffff8880a5f4db40 ffff8880a5f4c040 0000000100000006 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a5f4d980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880a5f4da00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880a5f4da80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ^ ffff8880a5f4db00: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff8880a5f4db80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================