================================================================== BUG: KASAN: use-after-free in hci_chan_del+0x14f/0x190 net/bluetooth/hci_conn.c:1707 Read of size 8 at addr ffff8880a8498018 by task syz-executor.3/10514 CPU: 1 PID: 10514 Comm: syz-executor.3 Not tainted 5.8.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x18f/0x20d lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xae/0x436 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530 hci_chan_del+0x14f/0x190 net/bluetooth/hci_conn.c:1707 l2cap_conn_del+0x61b/0x9e0 net/bluetooth/l2cap_core.c:1900 l2cap_disconn_cfm net/bluetooth/l2cap_core.c:8159 [inline] l2cap_disconn_cfm+0x85/0xa0 net/bluetooth/l2cap_core.c:8152 hci_disconn_cfm include/net/bluetooth/hci_core.h:1355 [inline] hci_conn_hash_flush+0x114/0x220 net/bluetooth/hci_conn.c:1536 hci_dev_do_close+0x5c6/0x1080 net/bluetooth/hci_core.c:1761 hci_unregister_dev+0x1a3/0xe20 net/bluetooth/hci_core.c:3606 vhci_release+0x70/0xe0 drivers/bluetooth/hci_vhci.c:340 __fput+0x33c/0x880 fs/file_table.c:281 task_work_run+0xdd/0x190 kernel/task_work.c:135 exit_task_work include/linux/task_work.h:25 [inline] do_exit+0xb72/0x2a40 kernel/exit.c:805 do_group_exit+0x125/0x310 kernel/exit.c:903 get_signal+0x40b/0x1ee0 kernel/signal.c:2743 do_signal+0x82/0x2520 arch/x86/kernel/signal.c:810 exit_to_usermode_loop arch/x86/entry/common.c:235 [inline] __prepare_exit_to_usermode+0x156/0x1f0 arch/x86/entry/common.c:269 do_syscall_64+0x6c/0xe0 arch/x86/entry/common.c:393 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45cce9 Code: Bad RIP value. RSP: 002b:00007f3626fafcf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 000000000078bf08 RCX: 000000000045cce9 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 000000000078bf08 RBP: 000000000078bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000078bf0c R13: 00007ffc6e0b9f9f R14: 00007f3626fb09c0 R15: 000000000078bf0c Allocated by task 30875: save_stack+0x1b/0x40 mm/kasan/common.c:48 set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc.constprop.0+0xc2/0xd0 mm/kasan/common.c:494 __do_kmalloc mm/slab.c:3656 [inline] __kmalloc+0x17a/0x340 mm/slab.c:3665 kmalloc include/linux/slab.h:560 [inline] copy_verifier_state+0x80d/0xa90 kernel/bpf/verifier.c:852 is_state_visited kernel/bpf/verifier.c:8528 [inline] do_check kernel/bpf/verifier.c:8647 [inline] do_check_common+0x1445/0xc2d0 kernel/bpf/verifier.c:10479 do_check_main kernel/bpf/verifier.c:10545 [inline] bpf_check+0x8448/0xcdc2 kernel/bpf/verifier.c:10997 bpf_prog_load+0xdaf/0x1b50 kernel/bpf/syscall.c:2194 __do_sys_bpf+0x1edf/0x4b10 kernel/bpf/syscall.c:4117 do_syscall_64+0x60/0xe0 arch/x86/entry/common.c:384 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 30875: 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+0xf5/0x140 mm/kasan/common.c:455 __cache_free mm/slab.c:3426 [inline] kfree+0x103/0x2c0 mm/slab.c:3757 clear_jmp_history kernel/bpf/verifier.c:805 [inline] free_verifier_state+0x133/0x210 kernel/bpf/verifier.c:819 is_state_visited kernel/bpf/verifier.c:8481 [inline] do_check kernel/bpf/verifier.c:8647 [inline] do_check_common+0x2968/0xc2d0 kernel/bpf/verifier.c:10479 do_check_main kernel/bpf/verifier.c:10545 [inline] bpf_check+0x8448/0xcdc2 kernel/bpf/verifier.c:10997 bpf_prog_load+0xdaf/0x1b50 kernel/bpf/syscall.c:2194 __do_sys_bpf+0x1edf/0x4b10 kernel/bpf/syscall.c:4117 do_syscall_64+0x60/0xe0 arch/x86/entry/common.c:384 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff8880a8498000 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 24 bytes inside of 128-byte region [ffff8880a8498000, ffff8880a8498080) The buggy address belongs to the page: page:ffffea0002a12600 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8880a8498200 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea000278c048 ffffea0002675888 ffff8880aa000700 raw: ffff8880a8498200 ffff8880a8498000 0000000100000007 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a8497f00: fb fb fb fb fb fb fb fb fc fc fc fc fb fb fb fb ffff8880a8497f80: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880a8498000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a8498080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a8498100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================