================================================================== BUG: KASAN: use-after-free in hci_chan_del+0x1c5/0x200 net/bluetooth/hci_conn.c:1728 Read of size 8 at addr ffff888011045e18 by task syz-executor.0/12204 CPU: 0 PID: 12204 Comm: syz-executor.0 Not tainted 5.10.0-rc4-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+0x107/0x163 lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xae/0x4c8 mm/kasan/report.c:385 __kasan_report mm/kasan/report.c:545 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:562 hci_chan_del+0x1c5/0x200 net/bluetooth/hci_conn.c:1728 l2cap_conn_del+0x478/0x7b0 net/bluetooth/l2cap_core.c:1900 l2cap_disconn_cfm net/bluetooth/l2cap_core.c:8161 [inline] l2cap_disconn_cfm+0x98/0xd0 net/bluetooth/l2cap_core.c:8154 hci_disconn_cfm include/net/bluetooth/hci_core.h:1441 [inline] hci_conn_hash_flush+0x127/0x260 net/bluetooth/hci_conn.c:1557 hci_dev_do_close+0x569/0x1110 net/bluetooth/hci_core.c:1770 hci_unregister_dev+0x223/0xfe0 net/bluetooth/hci_core.c:3827 vhci_release+0x70/0xe0 drivers/bluetooth/hci_vhci.c:340 __fput+0x285/0x920 fs/file_table.c:281 task_work_run+0xdd/0x190 kernel/task_work.c:151 exit_task_work include/linux/task_work.h:30 [inline] do_exit+0xb64/0x29b0 kernel/exit.c:809 do_group_exit+0x125/0x310 kernel/exit.c:906 get_signal+0x428/0x1f00 kernel/signal.c:2758 arch_do_signal+0x82/0x2390 arch/x86/kernel/signal.c:811 exit_to_user_mode_loop kernel/entry/common.c:161 [inline] exit_to_user_mode_prepare+0x100/0x1a0 kernel/entry/common.c:191 syscall_exit_to_user_mode+0x38/0x260 kernel/entry/common.c:266 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45deb9 Code: Unable to access opcode bytes at RIP 0x45de8f. RSP: 002b:00007f91ebc23cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 000000000118bf28 RCX: 000000000045deb9 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 000000000118bf28 RBP: 000000000118bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118bf2c R13: 00007ffdd933f5df R14: 00007f91ebc249c0 R15: 000000000118bf2c Allocated by task 4902: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc.constprop.0+0xc2/0xd0 mm/kasan/common.c:461 kmalloc include/linux/slab.h:552 [inline] kernfs_get_open_node fs/kernfs/file.c:571 [inline] kernfs_fop_open+0x957/0xd40 fs/kernfs/file.c:717 do_dentry_open+0x4b9/0x11b0 fs/open.c:817 do_open fs/namei.c:3252 [inline] path_openat+0x1b9a/0x2730 fs/namei.c:3369 do_filp_open+0x17e/0x3c0 fs/namei.c:3396 do_sys_openat2+0x16d/0x420 fs/open.c:1168 do_sys_open fs/open.c:1184 [inline] __do_sys_open fs/open.c:1192 [inline] __se_sys_open fs/open.c:1188 [inline] __x64_sys_open+0x119/0x1c0 fs/open.c:1188 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 4902: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track+0x1c/0x30 mm/kasan/common.c:56 kasan_set_free_info+0x1b/0x30 mm/kasan/generic.c:355 __kasan_slab_free+0x102/0x140 mm/kasan/common.c:422 slab_free_hook mm/slub.c:1544 [inline] slab_free_freelist_hook+0x5d/0x150 mm/slub.c:1577 slab_free mm/slub.c:3142 [inline] kfree+0xdb/0x360 mm/slub.c:4124 kernfs_fop_release+0xe3/0x190 fs/kernfs/file.c:779 __fput+0x285/0x920 fs/file_table.c:281 task_work_run+0xdd/0x190 kernel/task_work.c:151 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_user_mode_loop kernel/entry/common.c:164 [inline] exit_to_user_mode_prepare+0x17e/0x1a0 kernel/entry/common.c:191 syscall_exit_to_user_mode+0x38/0x260 kernel/entry/common.c:266 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff888011045e00 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 24 bytes inside of 128-byte region [ffff888011045e00, ffff888011045e80) The buggy address belongs to the page: page:00000000ac7d6bed refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11045 flags: 0xfff00000000200(slab) raw: 00fff00000000200 ffffea00008bb480 0000000500000002 ffff888010041640 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888011045d00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888011045d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888011045e00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888011045e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888011045f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc ==================================================================