audit: type=1804 audit(1642422857.806:63): pid=15121 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.5" name="/root/syzkaller-testdir680163612/syzkaller.t41mBE/178/bus" dev="sda1" ino=14496 res=1 EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue Bluetooth: hci6: Entering manufacturer mode failed (-110) ================================================================== BUG: KASAN: use-after-free in hci_cmd_timeout+0x19e/0x1b0 net/bluetooth/hci_core.c:2546 Read of size 2 at addr ffff8880a78dca08 by task kworker/1:3/4645 CPU: 1 PID: 4645 Comm: kworker/1:3 Not tainted 4.14.262-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events hci_cmd_timeout Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 lib/dump_stack.c:58 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252 kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:351 kasan_report mm/kasan/report.c:409 [inline] __asan_report_load_n_noabort+0x6b/0x80 mm/kasan/report.c:440 hci_cmd_timeout+0x19e/0x1b0 net/bluetooth/hci_core.c:2546 process_one_work+0x793/0x14a0 kernel/workqueue.c:2117 worker_thread+0x5cc/0xff0 kernel/workqueue.c:2251 kthread+0x30d/0x420 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 Allocated by task 8020: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551 __do_kmalloc_node mm/slab.c:3682 [inline] __kmalloc_node_track_caller+0x4c/0x70 mm/slab.c:3696 __kmalloc_reserve net/core/skbuff.c:137 [inline] __alloc_skb+0x96/0x510 net/core/skbuff.c:205 alloc_skb include/linux/skbuff.h:980 [inline] bt_skb_alloc include/net/bluetooth/bluetooth.h:336 [inline] hci_prepare_cmd+0x2a/0x290 net/bluetooth/hci_request.c:302 hci_req_add_ev+0xd0/0x220 net/bluetooth/hci_request.c:336 __hci_cmd_sync_ev+0x14e/0x5a0 net/bluetooth/hci_request.c:129 btintel_enter_mfg+0x72/0xe0 drivers/bluetooth/btintel.c:81 ag6xx_setup+0xe8/0x6e0 drivers/bluetooth/hci_ag6xx.c:180 hci_uart_setup+0x193/0x410 drivers/bluetooth/hci_ldisc.c:429 hci_dev_do_open+0x34c/0xe30 net/bluetooth/hci_core.c:1392 hci_power_on+0x97/0x3b0 net/bluetooth/hci_core.c:2101 process_one_work+0x793/0x14a0 kernel/workqueue.c:2117 worker_thread+0x5cc/0xff0 kernel/workqueue.c:2251 kthread+0x30d/0x420 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 Freed by task 8020: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xc9/0x250 mm/slab.c:3815 skb_free_head net/core/skbuff.c:563 [inline] skb_release_data+0x5f6/0x820 net/core/skbuff.c:583 skb_release_all net/core/skbuff.c:640 [inline] __kfree_skb net/core/skbuff.c:654 [inline] kfree_skb+0xe7/0x390 net/core/skbuff.c:672 hci_dev_do_open+0x737/0xe30 net/bluetooth/hci_core.c:1482 hci_power_on+0x97/0x3b0 net/bluetooth/hci_core.c:2101 process_one_work+0x793/0x14a0 kernel/workqueue.c:2117 worker_thread+0x5cc/0xff0 kernel/workqueue.c:2251 kthread+0x30d/0x420 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 The buggy address belongs to the object at ffff8880a78dca00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 8 bytes inside of 512-byte region [ffff8880a78dca00, ffff8880a78dcc00) The buggy address belongs to the page: page:ffffea00029e3700 count:1 mapcount:0 mapping:ffff8880a78dc000 index:0x0 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffff8880a78dc000 0000000000000000 0000000100000006 raw: ffffea000276c260 ffffea0002a3e6a0 ffff88813fe74940 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a78dc900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a78dc980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880a78dca00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a78dca80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a78dcb00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================