bisecting fixing commit since 01364dad1d4577e27a57729d41053f661bb8a5b9 building syzkaller on f1ebdfba7dc69d1934e89c2613ab7b4ec300016b testing commit 01364dad1d4577e27a57729d41053f661bb8a5b9 with gcc (GCC) 8.1.0 kernel signature: 32a168acdf50be706623a6a4008eadef34b955ab8f8c585f073507c85bd35b8b 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 testing current HEAD 050272a0423e68207fd2367831ae610680129062 testing commit 050272a0423e68207fd2367831ae610680129062 with gcc (GCC) 8.1.0 kernel signature: e448844a1fb9f23f26010f21bd12bd5170295970b76c710898269483b03925d3 run #0: crashed: KASAN: use-after-free Read in route4_get run #1: OK run #2: OK 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: 38m11.573524729s (build: 17m54.129219394s, test: 19m32.632884686s) the crash still happens on HEAD commit msg: Linux 4.14.177 crash: KASAN: use-after-free Read in route4_get IPv6: ADDRCONF(NETDEV_UP): batadv_slave_1: link is not ready 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 route4_get+0x2b0/0x2c0 net/sched/cls_route.c:242 Read of size 4 at addr ffff88809e8c9a40 by task syz-executor.3/8267 CPU: 1 PID: 8267 Comm: syz-executor.3 Not tainted 4.14.177-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+0x42/0xb7 RIP: 0033:0x45c849 RSP: 002b:00007f55e6cc1c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f55e6cc26d4 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 8262: 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+0x42/0xb7 Freed by task 22: 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 ffff88809e8c9a00 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 64 bytes inside of 192-byte region [ffff88809e8c9a00, ffff88809e8c9ac0) The buggy address belongs to the page: page:ffffea00027a3240 count:1 mapcount:0 mapping:ffff88809e8c9000 index:0x0 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffff88809e8c9000 0000000000000000 0000000100000010 raw: ffffea0002866a20 ffffea00027a36e0 ffff8880aa800040 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809e8c9900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88809e8c9980: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff88809e8c9a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88809e8c9a80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88809e8c9b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================