Hello,
syzbot found the following crash on:
HEAD commit: 97ab07e1 Linux 4.19.69
git tree: linux-4.19.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=13f88c0a600000
kernel config:
https://syzkaller.appspot.com/x/.config?x=a73820df154c3af
dashboard link:
https://syzkaller.appspot.com/bug?extid=fba50ca40cd875b49388
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
Unfortunately, I don't have any reproducer for this crash yet.
IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by:
syzbot+fba50c...@syzkaller.appspotmail.com
Bluetooth: hci3: command 0xfc11 tx timeout
Bluetooth: hci3: Entering manufacturer mode failed (-110)
Bluetooth: hci4: command tx timeout
Bluetooth: hci0: Entering manufacturer mode failed (-110)
==================================================================
BUG: KASAN: use-after-free in hci_cmd_timeout+0x1ba/0x1d0
net/bluetooth/hci_core.c:2574
Read of size 2 at addr ffff8880a7ced008 by task kworker/0:0/5
CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted 4.19.69 #43
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:77 [inline]
dump_stack+0x172/0x1f0 lib/dump_stack.c:113
print_address_description.cold+0x7c/0x20d mm/kasan/report.c:256
kasan_report_error mm/kasan/report.c:354 [inline]
kasan_report mm/kasan/report.c:412 [inline]
kasan_report.cold+0x8c/0x2ba mm/kasan/report.c:396
__asan_report_load_n_noabort+0xf/0x20 mm/kasan/report.c:443
hci_cmd_timeout+0x1ba/0x1d0 net/bluetooth/hci_core.c:2574
process_one_work+0x989/0x1750 kernel/workqueue.c:2153
worker_thread+0x98/0xe40 kernel/workqueue.c:2296
kthread+0x354/0x420 kernel/kthread.c:246
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415
Allocated by task 8721:
save_stack+0x45/0xd0 mm/kasan/kasan.c:448
set_track mm/kasan/kasan.c:460 [inline]
kasan_kmalloc mm/kasan/kasan.c:553 [inline]
kasan_kmalloc+0xce/0xf0 mm/kasan/kasan.c:531
__do_kmalloc_node mm/slab.c:3689 [inline]
__kmalloc_node_track_caller+0x51/0x80 mm/slab.c:3703
__kmalloc_reserve.isra.0+0x40/0xf0 net/core/skbuff.c:137
__alloc_skb+0x10b/0x5f0 net/core/skbuff.c:205
alloc_skb include/linux/skbuff.h:995 [inline]
bt_skb_alloc include/net/bluetooth/bluetooth.h:339 [inline]
hci_prepare_cmd+0x30/0x230 net/bluetooth/hci_request.c:292
hci_req_add_ev+0xb0/0x210 net/bluetooth/hci_request.c:326
__hci_cmd_sync_ev+0xfc/0x1c0 net/bluetooth/hci_request.c:138
__hci_cmd_sync+0x37/0x50 net/bluetooth/hci_request.c:187
btintel_enter_mfg+0x2e/0x90 drivers/bluetooth/btintel.c:82
ag6xx_setup+0x106/0x820 drivers/bluetooth/hci_ag6xx.c:180
hci_uart_setup+0x1c1/0x490 drivers/bluetooth/hci_ldisc.c:431
hci_dev_do_open+0x674/0x14a0 net/bluetooth/hci_core.c:1423
hci_power_on+0x10d/0x580 net/bluetooth/hci_core.c:2130
process_one_work+0x989/0x1750 kernel/workqueue.c:2153
worker_thread+0x98/0xe40 kernel/workqueue.c:2296
kthread+0x354/0x420 kernel/kthread.c:246
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415
Freed by task 8721:
save_stack+0x45/0xd0 mm/kasan/kasan.c:448
set_track mm/kasan/kasan.c:460 [inline]
__kasan_slab_free+0x102/0x150 mm/kasan/kasan.c:521
kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528
__cache_free mm/slab.c:3503 [inline]
kfree+0xcf/0x220 mm/slab.c:3822
skb_free_head+0x99/0xc0 net/core/skbuff.c:554
skb_release_data+0x57d/0x7d0 net/core/skbuff.c:574
skb_release_all+0x4d/0x60 net/core/skbuff.c:631
__kfree_skb net/core/skbuff.c:645 [inline]
kfree_skb net/core/skbuff.c:663 [inline]
kfree_skb+0xe8/0x390 net/core/skbuff.c:657
hci_dev_do_open+0xd8c/0x14a0 net/bluetooth/hci_core.c:1509
hci_power_on+0x10d/0x580 net/bluetooth/hci_core.c:2130
process_one_work+0x989/0x1750 kernel/workqueue.c:2153
worker_thread+0x98/0xe40 kernel/workqueue.c:2296
kthread+0x354/0x420 kernel/kthread.c:246
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415
The buggy address belongs to the object at ffff8880a7ced000
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 8 bytes inside of
512-byte region [ffff8880a7ced000, ffff8880a7ced200)
The buggy address belongs to the page:
page:ffffea00029f3b40 count:1 mapcount:0 mapping:ffff88812c3f0940 index:0x0
flags: 0x1fffc0000000100(slab)
raw: 01fffc0000000100 ffffea000224aa08 ffffea0001959688 ffff88812c3f0940
raw: 0000000000000000 ffff8880a7ced000 0000000100000006 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff8880a7cecf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff8880a7cecf80: 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
> ffff8880a7ced000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff8880a7ced080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880a7ced100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
---
This bug is generated by a bot. It may contain errors.
See
https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at
syzk...@googlegroups.com.
syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.