bisecting fixing commit since 2b79150141611d3c6e1b55d4e70f49602482f0b8 building syzkaller on 8bc4594f832068a30c0eff44d468311780057d1f testing commit 2b79150141611d3c6e1b55d4e70f49602482f0b8 with gcc (GCC) 8.4.1 20210217 kernel signature: 77c561dc9c0ab81e8691ca74204bdbad2a0b320a2ae1763afecd51ca045cb395 run #0: crashed: general protection fault in __tcf_idr_release run #1: crashed: general protection fault in __tcf_idr_release run #2: crashed: general protection fault in __tcf_idr_release run #3: crashed: KASAN: use-after-free Read in tcf_action_destroy run #4: crashed: general protection fault in __tcf_idr_release run #5: crashed: BUG: unable to handle kernel paging request in tcf_action_destroy run #6: crashed: general protection fault in __tcf_idr_release run #7: crashed: general protection fault in __tcf_idr_release run #8: crashed: BUG: unable to handle kernel paging request in tcf_action_destroy run #9: crashed: general protection fault in __tcf_idr_release run #10: crashed: BUG: unable to handle kernel paging request in tcf_action_destroy run #11: crashed: KASAN: stack-out-of-bounds Read in tcf_action_destroy run #12: crashed: general protection fault in __tcf_idr_release run #13: crashed: general protection fault in __tcf_idr_release run #14: crashed: general protection fault in __tcf_idr_release run #15: crashed: general protection fault in __tcf_idr_release run #16: crashed: KASAN: use-after-free Read in tcf_action_destroy run #17: crashed: KASAN: out-of-bounds Read in tcf_action_destroy run #18: crashed: general protection fault in __tcf_idr_release run #19: crashed: general protection fault in __tcf_idr_release testing current HEAD cb83ddcd5332fcc3efd52ba994976efc4dd6061e testing commit cb83ddcd5332fcc3efd52ba994976efc4dd6061e with gcc (GCC) 8.4.1 20210217 kernel signature: 41cfc3cb100970166d0e1b756a623ebcbbec4b499322e849b2063d9bd13f67a4 run #0: crashed: BUG: unable to handle kernel paging request in tcf_action_destroy run #1: crashed: BUG: unable to handle kernel paging request in tcf_action_destroy run #2: crashed: general protection fault in __tcf_idr_release run #3: crashed: KASAN: out-of-bounds Read in tcf_action_destroy run #4: crashed: general protection fault in __tcf_idr_release run #5: crashed: general protection fault in __tcf_idr_release run #6: crashed: BUG: unable to handle kernel paging request in tcf_action_destroy run #7: crashed: general protection fault in __tcf_idr_release run #8: crashed: general protection fault in __tcf_idr_release run #9: crashed: KASAN: stack-out-of-bounds Read in tcf_action_destroy revisions tested: 2, total time: 21m54.104208905s (build: 14m30.574338896s, test: 7m1.580062476s) the crash still happens on HEAD commit msg: Linux 4.14.226 crash: KASAN: stack-out-of-bounds Read in tcf_action_destroy netlink: 32 bytes leftover after parsing attributes in process `syz-executor.0'. netlink: 32 bytes leftover after parsing attributes in process `syz-executor.3'. netlink: 32 bytes leftover after parsing attributes in process `syz-executor.1'. ================================================================== BUG: KASAN: stack-out-of-bounds in tcf_action_destroy+0x115/0x160 net/sched/act_api.c:525 Read of size 8 at addr ffff8881d0aff688 by task syz-executor.0/14163 CPU: 0 PID: 14163 Comm: syz-executor.0 Not tainted 4.14.226-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+0x14b/0x1e7 lib/dump_stack.c:58 print_address_description.cold.6+0x9/0x1ca mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report mm/kasan/report.c:409 [inline] kasan_report.cold.7+0x11a/0x2d3 mm/kasan/report.c:393 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:430 tcf_action_destroy+0x115/0x160 net/sched/act_api.c:525 tcf_action_init+0x335/0x460 net/sched/act_api.c:769 tcf_action_add net/sched/act_api.c:1079 [inline] tc_ctl_action+0x3c4/0x580 net/sched/act_api.c:1131 rtnetlink_rcv_msg+0x34c/0x9e0 net/core/rtnetlink.c:4316 netlink_rcv_skb+0x12f/0x3b0 net/netlink/af_netlink.c:2433 rtnetlink_rcv+0x10/0x20 net/core/rtnetlink.c:4328 netlink_unicast_kernel net/netlink/af_netlink.c:1287 [inline] netlink_unicast+0x40b/0x610 net/netlink/af_netlink.c:1313 netlink_sendmsg+0x639/0xbe0 net/netlink/af_netlink.c:1878 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xac/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:0x465889 RSP: 002b:00007f6477e75188 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 000000000055bf00 RCX: 0000000000465889 RDX: 0000000000000000 RSI: 0000000020002980 RDI: 0000000000000003 RBP: 00000000004af68d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000055bf00 R13: 00007ffffe307baf R14: 00007f6477e75300 R15: 0000000000022000 The buggy address belongs to the page: page:ffffea000742bfc0 count:0 mapcount:0 mapping: (null) index:0x0 flags: 0x17ff00000000000() raw: 017ff00000000000 0000000000000000 0000000000000000 00000000ffffffff raw: 0000000000000000 0000000100000001 0000000000000000 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881d0aff580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881d0aff600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8881d0aff680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff8881d0aff700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881d0aff780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 ================================================================== kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] PREEMPT SMP KASAN Modules linked in: CPU: 0 PID: 14163 Comm: syz-executor.0 Tainted: G B 4.14.226-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 task: ffff8881df9fc600 task.stack: ffff8881c6c20000 RIP: 0010:__tcf_idr_release net/sched/act_api.c:100 [inline] RIP: 0010:__tcf_idr_release+0x105/0x1c0 net/sched/act_api.c:85 RSP: 0018:ffff8881c6c273d8 EFLAGS: 00010206 RAX: 48dffffc00000000 RBX: ffff8881d0aff678 RCX: ffff8881d0aff678 RDX: 1ffffffff027b311 RSI: 0000000000000000 RDI: ffff8881d0aff678 RBP: ffff8881c6c273f8 R08: 0000000000000000 R09: 0000000000000000 R10: fffffbfff15ec0eb R11: dffffc0000000000 R12: 0000000000000000 R13: ffffffff813d9840 R14: 0000000000000001 R15: 0000000000000000 FS: 00007f6477e75700(0000) GS:ffff8881f6400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fe14807ea21 CR3: 00000001d5976004 CR4: 00000000001606f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: tcf_action_destroy+0xbf/0x160 net/sched/act_api.c:527 tcf_action_init+0x335/0x460 net/sched/act_api.c:769 tcf_action_add net/sched/act_api.c:1079 [inline] tc_ctl_action+0x3c4/0x580 net/sched/act_api.c:1131 rtnetlink_rcv_msg+0x34c/0x9e0 net/core/rtnetlink.c:4316 netlink_rcv_skb+0x12f/0x3b0 net/netlink/af_netlink.c:2433 rtnetlink_rcv+0x10/0x20 net/core/rtnetlink.c:4328 netlink_unicast_kernel net/netlink/af_netlink.c:1287 [inline] netlink_unicast+0x40b/0x610 net/netlink/af_netlink.c:1313 netlink_sendmsg+0x639/0xbe0 net/netlink/af_netlink.c:1878 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xac/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:0x465889 RSP: 002b:00007f6477e75188 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 000000000055bf00 RCX: 0000000000465889 RDX: 0000000000000000 RSI: 0000000020002980 RDI: 0000000000000003 RBP: 00000000004af68d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000055bf00 R13: 00007ffffe307baf R14: 00007f6477e75300 R15: 0000000000022000 Code: fc ff df 4c 8b 2b 49 8d 7d 48 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 b2 00 00 00 49 8b 45 48 48 85 c0 74 09 41 0f b6 f4 48 89 df d0 48 8d 7b 20 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 RIP: __tcf_idr_release net/sched/act_api.c:100 [inline] RSP: ffff8881c6c273d8 RIP: __tcf_idr_release+0x105/0x1c0 net/sched/act_api.c:85 RSP: ffff8881c6c273d8 ---[ end trace c8699c948afc7614 ]---