================================================================== BUG: KASAN: use-after-free in hci_chan_del+0x1c5/0x200 net/bluetooth/hci_conn.c:1753 Read of size 8 at addr ffff8880135b6118 by task syz-executor.0/8192 CPU: 0 PID: 8192 Comm: syz-executor.0 Not tainted 5.11.0-rc5-next-20210129-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:232 __kasan_report mm/kasan/report.c:399 [inline] kasan_report.cold+0x7c/0xd8 mm/kasan/report.c:416 hci_chan_del+0x1c5/0x200 net/bluetooth/hci_conn.c:1753 l2cap_conn_del+0x478/0x7b0 net/bluetooth/l2cap_core.c:1906 l2cap_disconn_cfm net/bluetooth/l2cap_core.c:8168 [inline] l2cap_disconn_cfm+0x98/0xd0 net/bluetooth/l2cap_core.c:8161 hci_disconn_cfm include/net/bluetooth/hci_core.h:1485 [inline] hci_conn_hash_flush+0x127/0x260 net/bluetooth/hci_conn.c:1582 hci_dev_do_close+0x569/0x1110 net/bluetooth/hci_core.c:1778 hci_dev_close+0x14d/0x190 net/bluetooth/hci_core.c:1859 hci_sock_ioctl+0x57d/0x840 net/bluetooth/hci_sock.c:1030 sock_do_ioctl+0xcb/0x2d0 net/socket.c:1039 sock_ioctl+0x477/0x6a0 net/socket.c:1179 vfs_ioctl fs/ioctl.c:48 [inline] __do_sys_ioctl fs/ioctl.c:753 [inline] __se_sys_ioctl fs/ioctl.c:739 [inline] __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:739 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45e219 Code: 0d b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 db b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f84eec64c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 000000000045e219 RDX: 0000000000000000 RSI: 00000000400448ca RDI: 0000000000000004 RBP: 000000000119bfc0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000119bf8c R13: 00007ffc70fbffaf R14: 00007f84eec659c0 R15: 000000000119bf8c Allocated by task 4844: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:403 [inline] ____kasan_kmalloc mm/kasan/common.c:434 [inline] ____kasan_kmalloc.constprop.0+0xa0/0xd0 mm/kasan/common.c:406 kmalloc include/linux/slab.h:556 [inline] kernfs_get_open_node fs/kernfs/file.c:552 [inline] kernfs_fop_open+0x957/0xd40 fs/kernfs/file.c:698 do_dentry_open+0x4b9/0x11b0 fs/open.c:826 do_open fs/namei.c:3365 [inline] path_openat+0x1c0e/0x27e0 fs/namei.c:3498 do_filp_open+0x17e/0x3c0 fs/namei.c:3525 do_sys_openat2+0x16d/0x420 fs/open.c:1187 do_sys_open fs/open.c:1203 [inline] __do_sys_open fs/open.c:1211 [inline] __se_sys_open fs/open.c:1207 [inline] __x64_sys_open+0x119/0x1c0 fs/open.c:1207 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 4844: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track+0x1c/0x30 mm/kasan/common.c:46 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:357 ____kasan_slab_free.part.0+0xe1/0x110 mm/kasan/common.c:364 kasan_slab_free include/linux/kasan.h:191 [inline] slab_free_hook mm/slub.c:1562 [inline] slab_free_freelist_hook+0x82/0x1d0 mm/slub.c:1600 slab_free mm/slub.c:3161 [inline] kfree+0xe5/0x7b0 mm/slub.c:4202 kernfs_fop_release+0xe3/0x190 fs/kernfs/file.c:760 __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+0x249/0x250 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 ffff8880135b6100 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 24 bytes inside of 128-byte region [ffff8880135b6100, ffff8880135b6180) The buggy address belongs to the page: page:00000000e9b3337b refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x135b6 flags: 0xfff00000000200(slab) raw: 00fff00000000200 ffffea0000485a80 0000000600000006 ffff88800fc418c0 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880135b6000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880135b6080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880135b6100: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880135b6180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880135b6200: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================