batman_adv: batadv0: Interface activated: batadv_slave_1 IPv6: ADDRCONF(NETDEV_CHANGE): batadv_slave_1: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth1_to_batadv: link becomes ready ================================================================== BUG: KASAN: use-after-free in hci_conn_del+0x64e/0x6a0 net/bluetooth/hci_conn.c:596 Write of size 8 at addr ffff888090e0aa30 by task syz-executor.2/6484 CPU: 1 PID: 6484 Comm: syz-executor.2 Not tainted 4.19.136-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_store8_noabort+0x88/0x90 mm/kasan/report.c:438 hci_conn_del+0x64e/0x6a0 net/bluetooth/hci_conn.c:596 hci_conn_hash_flush+0x189/0x220 net/bluetooth/hci_conn.c:1496 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:0x45cc79 Code: Bad RIP value. RSP: 002b:00007ffc0aa82678 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000045cc79 RDX: 00000000004166d1 RSI: 0000000000ca85f0 RDI: 0000000000000043 RBP: 00000000004c2903 R08: 000000000000000b R09: 0000000000000000 R10: 0000000001c80940 R11: 0000000000000246 R12: 000000000000000a R13: 00007ffc0aa827c0 R14: 00000000000103bb R15: 00007ffc0aa827d0 Allocated by task 7863: kmem_cache_alloc_trace+0x12f/0x380 mm/slab.c:3625 kmalloc include/linux/slab.h:515 [inline] kzalloc include/linux/slab.h:709 [inline] hci_conn_add+0x53/0x11e0 net/bluetooth/hci_conn.c:501 hci_connect_acl.part.0+0x20d/0x4b0 net/bluetooth/hci_conn.c:1209 hci_connect_acl net/bluetooth/hci_conn.c:1267 [inline] hci_connect_sco+0xf4/0x950 net/bluetooth/hci_conn.c:1232 sco_connect net/bluetooth/sco.c:240 [inline] sco_sock_connect+0x2ff/0x970 net/bluetooth/sco.c:576 __sys_connect+0x265/0x2c0 net/socket.c:1663 __do_sys_connect net/socket.c:1674 [inline] __se_sys_connect net/socket.c:1671 [inline] __x64_sys_connect+0x6f/0xb0 net/socket.c:1671 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 7851: __cache_free mm/slab.c:3503 [inline] kfree+0xcc/0x210 mm/slab.c:3822 device_release+0x76/0x210 drivers/base/core.c:1061 kobject_cleanup lib/kobject.c:662 [inline] kobject_release lib/kobject.c:691 [inline] kref_put include/linux/kref.h:70 [inline] kobject_put+0x22d/0x350 lib/kobject.c:708 put_device+0x1c/0x30 drivers/base/core.c:2251 hci_conn_del+0x27e/0x6a0 net/bluetooth/hci_conn.c:611 hci_conn_complete_evt net/bluetooth/hci_event.c:2465 [inline] hci_event_packet+0x654c/0x858f net/bluetooth/hci_event.c:5751 hci_rx_work+0x46b/0xa90 net/bluetooth/hci_core.c:4359 process_one_work+0x864/0x1570 kernel/workqueue.c:2155 worker_thread+0x64c/0x1130 kernel/workqueue.c:2298 kthread+0x30b/0x410 kernel/kthread.c:246 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 The buggy address belongs to the object at ffff888090e0a200 which belongs to the cache kmalloc-4096 of size 4096 The buggy address is located 2096 bytes inside of 4096-byte region [ffff888090e0a200, ffff888090e0b200) The buggy address belongs to the page: page:ffffea0002438280 count:1 mapcount:0 mapping:ffff88812c39cdc0 index:0x0 compound_mapcount: 0 flags: 0xfffe0000008100(slab|head) raw: 00fffe0000008100 ffffea0002442708 ffffea00023fc588 ffff88812c39cdc0 raw: 0000000000000000 ffff888090e0a200 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888090e0a900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888090e0a980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888090e0aa00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888090e0aa80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888090e0ab00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================