bisecting fixing commit since 13af6c74b14a883366e7702c40c52ff548096e7f building syzkaller on 02034dac31a9c4dfecfa163f445ef1921c442268 testing commit 13af6c74b14a883366e7702c40c52ff548096e7f with gcc (GCC) 8.1.0 kernel signature: 8e6311fdca125cd7c830f45859b49ccb9cefd4417482f095ab86a8405bdba936 all runs: crashed: KASAN: use-after-free Read in hci_send_acl testing current HEAD c37da90efff5f183bea6ae4c2af33571f61fe317 testing commit c37da90efff5f183bea6ae4c2af33571f61fe317 with gcc (GCC) 8.1.0 kernel signature: 2f64e9642d47653539e2420a9053a7bc017932bb44a9cd402a1d5454829c1eab all runs: crashed: KASAN: use-after-free Read in hci_send_acl revisions tested: 2, total time: 27m34.609332412s (build: 20m2.387760626s, test: 6m4.253893554s) the crash still happens on HEAD commit msg: Linux 4.19.143 crash: KASAN: use-after-free Read in hci_send_acl 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+0x6bd/0x7c0 net/bluetooth/hci_core.c:3652 Read of size 8 at addr ffff88808aa22e58 by task kworker/u5:2/7929 CPU: 1 PID: 7929 Comm: kworker/u5:2 Not tainted 4.19.143-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:77 [inline] dump_stack+0x17c/0x22a lib/dump_stack.c:118 print_address_description.cold.6+0x9/0x211 mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.7+0x242/0x307 mm/kasan/report.c:412 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 hci_send_acl+0x6bd/0x7c0 net/bluetooth/hci_core.c:3652 l2cap_send_cmd+0x631/0x830 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+0x21ea/0xa490 net/bluetooth/l2cap_core.c:7017 Bluetooth: Wrong link type (-22) l2cap_recv_acldata+0x756/0x8a0 net/bluetooth/l2cap_core.c:7588 hci_acldata_packet net/bluetooth/hci_core.c:4178 [inline] hci_rx_work+0x5e1/0x8e0 net/bluetooth/hci_core.c:4364 process_one_work+0x7b9/0x15a0 kernel/workqueue.c:2155 worker_thread+0x85/0xb60 kernel/workqueue.c:2298 kthread+0x347/0x410 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 Allocated by task 1226: save_stack mm/kasan/kasan.c:448 [inline] set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc.part.1+0x62/0xf0 mm/kasan/kasan.c:553 kasan_kmalloc+0xaf/0xc0 mm/kasan/kasan.c:538 kmem_cache_alloc_trace+0x152/0x3a0 mm/slab.c:3625 kmalloc include/linux/slab.h:515 [inline] kzalloc include/linux/slab.h:709 [inline] hci_chan_create+0x7b/0x2e0 net/bluetooth/hci_conn.c:1651 l2cap_conn_add.part.17+0x15/0xb80 net/bluetooth/l2cap_core.c:7056 l2cap_conn_add net/bluetooth/l2cap_core.c:97 [inline] l2cap_connect_cfm+0x339/0xd50 net/bluetooth/l2cap_core.c:7373 hci_connect_cfm include/net/bluetooth/hci_core.h:1246 [inline] hci_remote_features_evt.isra.63+0x467/0xa80 net/bluetooth/hci_event.c:3020 hci_event_packet+0x2bba/0x7174 net/bluetooth/hci_event.c:5798 hci_rx_work+0x31b/0x8e0 net/bluetooth/hci_core.c:4359 process_one_work+0x7b9/0x15a0 kernel/workqueue.c:2155 worker_thread+0x85/0xb60 kernel/workqueue.c:2298 kthread+0x347/0x410 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 Freed by task 7929: save_stack mm/kasan/kasan.c:448 [inline] set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x13c/0x220 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 hci_chan_del+0x11b/0x170 net/bluetooth/hci_conn.c:1681 amp_destroy_logical_link+0x9/0x10 net/bluetooth/amp.c:595 hci_disconn_loglink_complete_evt net/bluetooth/hci_event.c:4765 [inline] hci_event_packet+0x259a/0x7174 net/bluetooth/hci_event.c:5925 hci_rx_work+0x31b/0x8e0 net/bluetooth/hci_core.c:4359 process_one_work+0x7b9/0x15a0 kernel/workqueue.c:2155 worker_thread+0x85/0xb60 kernel/workqueue.c:2298 kthread+0x347/0x410 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 The buggy address belongs to the object at ffff88808aa22e40 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 24 bytes inside of 128-byte region [ffff88808aa22e40, ffff88808aa22ec0) The buggy address belongs to the page: page:ffffea00022a8880 count:1 mapcount:0 mapping:ffff88812c29c640 index:0x0 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffffea000234ca48 ffffea0002a40808 ffff88812c29c640 raw: 0000000000000000 ffff88808aa22000 0000000100000015 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808aa22d00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88808aa22d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88808aa22e00: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ^ ffff88808aa22e80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88808aa22f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== Bluetooth: Wrong link type (-22) Bluetooth: Wrong link type (-22)