================================================================== BUG: KASAN: use-after-free in hci_cmd_timeout+0x203/0x210 net/bluetooth/hci_core.c:2741 Read of size 2 at addr ffff88801a653808 by task kworker/1:1/52 CPU: 1 PID: 52 Comm: kworker/1:1 Not tainted 5.7.0-syzkaller #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.0-59-gc9ba5276e321-prebuilt.qemu.org 04/01/2014 Workqueue: events hci_cmd_timeout Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x188/0x20d lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd3/0x413 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530 hci_cmd_timeout+0x203/0x210 net/bluetooth/hci_core.c:2741 process_one_work+0x965/0x16a0 kernel/workqueue.c:2268 worker_thread+0x96/0xe20 kernel/workqueue.c:2414 kthread+0x388/0x470 kernel/kthread.c:268 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:351 Allocated by task 10083: save_stack+0x1b/0x40 mm/kasan/common.c:48 set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc mm/kasan/common.c:494 [inline] __kasan_kmalloc.constprop.0+0xbf/0xd0 mm/kasan/common.c:467 __kmalloc_reserve.isra.0+0x39/0xe0 net/core/skbuff.c:142 __alloc_skb+0xef/0x5a0 net/core/skbuff.c:210 alloc_skb include/linux/skbuff.h:1083 [inline] bt_skb_alloc include/net/bluetooth/bluetooth.h:377 [inline] hci_prepare_cmd+0x2a/0x220 net/bluetooth/hci_request.c:295 hci_req_add_ev+0xa2/0x1f0 net/bluetooth/hci_request.c:329 __hci_cmd_sync_ev+0xec/0x1b0 net/bluetooth/hci_request.c:141 btintel_enter_mfg+0x2a/0x90 drivers/bluetooth/btintel.c:67 ag6xx_setup+0xfc/0x790 drivers/bluetooth/hci_ag6xx.c:165 hci_uart_setup+0x1b1/0x480 drivers/bluetooth/hci_ldisc.c:424 hci_dev_do_open+0x3c5/0x1840 net/bluetooth/hci_core.c:1482 hci_power_on+0x11d/0x610 net/bluetooth/hci_core.c:2230 process_one_work+0x965/0x16a0 kernel/workqueue.c:2268 worker_thread+0x96/0xe20 kernel/workqueue.c:2414 kthread+0x388/0x470 kernel/kthread.c:268 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:351 Freed by task 10083: save_stack+0x1b/0x40 mm/kasan/common.c:48 set_track mm/kasan/common.c:56 [inline] kasan_set_free_info mm/kasan/common.c:316 [inline] __kasan_slab_free+0xf7/0x140 mm/kasan/common.c:455 __cache_free mm/slab.c:3426 [inline] kfree+0x109/0x2b0 mm/slab.c:3757 skb_free_head+0x8b/0xa0 net/core/skbuff.c:590 skb_release_data+0x42e/0x8b0 net/core/skbuff.c:610 skb_release_all+0x46/0x60 net/core/skbuff.c:664 __kfree_skb net/core/skbuff.c:678 [inline] kfree_skb net/core/skbuff.c:696 [inline] kfree_skb+0xfa/0x410 net/core/skbuff.c:690 hci_dev_do_open+0x9ef/0x1840 net/bluetooth/hci_core.c:1604 hci_power_on+0x11d/0x610 net/bluetooth/hci_core.c:2230 process_one_work+0x965/0x16a0 kernel/workqueue.c:2268 worker_thread+0x96/0xe20 kernel/workqueue.c:2414 kthread+0x388/0x470 kernel/kthread.c:268 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:351 The buggy address belongs to the object at ffff88801a653800 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 8 bytes inside of 512-byte region [ffff88801a653800, ffff88801a653a00) The buggy address belongs to the page: page:ffffea00006994c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88801a653400 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea00009fc1c8 ffffea0000a30dc8 ffff88802c800a80 raw: ffff88801a653400 ffff88801a653000 0000000100000003 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88801a653700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88801a653780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88801a653800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88801a653880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88801a653900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================