bisecting fixing commit since b98aebd298246df37b472c52a2ee1023256d02e3 building syzkaller on 8c88c9c1c99c8cd8dabc951164c820b9c9f25114 testing commit b98aebd298246df37b472c52a2ee1023256d02e3 with gcc (GCC) 8.1.0 kernel signature: 52b3cc003166e8f0afa414c0e82f3311a4542aba981c2ad2abdb226d66b962db all runs: crashed: KASAN: slab-out-of-bounds Read in tcf_exts_destroy testing current HEAD e0f8b8a65a473a8baa439cf865a694bbeb83fe90 testing commit e0f8b8a65a473a8baa439cf865a694bbeb83fe90 with gcc (GCC) 8.1.0 kernel signature: 12c86ff9e3ae9fd3197e041088a0a42c064adb4f6f047508734bb0d2dc173823 all runs: crashed: KASAN: slab-out-of-bounds Read in tcf_exts_destroy revisions tested: 2, total time: 22m48.967836045s (build: 16m7.906537115s, test: 6m16.222997886s) the crash still happens on HEAD commit msg: Linux 4.14.170 crash: KASAN: slab-out-of-bounds Read in tcf_exts_destroy bridge0: port 2(bridge_slave_1) entered blocking state bridge0: port 2(bridge_slave_1) entered disabled state device bridge_slave_1 entered promiscuous mode ================================================================== BUG: KASAN: slab-out-of-bounds in tcf_exts_to_list include/net/pkt_cls.h:150 [inline] BUG: KASAN: slab-out-of-bounds in tcf_exts_destroy+0x2b4/0x3b0 net/sched/cls_api.c:897 Read of size 4 at addr ffff888089268bb4 by task syz-executor.1/7002 CPU: 0 PID: 7002 Comm: syz-executor.1 Not tainted 4.14.170-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 tcf_exts_to_list include/net/pkt_cls.h:150 [inline] tcf_exts_destroy+0x2b4/0x3b0 net/sched/cls_api.c:897 tcindex_free_perfect_hash.isra.6+0x8e/0x110 net/sched/cls_tcindex.c:291 tcindex_set_parms+0xe11/0x1ae0 net/sched/cls_tcindex.c:502 tcindex_change+0x1b7/0x24e net/sched/cls_tcindex.c:535 tc_ctl_tfilter+0x1151/0x1b2e net/sched/cls_api.c:738 rtnetlink_rcv_msg+0x34f/0x9d0 net/core/rtnetlink.c:4315 netlink_rcv_skb+0x133/0x370 net/netlink/af_netlink.c:2432 rtnetlink_rcv+0x10/0x20 net/core/rtnetlink.c:4327 netlink_unicast_kernel net/netlink/af_netlink.c:1286 [inline] netlink_unicast+0x40d/0x5f0 net/netlink/af_netlink.c:1312 netlink_sendmsg+0x730/0xbd0 net/netlink/af_netlink.c:1877 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:656 ___sys_sendmsg+0x282/0x920 net/socket.c:2062 __sys_sendmmsg+0x126/0x300 net/socket.c:2152 SYSC_sendmmsg net/socket.c:2183 [inline] SyS_sendmmsg+0xd/0x20 net/socket.c:2178 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x459a59 RSP: 002b:00007fcbb22dcc78 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: 00007fcbb22dd6d4 R13: 00000000004c74c1 R14: 00000000004dd1c0 R15: 00000000ffffffff Allocated by task 7002: 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 __do_kmalloc mm/slab.c:3720 [inline] __kmalloc+0x15b/0x7b0 mm/slab.c:3729 kmalloc_array include/linux/slab.h:607 [inline] kcalloc include/linux/slab.h:618 [inline] tcindex_alloc_perfect_hash+0x4f/0x2e0 net/sched/cls_tcindex.c:299 tcindex_set_parms+0x3b8/0x1ae0 net/sched/cls_tcindex.c:357 tcindex_change+0x1b7/0x24e net/sched/cls_tcindex.c:535 tc_ctl_tfilter+0x1151/0x1b2e net/sched/cls_api.c:738 rtnetlink_rcv_msg+0x34f/0x9d0 net/core/rtnetlink.c:4315 netlink_rcv_skb+0x133/0x370 net/netlink/af_netlink.c:2432 rtnetlink_rcv+0x10/0x20 net/core/rtnetlink.c:4327 netlink_unicast_kernel net/netlink/af_netlink.c:1286 [inline] netlink_unicast+0x40d/0x5f0 net/netlink/af_netlink.c:1312 netlink_sendmsg+0x730/0xbd0 net/netlink/af_netlink.c:1877 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:656 ___sys_sendmsg+0x282/0x920 net/socket.c:2062 __sys_sendmmsg+0x126/0x300 net/socket.c:2152 SYSC_sendmmsg net/socket.c:2183 [inline] SyS_sendmmsg+0xd/0x20 net/socket.c:2178 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 0: (stack is not available) The buggy address belongs to the object at ffff888089268b40 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 116 bytes inside of 128-byte region [ffff888089268b40, ffff888089268bc0) The buggy address belongs to the page: page:ffffea0002249a00 count:1 mapcount:0 mapping:ffff888089268000 index:0x0 flags: 0x1fffc0000000100(slab) raw: 01fffc0000000100 ffff888089268000 0000000000000000 0000000100000015 raw: ffffea00029c4320 ffff8880aa801548 ffff8880aa800640 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888089268a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888089268b00: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 >ffff888089268b80: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc ^ ffff888089268c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc ffff888089268c80: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ==================================================================