RDX: 0000000000000000 RSI: 000000000000ae80 RDI: 0000000000000005 RBP: 00007fee6bd99ca0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000011 R13: 00007ffec4df58ff R14: 00007fee6bd9a9c0 R15: 000000000119bf8c ================================================================== BUG: KASAN: use-after-free in hci_chan_del+0x1a7/0x1e0 net/bluetooth/hci_conn.c:1564 Read of size 8 at addr ffff8880af393f18 by task syz-executor.1/17352 CPU: 1 PID: 17352 Comm: syz-executor.1 Not tainted 4.14.213-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_rfkill_set_block+0xaf/0x120 net/bluetooth/hci_core.c:2050 rfkill_set_block+0x1b2/0x4a0 net/rfkill/core.c:337 rfkill_fop_write+0x1b6/0x3c0 net/rfkill/core.c:1233 __vfs_write+0xe4/0x630 fs/read_write.c:480 vfs_write+0x17f/0x4d0 fs/read_write.c:544 SYSC_write fs/read_write.c:590 [inline] SyS_write+0xf2/0x210 fs/read_write.c:582 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x45e219 RSP: 002b:00007f4e344b1c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 000000000045e219 RDX: 0000000000000008 RSI: 0000000020000040 RDI: 0000000000000003 RBP: 000000000119bfc0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000119bf8c R13: 00007ffdc608e18f R14: 00007f4e344b29c0 R15: 000000000119bf8c Allocated by task 17065: 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] load_elf_binary+0xca/0x4750 fs/binfmt_elf.c:703 search_binary_handler.part.0+0x35f/0x640 fs/exec.c:1653 search_binary_handler fs/exec.c:1642 [inline] exec_binprm fs/exec.c:1695 [inline] do_execveat_common+0x1099/0x1f30 fs/exec.c:1815 do_execve fs/exec.c:1860 [inline] SYSC_execve fs/exec.c:1941 [inline] SyS_execve+0x3b/0x50 fs/exec.c:1936 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb Freed by task 17065: 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 load_elf_binary+0x4dc/0x4750 fs/binfmt_elf.c:1164 search_binary_handler.part.0+0x35f/0x640 fs/exec.c:1653 search_binary_handler fs/exec.c:1642 [inline] exec_binprm fs/exec.c:1695 [inline] do_execveat_common+0x1099/0x1f30 fs/exec.c:1815 do_execve fs/exec.c:1860 [inline] SYSC_execve fs/exec.c:1941 [inline] SyS_execve+0x3b/0x50 fs/exec.c:1936 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb The buggy address belongs to the object at ffff8880af393f00 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 24 bytes inside of 128-byte region [ffff8880af393f00, ffff8880af393f80) The buggy address belongs to the page: page:ffffea0002bce4c0 count:1 mapcount:0 mapping:ffff8880af393000 index:0x0 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffff8880af393000 0000000000000000 0000000100000015 raw: ffffea0002ae2320 ffffea0002d2f120 ffff88813fe80640 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880af393e00: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ffff8880af393e80: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc >ffff8880af393f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880af393f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880af394000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== netlink: 304 bytes leftover after parsing attributes in process `syz-executor.0'. netlink: 304 bytes leftover after parsing attributes in process `syz-executor.0'. audit: type=1804 audit(1609691668.606:610): pid=17403 uid=0 auid=0 ses=4 op="invalid_pcr" cause="open_writers" comm="syz-executor.0" name="/root/syzkaller-testdir209991184/syzkaller.10AE1L/1642/bus" dev="sda1" ino=15745 res=1