Bluetooth: hci2: command 0x0405 tx timeout IPVS: ftp: loaded support on port[0] = 21 ================================================================== BUG: KASAN: use-after-free in constant_test_bit arch/x86/include/asm/bitops.h:317 [inline] BUG: KASAN: use-after-free in sock_flag include/net/sock.h:839 [inline] BUG: KASAN: use-after-free in l2cap_sock_kill net/bluetooth/l2cap_sock.c:1046 [inline] BUG: KASAN: use-after-free in l2cap_sock_close_cb+0xbd/0xd0 net/bluetooth/l2cap_sock.c:1311 Read of size 8 at addr ffff8880a4156e20 by task syz-executor.5/9166 CPU: 0 PID: 9166 Comm: syz-executor.5 Not tainted 4.19.141-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 constant_test_bit arch/x86/include/asm/bitops.h:317 [inline] sock_flag include/net/sock.h:839 [inline] l2cap_sock_kill net/bluetooth/l2cap_sock.c:1046 [inline] l2cap_sock_close_cb+0xbd/0xd0 net/bluetooth/l2cap_sock.c:1311 l2cap_conn_del+0x3db/0x6b0 net/bluetooth/l2cap_core.c:1730 l2cap_disconn_cfm net/bluetooth/l2cap_core.c:7435 [inline] l2cap_disconn_cfm+0x85/0xa0 net/bluetooth/l2cap_core.c:7428 hci_disconn_cfm include/net/bluetooth/hci_core.h:1261 [inline] hci_conn_hash_flush+0x114/0x220 net/bluetooth/hci_conn.c:1495 hci_dev_do_close+0x624/0xe70 net/bluetooth/hci_core.c:1666 hci_unregister_dev+0x17c/0x7f0 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+0xbb2/0x2b70 kernel/exit.c:887 do_group_exit+0x125/0x310 kernel/exit.c:990 __do_sys_exit_group kernel/exit.c:1001 [inline] __se_sys_exit_group kernel/exit.c:999 [inline] __x64_sys_exit_group+0x3a/0x50 kernel/exit.c:999 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45d4d9 Code: Bad RIP value. RSP: 002b:00007ffda4645258 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000045d4d9 RDX: 0000000000416d61 RSI: 00000000016a85f0 RDI: 0000000000000043 RBP: 00000000004c306d R08: 000000000000000b R09: 0000000000000000 R10: 00000000034a1940 R11: 0000000000000246 R12: 0000000000000003 R13: 00007ffda46453a0 R14: 0000000000103a9d R15: 00007ffda46453b0 Allocated by task 9599: __do_kmalloc mm/slab.c:3727 [inline] __kmalloc+0x15a/0x3c0 mm/slab.c:3736 kmalloc include/linux/slab.h:520 [inline] sk_prot_alloc+0x1e2/0x2d0 net/core/sock.c:1466 sk_alloc+0x36/0xec0 net/core/sock.c:1520 l2cap_sock_alloc.constprop.0+0x31/0x210 net/bluetooth/l2cap_sock.c:1590 l2cap_sock_create+0x110/0x1b0 net/bluetooth/l2cap_sock.c:1636 bt_sock_create+0x154/0x2a0 net/bluetooth/af_bluetooth.c:130 __sock_create+0x3d8/0x740 net/socket.c:1276 sock_create net/socket.c:1316 [inline] __sys_socket+0xef/0x200 net/socket.c:1346 __do_sys_socket net/socket.c:1355 [inline] __se_sys_socket net/socket.c:1353 [inline] __x64_sys_socket+0x6f/0xb0 net/socket.c:1353 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 9599: __cache_free mm/slab.c:3503 [inline] kfree+0xcc/0x210 mm/slab.c:3822 sk_prot_free net/core/sock.c:1503 [inline] __sk_destruct+0x5ff/0x810 net/core/sock.c:1584 sk_destruct net/core/sock.c:1599 [inline] __sk_free+0x165/0x3b0 net/core/sock.c:1610 sk_free+0x3b/0x50 net/core/sock.c:1621 sock_put include/net/sock.h:1711 [inline] l2cap_sock_kill.part.0+0x6b/0x80 net/bluetooth/l2cap_sock.c:1055 l2cap_sock_kill net/bluetooth/l2cap_sock.c:1206 [inline] l2cap_sock_release+0x158/0x190 net/bluetooth/l2cap_sock.c:1204 __sock_release+0xcd/0x2a0 net/socket.c:579 sock_close+0x15/0x20 net/socket.c:1140 __fput+0x2ce/0x890 fs/file_table.c:278 task_work_run+0x148/0x1c0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x251/0x2a0 arch/x86/entry/common.c:167 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 The buggy address belongs to the object at ffff8880a4156dc0 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 96 bytes inside of 2048-byte region [ffff8880a4156dc0, ffff8880a41575c0) The buggy address belongs to the page: page:ffffea0002905580 count:1 mapcount:0 mapping:ffff88812c39cc40 index:0x0 compound_mapcount: 0 flags: 0xfffe0000008100(slab|head) raw: 00fffe0000008100 ffffea000295a288 ffffea000291ae08 ffff88812c39cc40 raw: 0000000000000000 ffff8880a4156540 0000000100000003 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a4156d00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8880a4156d80: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb >ffff8880a4156e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a4156e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a4156f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================