================================================================== BUG: KASAN: use-after-free in hci_conn_drop include/net/bluetooth/hci_core.h:963 [inline] BUG: KASAN: use-after-free in sco_chan_del+0x3b2/0x3d0 net/bluetooth/sco.c:148 Read of size 1 at addr ffff8880a87baef5 by task syz-executor683/13564 CPU: 0 PID: 13564 Comm: syz-executor683 Not tainted 4.14.193-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x283 lib/dump_stack.c:58 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252 kasan_report_error.cold+0x8a/0x194 mm/kasan/report.c:351 kasan_report mm/kasan/report.c:409 [inline] __asan_report_load1_noabort+0x68/0x70 mm/kasan/report.c:427 hci_conn_drop include/net/bluetooth/hci_core.h:963 [inline] sco_chan_del+0x3b2/0x3d0 net/bluetooth/sco.c:148 __sco_sock_close+0xb0/0x670 net/bluetooth/sco.c:433 sco_sock_close net/bluetooth/sco.c:447 [inline] sco_sock_release+0x6a/0x370 net/bluetooth/sco.c:1009 __sock_release+0xcd/0x2b0 net/socket.c:602 sock_close+0x15/0x20 net/socket.c:1139 __fput+0x25f/0x7a0 fs/file_table.c:210 task_work_run+0x11f/0x190 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0xa08/0x27f0 kernel/exit.c:865 do_group_exit+0x100/0x2e0 kernel/exit.c:962 get_signal+0x38d/0x1ca0 kernel/signal.c:2423 do_signal+0x7c/0x1550 arch/x86/kernel/signal.c:814 exit_to_usermode_loop+0x160/0x200 arch/x86/entry/common.c:160 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:270 [inline] do_syscall_64+0x4a3/0x640 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x446f29 RSP: 002b:00007ffd389a8358 EFLAGS: 00000246 ORIG_RAX: 000000000000002a RAX: fffffffffffffffc RBX: 0000000000000003 RCX: 0000000000446f29 RDX: 0000000000000008 RSI: 0000000020000080 RDI: 0000000000000004 RBP: 000000000000c97d R08: 0000000000000002 R09: 00000000000500ff R10: 0000000000000004 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000407b80 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 13564: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551 kmem_cache_alloc_trace+0x131/0x3d0 mm/slab.c:3618 kmalloc include/linux/slab.h:488 [inline] kzalloc include/linux/slab.h:661 [inline] hci_conn_add+0x53/0x12f0 net/bluetooth/hci_conn.c:501 hci_connect_sco+0x265/0x7d0 net/bluetooth/hci_conn.c:1119 sco_connect net/bluetooth/sco.c:240 [inline] sco_sock_connect+0x26c/0x860 net/bluetooth/sco.c:576 SYSC_connect net/socket.c:1655 [inline] SyS_connect+0x1f4/0x240 net/socket.c:1636 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb Freed by task 1201: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xc9/0x250 mm/slab.c:3815 device_release+0xf0/0x1a0 drivers/base/core.c:831 kobject_cleanup lib/kobject.c:646 [inline] kobject_release lib/kobject.c:675 [inline] kref_put include/linux/kref.h:70 [inline] kobject_put+0x1f3/0x2d0 lib/kobject.c:692 put_device+0x1c/0x30 drivers/base/core.c:2014 hci_conn_del+0x235/0x620 net/bluetooth/hci_conn.c:611 hci_phy_link_complete_evt.isra.0+0x4d0/0x6c0 net/bluetooth/hci_event.c:4355 hci_event_packet+0x2592/0x7c7a net/bluetooth/hci_event.c:5429 hci_rx_work+0x3e6/0x970 net/bluetooth/hci_core.c:4244 process_one_work+0x793/0x14a0 kernel/workqueue.c:2116 worker_thread+0x5cc/0xff0 kernel/workqueue.c:2250 kthread+0x30d/0x420 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 The buggy address belongs to the object at ffff8880a87baec0 which belongs to the cache kmalloc-4096 of size 4096 The buggy address is located 53 bytes inside of 4096-byte region [ffff8880a87baec0, ffff8880a87bbec0) The buggy address belongs to the page: page:ffffea0002a1ee80 count:1 mapcount:0 mapping:ffff8880a87baec0 index:0x0 compound_mapcount: 0 flags: 0xfffe0000008100(slab|head) raw: 00fffe0000008100 ffff8880a87baec0 0000000000000000 0000000100000001 raw: ffffea00029e4c20 ffffea00029e4920 ffff88812fe52dc0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a87bad80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a87bae00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880a87bae80: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ^ ffff8880a87baf00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a87baf80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================