================================================================== BUG: KASAN: use-after-free in hci_chan_del+0x14f/0x190 net/bluetooth/hci_conn.c:1728 Read of size 8 at addr ffff8880a850fe18 by task syz-executor.3/10935 CPU: 0 PID: 10935 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/0x497 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:1728 l2cap_conn_del+0x61b/0x9e0 net/bluetooth/l2cap_core.c:1900 l2cap_disconn_cfm net/bluetooth/l2cap_core.c:8160 [inline] l2cap_disconn_cfm+0x85/0xa0 net/bluetooth/l2cap_core.c:8153 hci_disconn_cfm include/net/bluetooth/hci_core.h:1438 [inline] hci_conn_hash_flush+0x114/0x220 net/bluetooth/hci_conn.c:1557 hci_dev_do_close+0x5c6/0x1080 net/bluetooth/hci_core.c:1770 hci_unregister_dev+0x1bd/0xe30 net/bluetooth/hci_core.c:3790 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:135 exit_task_work include/linux/task_work.h:25 [inline] do_exit+0xb7d/0x29f0 kernel/exit.c:806 do_group_exit+0x125/0x310 kernel/exit.c:903 get_signal+0x40b/0x1ee0 kernel/signal.c:2743 arch_do_signal+0x82/0x2520 arch/x86/kernel/signal.c:811 exit_to_user_mode_loop kernel/entry/common.c:135 [inline] exit_to_user_mode_prepare+0x15d/0x1c0 kernel/entry/common.c:166 syscall_exit_to_user_mode+0x59/0x2b0 kernel/entry/common.c:241 __do_fast_syscall_32+0x63/0x80 arch/x86/entry/common.c:127 do_fast_syscall_32+0x2f/0x70 arch/x86/entry/common.c:149 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c RIP: 0023:0xf7f09549 Code: Bad RIP value. RSP: 002b:00000000f550312c EFLAGS: 00000292 ORIG_RAX: 00000000000000f0 RAX: fffffffffffffe00 RBX: 0000000008b9bfa8 RCX: 0000000000000080 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000008b9bfac RBP: 00000000f5503228 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 12762: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc.constprop.0+0xbf/0xd0 mm/kasan/common.c:461 kmem_cache_alloc_trace+0x16e/0x2c0 mm/slab.c:3550 kmalloc include/linux/slab.h:554 [inline] kzalloc include/linux/slab.h:666 [inline] cdev_alloc+0x3d/0xd0 fs/char_dev.c:635 tty_cdev_add+0x4a/0x290 drivers/tty/tty_io.c:3044 tty_register_device_attr+0x476/0x7b0 drivers/tty/tty_io.c:3158 gsmld_attach_gsm drivers/tty/n_gsm.c:2390 [inline] gsmld_open+0x5cc/0x8d0 drivers/tty/n_gsm.c:2516 tty_ldisc_open+0x9b/0x110 drivers/tty/tty_ldisc.c:464 tty_set_ldisc+0x2e8/0x670 drivers/tty/tty_ldisc.c:591 tiocsetd drivers/tty/tty_io.c:2333 [inline] tty_ioctl+0xadf/0x15f0 drivers/tty/tty_io.c:2593 tty_compat_ioctl+0x295/0x410 drivers/tty/tty_io.c:2818 __do_compat_sys_ioctl+0x1d3/0x230 fs/ioctl.c:842 do_syscall_32_irqs_on arch/x86/entry/common.c:84 [inline] __do_fast_syscall_32+0x57/0x80 arch/x86/entry/common.c:126 do_fast_syscall_32+0x2f/0x70 arch/x86/entry/common.c:149 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c The buggy address belongs to the object at ffff8880a850fe00 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 24 bytes inside of 128-byte region [ffff8880a850fe00, ffff8880a850fe80) The buggy address belongs to the page: page:00000000f2d0f444 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8880a850f400 pfn:0xa850f flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea0002565088 ffffea0002447748 ffff8880aa040400 raw: ffff8880a850f400 ffff8880a850f000 000000010000000e 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a850fd00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a850fd80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880a850fe00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a850fe80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a850ff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================