================================================================== BUG: KASAN: use-after-free in route4_get+0x3e1/0x420 net/sched/cls_route.c:235 Read of size 4 at addr ffff88809f861740 by task syz-executor.0/8687 CPU: 0 PID: 8687 Comm: syz-executor.0 Not tainted 5.6.0-next-20200411-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+0x188/0x20d lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd3/0x315 mm/kasan/report.c:382 __kasan_report.cold+0x35/0x4d mm/kasan/report.c:511 kasan_report+0x33/0x50 mm/kasan/common.c:625 route4_get+0x3e1/0x420 net/sched/cls_route.c:235 tc_new_tfilter+0x7a9/0x20b0 net/sched/cls_api.c:2147 rtnetlink_rcv_msg+0x810/0xad0 net/core/rtnetlink.c:5445 netlink_rcv_skb+0x15a/0x410 net/netlink/af_netlink.c:2469 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline] netlink_unicast+0x537/0x740 net/netlink/af_netlink.c:1329 netlink_sendmsg+0x882/0xe10 net/netlink/af_netlink.c:1918 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:672 ____sys_sendmsg+0x6bf/0x7e0 net/socket.c:2362 ___sys_sendmsg+0x100/0x170 net/socket.c:2416 __sys_sendmsg+0xec/0x1b0 net/socket.c:2449 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 RIP: 0033:0x45c889 Code: ad 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 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f3098620c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f30986216d4 RCX: 000000000045c889 RDX: 0000000000000000 RSI: 0000000020000280 RDI: 0000000000000007 RBP: 000000000076bfa0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000009fd R14: 00000000004ccb8d R15: 000000000076bfac Allocated by task 8682: save_stack+0x1b/0x40 mm/kasan/common.c:49 set_track mm/kasan/common.c:57 [inline] __kasan_kmalloc mm/kasan/common.c:495 [inline] __kasan_kmalloc.constprop.0+0xbf/0xd0 mm/kasan/common.c:468 kmem_cache_alloc_trace+0x153/0x7d0 mm/slab.c:3551 kmalloc include/linux/slab.h:555 [inline] kzalloc include/linux/slab.h:669 [inline] route4_change+0x2a8/0x2270 net/sched/cls_route.c:493 tc_new_tfilter+0xa59/0x20b0 net/sched/cls_api.c:2168 rtnetlink_rcv_msg+0x810/0xad0 net/core/rtnetlink.c:5445 netlink_rcv_skb+0x15a/0x410 net/netlink/af_netlink.c:2469 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline] netlink_unicast+0x537/0x740 net/netlink/af_netlink.c:1329 netlink_sendmsg+0x882/0xe10 net/netlink/af_netlink.c:1918 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:672 ____sys_sendmsg+0x6bf/0x7e0 net/socket.c:2362 ___sys_sendmsg+0x100/0x170 net/socket.c:2416 __sys_sendmsg+0xec/0x1b0 net/socket.c:2449 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 Freed by task 40: save_stack+0x1b/0x40 mm/kasan/common.c:49 set_track mm/kasan/common.c:57 [inline] kasan_set_free_info mm/kasan/common.c:317 [inline] __kasan_slab_free+0xf7/0x140 mm/kasan/common.c:456 __cache_free mm/slab.c:3426 [inline] kfree+0x109/0x2b0 mm/slab.c:3757 route4_delete_filter_work+0x17/0x20 net/sched/cls_route.c:266 process_one_work+0x965/0x16a0 kernel/workqueue.c:2268 worker_thread+0x96/0xe20 kernel/workqueue.c:2414 kthread+0x388/0x470 kernel/kthread.c:268 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 The buggy address belongs to the object at ffff88809f861700 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 64 bytes inside of 192-byte region [ffff88809f861700, ffff88809f8617c0) The buggy address belongs to the page: page:ffffea00027e1840 refcount:1 mapcount:0 mapping:000000000b2f9698 index:0xffff88809f861100 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea000241a008 ffffea0002920048 ffff8880aa000000 raw: ffff88809f861100 ffff88809f861000 000000010000000e 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809f861600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88809f861680: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc >ffff88809f861700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88809f861780: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88809f861800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================