================================================================== BUG: KASAN: use-after-free in hci_chan_del+0x1a7/0x1e0 net/bluetooth/hci_conn.c:1564 Read of size 8 at addr ffff8880a659a258 by task syz-executor.2/3085 CPU: 1 PID: 3085 Comm: syz-executor.2 Not tainted 4.14.209-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_load8_noabort+0x68/0x70 mm/kasan/report.c:430 hci_chan_del+0x1a7/0x1e0 net/bluetooth/hci_conn.c:1564 l2cap_conn_del+0x426/0x690 net/bluetooth/l2cap_core.c:1739 l2cap_disconn_cfm net/bluetooth/l2cap_core.c:7441 [inline] l2cap_disconn_cfm+0x7c/0xb0 net/bluetooth/l2cap_core.c:7434 hci_disconn_cfm include/net/bluetooth/hci_core.h:1226 [inline] hci_conn_hash_flush+0x127/0x260 net/bluetooth/hci_conn.c:1393 hci_dev_do_close+0x535/0xca0 net/bluetooth/hci_core.c:1620 hci_unregister_dev+0x17f/0x8c0 net/bluetooth/hci_core.c:3191 vhci_release+0x70/0xe0 drivers/bluetooth/hci_vhci.c:354 __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+0xa44/0x2850 kernel/exit.c:868 do_group_exit+0x100/0x2e0 kernel/exit.c:965 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:0x45deb9 RSP: 002b:00007f7a77e73cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 000000000119c120 RCX: 000000000045deb9 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 000000000119c120 RBP: 000000000119c118 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000119c124 R13: 00007ffc9ea95f2f R14: 00007f7a77e749c0 R15: 000000000119c124 Allocated by task 12748: 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] call_usermodehelper_setup+0x73/0x2e0 kernel/umh.c:383 kobject_uevent_env+0xc28/0xf40 lib/kobject_uevent.c:525 netdev_queue_add_kobject net/core/net-sysfs.c:1347 [inline] netdev_queue_update_kobjects+0x296/0x350 net/core/net-sysfs.c:1364 register_queue_kobjects net/core/net-sysfs.c:1406 [inline] netdev_register_kobject+0x34a/0x410 net/core/net-sysfs.c:1612 register_netdevice+0x955/0xe40 net/core/dev.c:7660 veth_newlink+0x467/0x890 drivers/net/veth.c:443 rtnl_newlink+0xf88/0x1830 net/core/rtnetlink.c:2728 rtnetlink_rcv_msg+0x3be/0xb10 net/core/rtnetlink.c:4316 netlink_rcv_skb+0x125/0x390 net/netlink/af_netlink.c:2433 netlink_unicast_kernel net/netlink/af_netlink.c:1287 [inline] netlink_unicast+0x437/0x610 net/netlink/af_netlink.c:1313 netlink_sendmsg+0x62e/0xb80 net/netlink/af_netlink.c:1878 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0x100 net/socket.c:656 SYSC_sendto net/socket.c:1763 [inline] SyS_sendto+0x1c7/0x2c0 net/socket.c:1731 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb Freed by task 12884: 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 call_usermodehelper_freeinfo kernel/umh.c:44 [inline] umh_complete kernel/umh.c:58 [inline] call_usermodehelper_exec_async+0x450/0x510 kernel/umh.c:119 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 The buggy address belongs to the object at ffff8880a659a240 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 24 bytes inside of 128-byte region [ffff8880a659a240, ffff8880a659a2c0) The buggy address belongs to the page: page:ffffea0002996680 count:1 mapcount:0 mapping:ffff8880a659a000 index:0x0 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffff8880a659a000 0000000000000000 0000000100000015 raw: ffffea00027748a0 ffffea0002872f60 ffff88813fe80640 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a659a100: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8880a659a180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc >ffff8880a659a200: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ^ ffff8880a659a280: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8880a659a300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================