================================================================== BUG: KASAN: use-after-free in hci_chan_del+0x1c5/0x200 net/bluetooth/hci_conn.c:1736 Read of size 8 at addr ffff888014935518 by task syz-executor.2/1468 CPU: 1 PID: 1468 Comm: syz-executor.2 Not tainted 5.10.0-rc7-next-20201210-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x107/0x163 lib/dump_stack.c:120 print_address_description.constprop.0.cold+0x5b/0x2f8 mm/kasan/report.c:230 __kasan_report mm/kasan/report.c:396 [inline] kasan_report.cold+0x79/0xd5 mm/kasan/report.c:413 hci_chan_del+0x1c5/0x200 net/bluetooth/hci_conn.c:1736 l2cap_conn_del+0x478/0x7b0 net/bluetooth/l2cap_core.c:1906 l2cap_disconn_cfm net/bluetooth/l2cap_core.c:8167 [inline] l2cap_disconn_cfm+0x98/0xd0 net/bluetooth/l2cap_core.c:8160 hci_disconn_cfm include/net/bluetooth/hci_core.h:1462 [inline] hci_conn_hash_flush+0x127/0x260 net/bluetooth/hci_conn.c:1565 hci_dev_do_close+0x569/0x1140 net/bluetooth/hci_core.c:1776 hci_unregister_dev+0x223/0x1010 net/bluetooth/hci_core.c:3872 vhci_release+0x70/0xe0 drivers/bluetooth/hci_vhci.c:340 __fput+0x283/0x920 fs/file_table.c:280 task_work_run+0xdd/0x190 kernel/task_work.c:140 exit_task_work include/linux/task_work.h:30 [inline] do_exit+0xb89/0x2a00 kernel/exit.c:823 do_group_exit+0x125/0x310 kernel/exit.c:920 get_signal+0x3e9/0x2160 kernel/signal.c:2770 arch_do_signal_or_restart+0x2a8/0x1eb0 arch/x86/kernel/signal.c:811 handle_signal_work kernel/entry/common.c:147 [inline] exit_to_user_mode_loop kernel/entry/common.c:171 [inline] exit_to_user_mode_prepare+0x124/0x200 kernel/entry/common.c:201 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline] syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:302 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45e159 Code: Unable to access opcode bytes at RIP 0x45e12f. RSP: 002b:00007fc04be67cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 000000000119bf88 RCX: 000000000045e159 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 000000000119bf88 RBP: 000000000119bf80 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000119bf8c R13: 00007ffd2d6665af R14: 00007fc04be689c0 R15: 000000000119bf8c Allocated by task 4906: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:39 kasan_set_track mm/kasan/common.c:47 [inline] set_alloc_info mm/kasan/common.c:405 [inline] ____kasan_kmalloc mm/kasan/common.c:436 [inline] ____kasan_kmalloc.constprop.0+0xa0/0xd0 mm/kasan/common.c:408 kmalloc include/linux/slab.h:565 [inline] kernfs_get_open_node fs/kernfs/file.c:571 [inline] kernfs_fop_open+0x884/0xdf0 fs/kernfs/file.c:717 do_dentry_open+0x4b9/0x11b0 fs/open.c:817 do_open fs/namei.c:3252 [inline] path_openat+0x1bdc/0x27a0 fs/namei.c:3369 do_filp_open+0x17e/0x3c0 fs/namei.c:3396 do_sys_openat2+0x16d/0x420 fs/open.c:1172 do_sys_open fs/open.c:1188 [inline] __do_sys_open fs/open.c:1196 [inline] __se_sys_open fs/open.c:1192 [inline] __x64_sys_open+0x119/0x1c0 fs/open.c:1192 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 4906: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:39 kasan_set_track+0x1c/0x30 mm/kasan/common.c:47 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:355 ____kasan_slab_free.part.0+0xe1/0x110 mm/kasan/common.c:366 kasan_slab_free include/linux/kasan.h:188 [inline] slab_free_hook mm/slub.c:1548 [inline] slab_free_freelist_hook+0x82/0x1d0 mm/slub.c:1586 slab_free mm/slub.c:3157 [inline] kfree+0xdb/0x3c0 mm/slub.c:4194 kernfs_fop_release+0xe3/0x190 fs/kernfs/file.c:779 __fput+0x283/0x920 fs/file_table.c:280 task_work_run+0xdd/0x190 kernel/task_work.c:140 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop kernel/entry/common.c:174 [inline] exit_to_user_mode_prepare+0x1f0/0x200 kernel/entry/common.c:201 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline] syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:302 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff888014935500 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 24 bytes inside of 128-byte region [ffff888014935500, ffff888014935580) The buggy address belongs to the page: page:0000000094fd050e refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x14935 flags: 0xfff00000000200(slab) raw: 00fff00000000200 dead000000000100 dead000000000122 ffff888010841640 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888014935400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888014935480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888014935500: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888014935580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888014935600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================