================================================================== BUG: KASAN: use-after-free in hci_chan_del+0x1b4/0x1f0 net/bluetooth/hci_conn.c:1683 Read of size 8 at addr ffff88809e2eca98 by task syz-executor.5/19205 CPU: 0 PID: 19205 Comm: syz-executor.5 Not tainted 4.19.161-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/0x2fe lib/dump_stack.c:118 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256 kasan_report_error.cold+0x8a/0x1c7 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_rfkill_set_block+0xe7/0x160 net/bluetooth/hci_core.c:2100 rfkill_set_block+0x1f9/0x540 net/rfkill/core.c:353 rfkill_fop_write+0x250/0x4a0 net/rfkill/core.c:1249 __vfs_write+0xf7/0x770 fs/read_write.c:485 vfs_write+0x1f3/0x540 fs/read_write.c:549 ksys_write+0x12b/0x2a0 fs/read_write.c:599 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45de79 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:00007fc8f0764c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 000000000045de79 RDX: 0000000000000008 RSI: 0000000020000080 RDI: 0000000000000003 RBP: 000000000118bf60 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118bf2c R13: 00007ffd7714ec2f R14: 00007fc8f07659c0 R15: 000000000118bf2c Allocated by task 7: kmem_cache_alloc_trace+0x12f/0x380 mm/slab.c:3625 kmalloc include/linux/slab.h:515 [inline] addr_event.part.0+0x7b/0x460 drivers/infiniband/core/roce_gid_mgmt.c:835 addr_event drivers/infiniband/core/roce_gid_mgmt.c:819 [inline] inetaddr_event+0x135/0x1a0 drivers/infiniband/core/roce_gid_mgmt.c:864 notifier_call_chain+0xc0/0x230 kernel/notifier.c:93 __blocking_notifier_call_chain kernel/notifier.c:317 [inline] __blocking_notifier_call_chain kernel/notifier.c:304 [inline] blocking_notifier_call_chain kernel/notifier.c:328 [inline] blocking_notifier_call_chain+0x85/0xa0 kernel/notifier.c:325 __inet_del_ifa+0x534/0xba0 net/ipv4/devinet.c:416 inet_del_ifa net/ipv4/devinet.c:446 [inline] inetdev_destroy net/ipv4/devinet.c:311 [inline] inetdev_event+0x5cb/0x1263 net/ipv4/devinet.c:1545 notifier_call_chain+0xc0/0x230 kernel/notifier.c:93 call_netdevice_notifiers net/core/dev.c:1762 [inline] rollback_registered_many+0x83e/0xe70 net/core/dev.c:8188 unregister_netdevice_many.part.0+0x1a/0x300 net/core/dev.c:9311 unregister_netdevice_many net/core/dev.c:9310 [inline] default_device_exit_batch+0x2fa/0x3c0 net/core/dev.c:9782 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 Freed by task 9611: __cache_free mm/slab.c:3503 [inline] kfree+0xcc/0x210 mm/slab.c:3822 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 ffff88809e2eca80 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 24 bytes inside of 128-byte region [ffff88809e2eca80, ffff88809e2ecb00) The buggy address belongs to the page: page:ffffea000278bb00 count:1 mapcount:0 mapping:ffff88813bff0640 index:0x0 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea0002adbac8 ffffea00026cc888 ffff88813bff0640 raw: 0000000000000000 ffff88809e2ec000 0000000100000015 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809e2ec980: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ffff88809e2eca00: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc >ffff88809e2eca80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88809e2ecb00: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ffff88809e2ecb80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ==================================================================