bisecting fixing commit since c076c79e03c6094e578df5d210fde808b3ad32e6 building syzkaller on 4ca1c0ea446d2c09b1fb49a85ae645e3754f1058 testing commit c076c79e03c6094e578df5d210fde808b3ad32e6 with gcc (GCC) 8.1.0 kernel signature: d0241e679798922714e19ce6b6172c3f929daa1a03f88d80aac9526dd64784c4 all runs: crashed: KASAN: use-after-free Write in hci_conn_del testing current HEAD b09c34517e1ac4018e3bb75ed5c8610a8a1f486b testing commit b09c34517e1ac4018e3bb75ed5c8610a8a1f486b with gcc (GCC) 8.1.0 kernel signature: dc26f0dbab0ee1b79225c1ebd5d26d480ef71f157b6b7d872e6facff9b0454e2 run #0: crashed: KASAN: use-after-free Write in hci_conn_del run #1: crashed: KASAN: use-after-free Write in hci_conn_del run #2: crashed: general protection fault in __queue_work run #3: crashed: KASAN: use-after-free Write in hci_conn_del run #4: crashed: KASAN: use-after-free Write in hci_conn_del run #5: crashed: KASAN: use-after-free Write in hci_conn_del run #6: crashed: KASAN: use-after-free Write in hci_conn_del run #7: crashed: KASAN: use-after-free Write in hci_conn_del run #8: crashed: KASAN: use-after-free Write in hci_conn_del run #9: crashed: KASAN: slab-out-of-bounds Write in hci_conn_del revisions tested: 2, total time: 29m43.980426976s (build: 17m59.901361264s, test: 10m51.327146966s) the crash still happens on HEAD commit msg: Linux 4.19.149 crash: KASAN: slab-out-of-bounds Write in hci_conn_del 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: slab-out-of-bounds in hci_conn_del+0x5a4/0x5f0 net/bluetooth/hci_conn.c:596 Write of size 8 at addr ffff88808a5032f0 by task syz-executor.0/6612 CPU: 1 PID: 6612 Comm: syz-executor.0 Not tainted 4.19.149-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+0x17c/0x22a lib/dump_stack.c:118 print_address_description.cold.6+0x9/0x211 mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.7+0x242/0x307 mm/kasan/report.c:412 __asan_report_store8_noabort+0x17/0x20 mm/kasan/report.c:438 hci_conn_del+0x5a4/0x5f0 net/bluetooth/hci_conn.c:596 hci_conn_hash_flush+0x168/0x200 net/bluetooth/hci_conn.c:1496 hci_dev_do_close+0x4d2/0xcd0 net/bluetooth/hci_core.c:1666 hci_unregister_dev+0x163/0x7a0 net/bluetooth/hci_core.c:3271 vhci_release+0x6b/0xe0 drivers/bluetooth/hci_vhci.c:354 __fput+0x249/0x7f0 fs/file_table.c:278 ____fput+0x9/0x10 fs/file_table.c:309 task_work_run+0x108/0x180 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0xa6a/0x2db0 kernel/exit.c:887 do_group_exit+0xf8/0x2c0 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+0x39/0x40 kernel/exit.c:999 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45ccd9 Code: 2d b6 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 fb b5 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007ffc3e3391d8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000045ccd9 RDX: 0000000000416731 RSI: 0000000000ca85f0 RDI: 0000000000000043 RBP: 00000000004c2963 R08: 000000000000000b R09: 0000000000000000 R10: 00000000027b6940 R11: 0000000000000246 R12: 0000000000000019 R13: 00007ffc3e339320 R14: 000000000003bf97 R15: 00007ffc3e339330 Allocated by task 19272: save_stack mm/kasan/kasan.c:448 [inline] set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc.part.1+0x62/0xf0 mm/kasan/kasan.c:553 kasan_kmalloc+0xaf/0xc0 mm/kasan/kasan.c:538 __do_kmalloc_node mm/slab.c:3689 [inline] __kmalloc_node+0x50/0x70 mm/slab.c:3696 kmalloc_node include/linux/slab.h:557 [inline] kvmalloc_node+0x68/0x70 mm/util.c:423 kvmalloc include/linux/mm.h:577 [inline] kvzalloc include/linux/mm.h:585 [inline] alloc_netdev_mqs+0x5d/0xc80 net/core/dev.c:9139 rtnl_create_link+0x1a8/0xac0 net/core/rtnetlink.c:2869 rtnl_newlink+0xb9b/0x1320 net/core/rtnetlink.c:3131 rtnetlink_rcv_msg+0x34f/0x950 net/core/rtnetlink.c:4778 netlink_rcv_skb+0x13e/0x3d0 net/netlink/af_netlink.c:2455 rtnetlink_rcv+0x10/0x20 net/core/rtnetlink.c:4796 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x443/0x660 net/netlink/af_netlink.c:1344 netlink_sendmsg+0x666/0xc50 net/netlink/af_netlink.c:1909 sock_sendmsg_nosec net/socket.c:622 [inline] sock_sendmsg+0xac/0xf0 net/socket.c:632 __sys_sendto+0x1f2/0x2e0 net/socket.c:1787 __do_sys_sendto net/socket.c:1799 [inline] __se_sys_sendto net/socket.c:1795 [inline] __x64_sys_sendto+0xdc/0x1a0 net/socket.c:1795 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 0: (stack is not available) The buggy address belongs to the object at ffff88808a502440 which belongs to the cache kmalloc-4096 of size 4096 The buggy address is located 3760 bytes inside of 4096-byte region [ffff88808a502440, ffff88808a503440) The buggy address belongs to the page: page:ffffea0002294080 count:1 mapcount:0 mapping:ffff88812c29cdc0 index:0x0 compound_mapcount: 0 flags: 0xfffe0000008100(slab|head) raw: 00fffe0000008100 ffffea0002a11988 ffffea0002a1f808 ffff88812c29cdc0 raw: 0000000000000000 ffff88808a502440 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808a503180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88808a503200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88808a503280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88808a503300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88808a503380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================