================================================================== BUG: KASAN: use-after-free in hci_chan_del+0x1b4/0x1f0 net/bluetooth/hci_conn.c:1683 Read of size 8 at addr ffff888097106c18 by task syz-executor.5/20972 CPU: 0 PID: 20972 Comm: syz-executor.5 Not tainted 4.19.169-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+0x1fc/0x2ef lib/dump_stack.c:118 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256 kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354 kasan_report mm/kasan/report.c:412 [inline] __asan_report_load8_noabort+0x88/0x90 mm/kasan/report.c:433 hci_chan_del+0x1b4/0x1f0 net/bluetooth/hci_conn.c:1683 l2cap_conn_del+0x45e/0x6e0 net/bluetooth/l2cap_core.c:1739 l2cap_disconn_cfm net/bluetooth/l2cap_core.c:7441 [inline] l2cap_disconn_cfm+0x98/0xd0 net/bluetooth/l2cap_core.c:7434 hci_disconn_cfm include/net/bluetooth/hci_core.h:1261 [inline] hci_conn_hash_flush+0x127/0x260 net/bluetooth/hci_conn.c:1512 hci_dev_do_close+0x659/0xf10 net/bluetooth/hci_core.c:1666 hci_unregister_dev+0x18b/0x910 net/bluetooth/hci_core.c:3271 vhci_release+0x70/0xe0 drivers/bluetooth/hci_vhci.c:354 __fput+0x2ce/0x890 fs/file_table.c:278 task_work_run+0x148/0x1c0 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0xbed/0x2be0 kernel/exit.c:890 do_group_exit+0x125/0x310 kernel/exit.c:993 get_signal+0x3f2/0x1f70 kernel/signal.c:2589 do_signal+0x8f/0x1670 arch/x86/kernel/signal.c:821 exit_to_usermode_loop+0x204/0x2a0 arch/x86/entry/common.c:163 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe 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:00007f1663292cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 000000000119bf88 RCX: 000000000045e219 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 000000000119bf88 RBP: 000000000119bf80 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000119bf8c R13: 00007ffdb5452e4f R14: 00007f16632939c0 R15: 000000000119bf8c Allocated by task 20942: __do_kmalloc mm/slab.c:3727 [inline] __kmalloc_track_caller+0x155/0x3c0 mm/slab.c:3742 kmemdup+0x23/0x50 mm/util.c:118 kmemdup include/linux/string.h:446 [inline] nf_conntrack_event_init_sysctl net/netfilter/nf_conntrack_ecache.c:363 [inline] nf_conntrack_ecache_pernet_init+0x161/0x2c0 net/netfilter/nf_conntrack_ecache.c:411 nf_conntrack_init_net+0x272/0x430 net/netfilter/nf_conntrack_core.c:2455 nf_conntrack_pernet_init+0x1e/0x500 net/netfilter/nf_conntrack_standalone.c:634 ops_init+0xb3/0x410 net/core/net_namespace.c:129 setup_net+0x2c2/0x720 net/core/net_namespace.c:315 copy_net_ns+0x1f7/0x340 net/core/net_namespace.c:438 create_new_namespaces+0x3f6/0x7b0 kernel/nsproxy.c:107 copy_namespaces+0x325/0x3c0 kernel/nsproxy.c:165 copy_process.part.0+0x3a59/0x8200 kernel/fork.c:1919 copy_process kernel/fork.c:1713 [inline] _do_fork+0x22f/0xf30 kernel/fork.c:2228 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 54: __cache_free mm/slab.c:3503 [inline] kfree+0xcc/0x210 mm/slab.c:3822 nf_conntrack_cleanup_net_list+0x169/0x250 net/netfilter/nf_conntrack_core.c:2150 ops_exit_list+0xf9/0x150 net/core/net_namespace.c:156 cleanup_net+0x3b4/0x8b0 net/core/net_namespace.c:553 process_one_work+0x864/0x1570 kernel/workqueue.c:2155 worker_thread+0x64c/0x1130 kernel/workqueue.c:2298 kthread+0x33f/0x460 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 The buggy address belongs to the object at ffff888097106c00 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 24 bytes inside of 128-byte region [ffff888097106c00, ffff888097106c80) The buggy address belongs to the page: page:ffffea00025c4180 count:1 mapcount:0 mapping:ffff88813bff0640 index:0xffff888097106d80 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea00025f4ac8 ffffea00026be388 ffff88813bff0640 raw: ffff888097106d80 ffff888097106000 0000000100000013 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888097106b00: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff888097106b80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff888097106c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888097106c80: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff888097106d00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ==================================================================