bisecting fixing commit since 01364dad1d4577e27a57729d41053f661bb8a5b9 building syzkaller on f1ebdfba7dc69d1934e89c2613ab7b4ec300016b testing commit 01364dad1d4577e27a57729d41053f661bb8a5b9 with gcc (GCC) 8.1.0 kernel signature: 813f8c84e168960133ed81110cc3cf70e6bf44859b7b3de05672fb3c8567de51 run #0: crashed: KASAN: use-after-free Read in route4_get run #1: crashed: KASAN: use-after-free Read in route4_get run #2: crashed: KASAN: use-after-free Read in route4_get run #3: crashed: KASAN: use-after-free Read in route4_get run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK testing current HEAD 4f68020fef1c6cf1b680ffb6481ac41379283ea3 testing commit 4f68020fef1c6cf1b680ffb6481ac41379283ea3 with gcc (GCC) 8.1.0 kernel signature: 783c1abb5c41450f61c9fef36f49b6ee818fc8340a31e6723f36b5a604dbb455 run #0: crashed: KASAN: use-after-free Read in route4_get run #1: crashed: KASAN: use-after-free Read in route4_get run #2: crashed: KASAN: use-after-free Read in route4_get run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK revisions tested: 2, total time: 38m2.143982832s (build: 17m35.475144311s, test: 19m28.537814345s) the crash still happens on HEAD commit msg: Linux 4.14.182 crash: KASAN: use-after-free Read in route4_get IPv6: ADDRCONF(NETDEV_CHANGE): batadv_slave_0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth0_to_batadv: link becomes ready 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 route4_get+0x2b0/0x2c0 net/sched/cls_route.c:242 Read of size 4 at addr ffff88809e903a40 by task syz-executor.5/8234 CPU: 1 PID: 8234 Comm: syz-executor.5 Not tainted 4.14.182-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+0xf7/0x13b lib/dump_stack.c:58 print_address_description.cold.7+0x9/0x1c9 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report.cold.8+0x11a/0x2d3 mm/kasan/report.c:409 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:429 route4_get+0x2b0/0x2c0 net/sched/cls_route.c:242 tc_ctl_tfilter+0xb63/0x1b2e net/sched/cls_api.c:689 rtnetlink_rcv_msg+0x34c/0x9e0 net/core/rtnetlink.c:4315 netlink_rcv_skb+0x133/0x370 net/netlink/af_netlink.c:2433 rtnetlink_rcv+0x10/0x20 net/core/rtnetlink.c:4327 netlink_unicast_kernel net/netlink/af_netlink.c:1287 [inline] netlink_unicast+0x40b/0x600 net/netlink/af_netlink.c:1313 netlink_sendmsg+0x730/0xbd0 net/netlink/af_netlink.c:1878 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:656 ___sys_sendmsg+0x625/0x920 net/socket.c:2062 __sys_sendmsg+0xc1/0x140 net/socket.c:2096 SYSC_sendmsg net/socket.c:2107 [inline] SyS_sendmsg+0xd/0x20 net/socket.c:2103 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x45c849 RSP: 002b:00007f0295433c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f02954346d4 RCX: 000000000045c849 RDX: 0000000000000000 RSI: 0000000020000280 RDI: 0000000000000006 RBP: 000000000076bfa0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000009fd R14: 00000000004ccb4d R15: 000000000076bfac Allocated by task 8231: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:551 kmem_cache_alloc_trace+0x152/0x7a0 mm/slab.c:3618 kmalloc include/linux/slab.h:488 [inline] kzalloc include/linux/slab.h:661 [inline] route4_change+0x1ed/0x1abd net/sched/cls_route.c:498 tc_ctl_tfilter+0x1151/0x1b2e net/sched/cls_api.c:738 rtnetlink_rcv_msg+0x34c/0x9e0 net/core/rtnetlink.c:4315 netlink_rcv_skb+0x133/0x370 net/netlink/af_netlink.c:2433 rtnetlink_rcv+0x10/0x20 net/core/rtnetlink.c:4327 netlink_unicast_kernel net/netlink/af_netlink.c:1287 [inline] netlink_unicast+0x40b/0x600 net/netlink/af_netlink.c:1313 netlink_sendmsg+0x730/0xbd0 net/netlink/af_netlink.c:1878 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:656 ___sys_sendmsg+0x625/0x920 net/socket.c:2062 __sys_sendmsg+0xc1/0x140 net/socket.c:2096 SYSC_sendmsg net/socket.c:2107 [inline] SyS_sendmsg+0xd/0x20 net/socket.c:2103 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb Freed by task 43: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x71/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xcc/0x270 mm/slab.c:3815 __route4_delete_filter+0x43/0x60 net/sched/cls_route.c:264 route4_delete_filter_work+0x16/0x20 net/sched/cls_route.c:272 process_one_work+0x79e/0x16c0 kernel/workqueue.c:2116 worker_thread+0xcc/0xee0 kernel/workqueue.c:2250 kthread+0x338/0x400 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 The buggy address belongs to the object at ffff88809e903a00 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 64 bytes inside of 192-byte region [ffff88809e903a00, ffff88809e903ac0) The buggy address belongs to the page: page:ffffea00027a40c0 count:1 mapcount:0 mapping:ffff88809e903000 index:0x0 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffff88809e903000 0000000000000000 0000000100000010 raw: ffffea00027bfc60 ffffea00027bd360 ffff8880aa800040 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809e903900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88809e903980: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88809e903a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88809e903a80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88809e903b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================