syzbot


KASAN: use-after-free Read in hci_send_acl

Status: upstream: reported C repro on 2020/08/02 14:47
Reported-by: syzbot+e930fd60eabac96a53b7@syzkaller.appspotmail.com
First crash: 1385d, last: 633d
Fix bisection: failed (error log, bisect log)
  
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-use-after-free Read in hci_send_acl bluetooth C done done 1323 98d 271d 0/26 auto-obsoleted due to no activity on 2024/04/20 13:01
upstream KASAN: use-after-free Read in hci_send_acl bluetooth C done 2 1175d 1385d 20/26 fixed on 2021/11/10 00:50
linux-4.19 KASAN: use-after-free Read in hci_send_acl C done 3 1094d 1385d 1/1 fixed on 2021/06/23 17:43
Last patch testing requests (2)
Created Duration User Patch Repo Result
2023/03/04 03:32 12m retest repro linux-4.14.y report log
2022/12/03 00:30 12m retest repro linux-4.14.y report log
Fix bisection attempts (25)
Created Duration User Patch Repo Result
2022/10/13 02:07 0m bisect fix linux-4.14.y error job log (0)
2022/08/24 20:32 26m bisect fix linux-4.14.y job log (0) log
2022/07/25 20:05 26m bisect fix linux-4.14.y job log (0) log
2022/06/25 19:43 21m bisect fix linux-4.14.y job log (0) log
2022/05/26 18:44 58m bisect fix linux-4.14.y job log (0) log
2022/04/26 18:16 28m bisect fix linux-4.14.y job log (0) log
2022/03/27 09:25 26m bisect fix linux-4.14.y job log (0) log
2022/02/25 03:53 32m bisect fix linux-4.14.y job log (0) log
2022/01/26 00:14 30m bisect fix linux-4.14.y job log (0) log
2021/12/26 23:44 29m bisect fix linux-4.14.y job log (0) log
2021/11/26 23:14 26m bisect fix linux-4.14.y job log (0) log
2021/10/27 22:37 36m bisect fix linux-4.14.y job log (0) log
2021/09/23 05:09 26m bisect fix linux-4.14.y job log (0) log
2021/08/24 04:42 27m bisect fix linux-4.14.y job log (0) log
2021/07/24 23:48 28m bisect fix linux-4.14.y job log (0) log
2021/06/24 22:16 22m bisect fix linux-4.14.y job log (0) log
2021/05/25 19:58 30m bisect fix linux-4.14.y job log (0) log
2021/04/25 18:06 27m bisect fix linux-4.14.y job log (0) log
2021/03/26 11:42 21m bisect fix linux-4.14.y job log (0) log
2021/02/24 09:04 22m bisect fix linux-4.14.y job log (0) log
2021/01/05 03:23 25m bisect fix linux-4.14.y job log (0) log
2020/12/06 02:59 24m bisect fix linux-4.14.y job log (0) log
2020/11/06 02:36 22m bisect fix linux-4.14.y job log (0) log
2020/10/07 02:11 25m bisect fix linux-4.14.y job log (0) log
2020/09/07 01:42 28m bisect fix linux-4.14.y job log (0) log

Sample crash report:
Bluetooth: Wrong link type (-22)
Bluetooth: Wrong link type (-22)
Bluetooth: Wrong link type (-22)
Bluetooth: Wrong link type (-22)
==================================================================
BUG: KASAN: use-after-free in hci_send_acl+0xac8/0xc60 net/bluetooth/hci_core.c:3540
Read of size 8 at addr ffff88809d80b558 by task kworker/u5:1/6383

CPU: 0 PID: 6383 Comm: kworker/u5:1 Not tainted 4.14.192-syzkaller #0
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:17 [inline]
 dump_stack+0x1b2/0x283 lib/dump_stack.c:58
 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252
 kasan_report_error.cold+0x8a/0x194 mm/kasan/report.c:351
 kasan_report mm/kasan/report.c:409 [inline]
 __asan_report_load8_noabort+0x68/0x70 mm/kasan/report.c:430
 hci_send_acl+0xac8/0xc60 net/bluetooth/hci_core.c:3540
 l2cap_send_cmd+0x19d/0x1f0 net/bluetooth/l2cap_core.c:874
 l2cap_information_req net/bluetooth/l2cap_core.c:4450 [inline]
 l2cap_bredr_sig_cmd net/bluetooth/l2cap_core.c:5442 [inline]
 l2cap_sig_channel net/bluetooth/l2cap_core.c:5793 [inline]
 l2cap_recv_frame+0x1261/0x95c0 net/bluetooth/l2cap_core.c:7017
 l2cap_recv_acldata+0x7a6/0x8b0 net/bluetooth/l2cap_core.c:7588
 hci_acldata_packet net/bluetooth/hci_core.c:4066 [inline]
 hci_rx_work+0x3d1/0x970 net/bluetooth/hci_core.c:4249
 process_one_work+0x793/0x14a0 kernel/workqueue.c:2116
 worker_thread+0x5cc/0xff0 kernel/workqueue.c:2250
 kthread+0x30d/0x420 kernel/kthread.c:232
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404

Allocated by task 1202:
 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
 kmem_cache_alloc_trace+0x131/0x3d0 mm/slab.c:3618
 kmalloc include/linux/slab.h:488 [inline]
 kzalloc include/linux/slab.h:661 [inline]
 hci_chan_create+0x7c/0x300 net/bluetooth/hci_conn.c:1532
 l2cap_conn_add.part.0+0x18/0xc20 net/bluetooth/l2cap_core.c:7056
 l2cap_conn_add net/bluetooth/l2cap_core.c:7415 [inline]
 l2cap_connect_cfm+0x1d2/0xce0 net/bluetooth/l2cap_core.c:7373
 hci_connect_cfm include/net/bluetooth/hci_core.h:1211 [inline]
 hci_remote_features_evt net/bluetooth/hci_event.c:2753 [inline]
 hci_event_packet+0x1eb3/0x7c7a net/bluetooth/hci_event.c:5310
 hci_rx_work+0x3e6/0x970 net/bluetooth/hci_core.c:4244
 process_one_work+0x793/0x14a0 kernel/workqueue.c:2116
 worker_thread+0x5cc/0xff0 kernel/workqueue.c:2250
 kthread+0x30d/0x420 kernel/kthread.c:232
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404

Freed by task 6383:
 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
 hci_disconn_loglink_complete_evt net/bluetooth/hci_event.c:4433 [inline]
 hci_event_packet+0xeae/0x7c7a net/bluetooth/hci_event.c:5437
 hci_rx_work+0x3e6/0x970 net/bluetooth/hci_core.c:4244
 process_one_work+0x793/0x14a0 kernel/workqueue.c:2116
 worker_thread+0x5cc/0xff0 kernel/workqueue.c:2250
 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 ffff88809d80b540
 which belongs to the cache kmalloc-128 of size 128
The buggy address is located 24 bytes inside of
 128-byte region [ffff88809d80b540, ffff88809d80b5c0)
The buggy address belongs to the page:
page:ffffea00027602c0 count:1 mapcount:0 mapping:ffff88809d80b000 index:0x0
flags: 0xfffe0000000100(slab)
raw: 00fffe0000000100 ffff88809d80b000 0000000000000000 0000000100000015
raw: ffffea000277c3e0 ffffea00027675a0 ffff88812fe52640 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff88809d80b400: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
 ffff88809d80b480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88809d80b500: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb
                                                    ^
 ffff88809d80b580: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
 ffff88809d80b600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/08/06 07:53 linux-4.14.y ca4f2c56d416 0487ea6f .config console log report syz C ci2-linux-4-14
2020/08/02 14:47 linux-4.14.y 7f2c5eb458b8 96dd3623 .config console log report syz C ci2-linux-4-14
2021/01/25 03:00 linux-4.14.y 2d2791fce891 52e37319 .config console log report info ci2-linux-4-14 KASAN: use-after-free Read in hci_send_acl
2020/08/07 14:40 linux-4.14.y 14b58326976d 28ac5c9e .config console log report ci2-linux-4-14
* Struck through repros no longer work on HEAD.