bisecting fixing commit since dafd634415a7f9892a6fcc99c540fe567ab42c92 building syzkaller on 8c88c9c1c99c8cd8dabc951164c820b9c9f25114 testing commit dafd634415a7f9892a6fcc99c540fe567ab42c92 with gcc (GCC) 8.1.0 kernel signature: aadd417d046dacef24b0f4d94df81f5917526f80c0d2370dd2d4022593c10536 all runs: crashed: KASAN: slab-out-of-bounds Read in tcf_exts_destroy testing current HEAD b499cf4b3a901e87e1f933df04abf69b54de4457 testing commit b499cf4b3a901e87e1f933df04abf69b54de4457 with gcc (GCC) 8.1.0 kernel signature: d566d87cc48b9155ae8fe695c00ed1982014c05f9bf995b021a0e23eb3274831 all runs: crashed: KASAN: slab-out-of-bounds Read in tcf_exts_destroy revisions tested: 2, total time: 23m59.580342124s (build: 16m47.090098231s, test: 6m20.516261226s) the crash still happens on HEAD commit msg: Linux 4.19.102 crash: KASAN: slab-out-of-bounds Read in tcf_exts_destroy netlink: 'syz-executor.3': attribute type 2 has an invalid length. netlink: 'syz-executor.2': attribute type 2 has an invalid length. netlink: 'syz-executor.5': attribute type 2 has an invalid length. netlink: 'syz-executor.3': attribute type 2 has an invalid length. ================================================================== BUG: KASAN: slab-out-of-bounds in tcf_exts_destroy+0x9d/0xb0 net/sched/cls_api.c:2041 Read of size 8 at addr ffff88808b7f0290 by task syz-executor.3/7225 CPU: 0 PID: 7225 Comm: syz-executor.3 Not tainted 4.19.102-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+0x123/0x177 lib/dump_stack.c:118 print_address_description.cold.8+0x9/0x1ff mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.9+0x242/0x309 mm/kasan/report.c:412 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 tcf_exts_destroy+0x9d/0xb0 net/sched/cls_api.c:2041 tcindex_free_perfect_hash.isra.7+0x91/0x110 net/sched/cls_tcindex.c:270 tcindex_set_parms+0x1149/0x1dc0 net/sched/cls_tcindex.c:484 tcindex_change+0x1dd/0x293 net/sched/cls_tcindex.c:518 tc_new_tfilter+0x613/0x1550 net/sched/cls_api.c:1320 rtnetlink_rcv_msg+0x34f/0x8f0 net/core/rtnetlink.c:4777 netlink_rcv_skb+0x142/0x390 net/netlink/af_netlink.c:2454 rtnetlink_rcv+0x10/0x20 net/core/rtnetlink.c:4795 netlink_unicast_kernel net/netlink/af_netlink.c:1317 [inline] netlink_unicast+0x445/0x640 net/netlink/af_netlink.c:1343 netlink_sendmsg+0x765/0xc50 net/netlink/af_netlink.c:1908 sock_sendmsg_nosec net/socket.c:622 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:632 ___sys_sendmsg+0x28e/0x950 net/socket.c:2115 __sys_sendmmsg+0x160/0x370 net/socket.c:2210 __do_sys_sendmmsg net/socket.c:2239 [inline] __se_sys_sendmmsg net/socket.c:2236 [inline] __x64_sys_sendmmsg+0x98/0x100 net/socket.c:2236 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x459a59 Code: fd b7 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 cb b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f68c4eb2c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 0000000000459a59 RDX: 0000000000000332 RSI: 0000000020000140 RDI: 0000000000000008 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f68c4eb36d4 R13: 00000000004c74c1 R14: 00000000004dd1c0 R15: 00000000ffffffff Allocated by task 7225: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:553 __do_kmalloc mm/slab.c:3727 [inline] __kmalloc+0x15b/0x770 mm/slab.c:3736 kmalloc_array include/linux/slab.h:637 [inline] kcalloc include/linux/slab.h:648 [inline] tcindex_alloc_perfect_hash+0x56/0x330 net/sched/cls_tcindex.c:278 tcindex_set_parms+0x3f7/0x1dc0 net/sched/cls_tcindex.c:339 tcindex_change+0x1dd/0x293 net/sched/cls_tcindex.c:518 tc_new_tfilter+0x613/0x1550 net/sched/cls_api.c:1320 rtnetlink_rcv_msg+0x34f/0x8f0 net/core/rtnetlink.c:4777 netlink_rcv_skb+0x142/0x390 net/netlink/af_netlink.c:2454 rtnetlink_rcv+0x10/0x20 net/core/rtnetlink.c:4795 netlink_unicast_kernel net/netlink/af_netlink.c:1317 [inline] netlink_unicast+0x445/0x640 net/netlink/af_netlink.c:1343 netlink_sendmsg+0x765/0xc50 net/netlink/af_netlink.c:1908 sock_sendmsg_nosec net/socket.c:622 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:632 ___sys_sendmsg+0x28e/0x950 net/socket.c:2115 __sys_sendmmsg+0x160/0x370 net/socket.c:2210 __do_sys_sendmmsg net/socket.c:2239 [inline] __se_sys_sendmmsg net/socket.c:2236 [inline] __x64_sys_sendmmsg+0x98/0x100 net/socket.c:2236 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 ffff88808b7f0200 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 144 bytes inside of 192-byte region [ffff88808b7f0200, ffff88808b7f02c0) The buggy address belongs to the page: page:ffffea00022dfc00 count:1 mapcount:0 mapping:ffff88812c35e040 index:0x0 flags: 0x1fffc0000000100(slab) raw: 01fffc0000000100 ffffea000249e648 ffffea0002289708 ffff88812c35e040 raw: 0000000000000000 ffff88808b7f0000 0000000100000010 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808b7f0180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88808b7f0200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88808b7f0280: 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88808b7f0300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88808b7f0380: 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================