bisecting fixing commit since e23d55af0e1fca9be5c99f0c37d48b289f4d6489 building syzkaller on f62a58290e2f1200a2b21f2707a9ff0394a2a724 testing commit e23d55af0e1fca9be5c99f0c37d48b289f4d6489 compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: fcb7d0358674865151da9c414aef7a9eee427475e2e952d6315d9ba033e7db25 run #0: crashed: KASAN: use-after-free Read in route4_destroy run #1: crashed: KASAN: use-after-free Read in route4_destroy run #2: crashed: KASAN: use-after-free Read in route4_destroy run #3: crashed: KASAN: use-after-free Read in route4_destroy run #4: crashed: KASAN: use-after-free Read in route4_destroy run #5: crashed: KASAN: use-after-free Read in route4_destroy run #6: crashed: KASAN: use-after-free Read in route4_destroy run #7: crashed: WARNING: ODEBUG bug in tcf_queue_work run #8: crashed: WARNING: ODEBUG bug in __init_work run #9: crashed: KASAN: use-after-free Read in route4_destroy run #10: crashed: KASAN: use-after-free Read in route4_destroy run #11: crashed: KASAN: use-after-free Read in route4_destroy run #12: crashed: KASAN: use-after-free Read in route4_destroy run #13: crashed: WARNING: ODEBUG bug in tcf_queue_work run #14: crashed: KASAN: use-after-free Read in route4_destroy run #15: crashed: KASAN: use-after-free Read in route4_destroy run #16: crashed: KASAN: use-after-free Read in route4_destroy run #17: crashed: KASAN: use-after-free Read in route4_get run #18: crashed: KASAN: use-after-free Read in route4_destroy run #19: crashed: KASAN: use-after-free Read in route4_destroy testing current HEAD c2276d585654e8d573366c29c565043ec36adf63 testing commit c2276d585654e8d573366c29c565043ec36adf63 compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: 6dd466ff8780bb8f5c47798e07effa7c14099e85728f6011d375259f576394ec run #0: crashed: KASAN: use-after-free Read in route4_destroy run #1: crashed: WARNING: ODEBUG bug in tcf_queue_work run #2: crashed: KASAN: use-after-free Read in route4_destroy run #3: crashed: KASAN: use-after-free Read in route4_destroy run #4: crashed: KASAN: use-after-free Read in route4_destroy run #5: crashed: WARNING: ODEBUG bug in __init_work run #6: crashed: KASAN: use-after-free Read in route4_destroy run #7: crashed: KASAN: use-after-free Read in route4_destroy run #8: crashed: KASAN: use-after-free Read in route4_destroy run #9: crashed: KASAN: use-after-free Read in route4_destroy revisions tested: 2, total time: 26m55.622424134s (build: 19m39.424520776s, test: 6m46.629888331s) the crash still happens on HEAD commit msg: Linux 4.19.208 crash: KASAN: use-after-free Read in route4_destroy wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50 wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50 Bluetooth: hci1: command 0x0419 tx timeout Bluetooth: hci0: command 0x0419 tx timeout ================================================================== BUG: KASAN: use-after-free in route4_destroy+0x543/0x6f0 net/sched/cls_route.c:298 Read of size 8 at addr ffff8880b4b73f00 by task syz-executor.3/9996 CPU: 0 PID: 9996 Comm: syz-executor.3 Not tainted 4.19.208-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/0x226 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 mm/kasan/report.c:412 [inline] kasan_report.cold.7+0x242/0x2fe mm/kasan/report.c:396 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 route4_destroy+0x543/0x6f0 net/sched/cls_route.c:298 Bluetooth: hci4: command 0x0419 tx timeout tcf_proto_destroy+0x59/0x100 net/sched/cls_api.c:190 tcf_chain_flush+0x1a1/0x2a0 net/sched/cls_api.c:362 tcf_block_put_ext.part.23+0x37d/0x670 net/sched/cls_api.c:770 tcf_block_put_ext net/sched/cls_api.c:754 [inline] tcf_block_put+0xa8/0xf0 net/sched/cls_api.c:797 drr_destroy_qdisc+0x42/0x1e0 net/sched/sch_drr.c:464 qdisc_destroy+0x128/0x650 net/sched/sch_generic.c:983 notify_and_destroy+0x34/0x40 net/sched/sch_api.c:925 qdisc_graft+0x86c/0xdf0 net/sched/sch_api.c:983 tc_modify_qdisc+0x969/0x18e0 net/sched/sch_api.c:1583 rtnetlink_rcv_msg+0x34f/0x950 net/core/rtnetlink.c:4782 netlink_rcv_skb+0x13e/0x3d0 net/netlink/af_netlink.c:2457 rtnetlink_rcv+0x10/0x20 net/core/rtnetlink.c:4800 netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline] netlink_unicast+0x443/0x660 net/netlink/af_netlink.c:1346 netlink_sendmsg+0x667/0xc60 net/netlink/af_netlink.c:1911 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xac/0xf0 net/socket.c:661 ___sys_sendmsg+0x647/0x950 net/socket.c:2227 __sys_sendmsg+0xd9/0x180 net/socket.c:2265 __do_sys_sendmsg net/socket.c:2274 [inline] __se_sys_sendmsg net/socket.c:2272 [inline] __x64_sys_sendmsg+0x73/0xb0 net/socket.c:2272 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4665f9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f2e43794188 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665f9 RDX: 0000000000000000 RSI: 0000000020000040 RDI: 0000000000000004 RBP: 00000000004bfcc4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80 R13: 00007fff6c3798bf R14: 00007f2e43794300 R15: 0000000000022000 Allocated by task 9944: 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 kmem_cache_alloc_trace+0x152/0x3a0 mm/slab.c:3625 kmalloc include/linux/slab.h:515 [inline] kzalloc include/linux/slab.h:709 [inline] route4_change+0x24a/0x1d70 net/sched/cls_route.c:495 tc_new_tfilter+0x61c/0x1560 net/sched/cls_api.c:1320 rtnetlink_rcv_msg+0x34f/0x950 net/core/rtnetlink.c:4782 netlink_rcv_skb+0x13e/0x3d0 net/netlink/af_netlink.c:2457 rtnetlink_rcv+0x10/0x20 net/core/rtnetlink.c:4800 netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline] netlink_unicast+0x443/0x660 net/netlink/af_netlink.c:1346 netlink_sendmsg+0x667/0xc60 net/netlink/af_netlink.c:1911 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xac/0xf0 net/socket.c:661 ___sys_sendmsg+0x647/0x950 net/socket.c:2227 __sys_sendmsg+0xd9/0x180 net/socket.c:2265 __do_sys_sendmsg net/socket.c:2274 [inline] __se_sys_sendmsg net/socket.c:2272 [inline] __x64_sys_sendmsg+0x73/0xb0 net/socket.c:2272 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 33: save_stack mm/kasan/kasan.c:448 [inline] set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x13c/0x220 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3503 [inline] kfree+0xcf/0x220 mm/slab.c:3822 __route4_delete_filter+0x49/0x70 net/sched/cls_route.c:261 route4_delete_filter_work+0x16/0x20 net/sched/cls_route.c:270 process_one_work+0x7b9/0x15a0 kernel/workqueue.c:2153 worker_thread+0x85/0xb60 kernel/workqueue.c:2296 kthread+0x347/0x410 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 The buggy address belongs to the object at ffff8880b4b73f00 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 0 bytes inside of 192-byte region [ffff8880b4b73f00, ffff8880b4b73fc0) The buggy address belongs to the page: page:ffffea0002d2dcc0 count:1 mapcount:0 mapping:ffff88813bff6040 index:0x0 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea00025e39c8 ffffea0002d2f088 ffff88813bff6040 raw: 0000000000000000 ffff8880b4b73000 0000000100000010 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880b4b73e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880b4b73e80: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc >ffff8880b4b73f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880b4b73f80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8880b4b74000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== Bluetooth: hci5: command 0x0419 tx timeout Bluetooth: hci3: command 0x0419 tx timeout