bisecting fixing commit since 88d6de67e390b6093f2c11189ad022988a9e2961 building syzkaller on 56cd6c9b80ee424566e3ceaf8a4b042803a130ad testing commit 88d6de67e390b6093f2c11189ad022988a9e2961 compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: 411ab67bd0c2ea1ba28f643a93dd3e2f86f5a86ee6b14650bfc4ddd2b3be2b26 all runs: crashed: KASAN: null-ptr-deref Read in __tcf_idr_release testing current HEAD 4938296e03bd227e5020d63d418956fe52baf97c testing commit 4938296e03bd227e5020d63d418956fe52baf97c compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: a1147ced9c9dfe4f06baec16e6b7f294efe8f83b682c96279d030485fa706c79 all runs: crashed: KASAN: null-ptr-deref Read in __tcf_idr_release revisions tested: 2, total time: 27m20.226606014s (build: 19m47.97620713s, test: 6m35.779798086s) the crash still happens on HEAD commit msg: Linux 4.19.198 crash: KASAN: null-ptr-deref Read in __tcf_idr_release batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! IPv6: ADDRCONF(NETDEV_UP): batadv_slave_1: link is not ready batman_adv: batadv0: Interface activated: batadv_slave_1 IPv6: ADDRCONF(NETDEV_UP): veth1_to_batadv: link is not ready ================================================================== BUG: KASAN: null-ptr-deref in atomic_read include/asm-generic/atomic-instrumented.h:21 [inline] BUG: KASAN: null-ptr-deref in __tcf_idr_release+0x30/0x90 net/sched/act_api.c:139 Read of size 4 at addr 0000000000000010 by task syz-executor.1/7056 CPU: 1 PID: 7056 Comm: syz-executor.1 Not tainted 4.19.198-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/0x171 lib/dump_stack.c:118 kasan_report_error mm/kasan/report.c:352 [inline] kasan_report mm/kasan/report.c:412 [inline] kasan_report.cold.9+0x6d/0x2fe mm/kasan/report.c:396 check_memory_region_inline mm/kasan/kasan.c:260 [inline] check_memory_region+0x13e/0x1b0 mm/kasan/kasan.c:267 kasan_check_read+0x11/0x20 mm/kasan/kasan.c:272 atomic_read include/asm-generic/atomic-instrumented.h:21 [inline] __tcf_idr_release+0x30/0x90 net/sched/act_api.c:139 tcf_del_walker net/sched/act_api.c:266 [inline] tcf_generic_walker+0x595/0x930 net/sched/act_api.c:292 tcf_ife_walker+0x113/0x1d0 net/sched/act_ife.c:862 tca_action_flush net/sched/act_api.c:1145 [inline] tca_action_gd+0xd27/0x1480 net/sched/act_api.c:1251 tc_ctl_action+0x1fe/0x3d0 net/sched/act_api.c:1376 rtnetlink_rcv_msg+0x34f/0x8f0 net/core/rtnetlink.c:4782 netlink_rcv_skb+0x13e/0x3d0 net/netlink/af_netlink.c:2457 rtnetlink_rcv+0x10/0x20 net/core/rtnetlink.c:4800 netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline] netlink_unicast+0x443/0x650 net/netlink/af_netlink.c:1346 netlink_sendmsg+0x764/0xc60 net/netlink/af_netlink.c:1911 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:661 ___sys_sendmsg+0x647/0x950 net/socket.c:2225 __sys_sendmsg+0xd9/0x180 net/socket.c:2263 __do_sys_sendmsg net/socket.c:2272 [inline] __se_sys_sendmsg net/socket.c:2270 [inline] __x64_sys_sendmsg+0x73/0xb0 net/socket.c:2270 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x462c89 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f89f48c6198 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00000000000009c2 RCX: 0000000000462c89 RDX: 0000000000000000 RSI: 0000000020000300 RDI: 0000000000000003 RBP: 000000000000002e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000052bfa8 R13: 00007f89f48c66bc R14: 00000000ffffffff R15: 0000000000000003 ================================================================== 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 CPU: 1 PID: 7056 Comm: syz-executor.1 Tainted: G B 4.19.198-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:__read_once_size include/linux/compiler.h:261 [inline] RIP: 0010:arch_atomic_read arch/x86/include/asm/atomic.h:31 [inline] RIP: 0010:atomic_read include/asm-generic/atomic-instrumented.h:22 [inline] RIP: 0010:__tcf_idr_release+0x41/0x90 net/sched/act_api.c:139 Code: 89 f3 74 44 84 d2 74 40 4c 8d 6f 20 be 04 00 00 00 4c 89 ef e8 d0 fa 24 fc 4c 89 ea 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <0f> b6 14 02 4c 89 e8 83 e0 07 83 c0 03 38 d0 7c 04 84 d2 75 30 41 RSP: 0018:ffff8881d206f070 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000002 RSI: 0000000000000004 RDI: ffffffff8a18b9a0 RBP: ffff8881d206f088 R08: fffffbfff10c56e5 R09: fffffbfff10c56e4 R10: fffffbfff10c56e4 R11: ffffffff8862b723 R12: fffffffffffffff0 R13: 0000000000000010 R14: ffff8881d206f1b0 R15: ffff8881d206f170 FS: 00007f89f48c6700(0000) GS:ffff8881f6900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffc56fe0cb0 CR3: 00000001d5617003 CR4: 00000000001606e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: tcf_del_walker net/sched/act_api.c:266 [inline] tcf_generic_walker+0x595/0x930 net/sched/act_api.c:292 tcf_ife_walker+0x113/0x1d0 net/sched/act_ife.c:862 tca_action_flush net/sched/act_api.c:1145 [inline] tca_action_gd+0xd27/0x1480 net/sched/act_api.c:1251 tc_ctl_action+0x1fe/0x3d0 net/sched/act_api.c:1376 rtnetlink_rcv_msg+0x34f/0x8f0 net/core/rtnetlink.c:4782 netlink_rcv_skb+0x13e/0x3d0 net/netlink/af_netlink.c:2457 rtnetlink_rcv+0x10/0x20 net/core/rtnetlink.c:4800 netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline] netlink_unicast+0x443/0x650 net/netlink/af_netlink.c:1346 netlink_sendmsg+0x764/0xc60 net/netlink/af_netlink.c:1911 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:661 ___sys_sendmsg+0x647/0x950 net/socket.c:2225 __sys_sendmsg+0xd9/0x180 net/socket.c:2263 __do_sys_sendmsg net/socket.c:2272 [inline] __se_sys_sendmsg net/socket.c:2270 [inline] __x64_sys_sendmsg+0x73/0xb0 net/socket.c:2270 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x462c89 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f89f48c6198 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00000000000009c2 RCX: 0000000000462c89 RDX: 0000000000000000 RSI: 0000000020000300 RDI: 0000000000000003 RBP: 000000000000002e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000052bfa8 R13: 00007f89f48c66bc R14: 00000000ffffffff R15: 0000000000000003 Modules linked in: ---[ end trace d182918926288799 ]--- RIP: 0010:__read_once_size include/linux/compiler.h:261 [inline] RIP: 0010:arch_atomic_read arch/x86/include/asm/atomic.h:31 [inline] RIP: 0010:atomic_read include/asm-generic/atomic-instrumented.h:22 [inline] RIP: 0010:__tcf_idr_release+0x41/0x90 net/sched/act_api.c:139 Code: 89 f3 74 44 84 d2 74 40 4c 8d 6f 20 be 04 00 00 00 4c 89 ef e8 d0 fa 24 fc 4c 89 ea 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <0f> b6 14 02 4c 89 e8 83 e0 07 83 c0 03 38 d0 7c 04 84 d2 75 30 41 RSP: 0018:ffff8881d206f070 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000002 RSI: 0000000000000004 RDI: ffffffff8a18b9a0 RBP: ffff8881d206f088 R08: fffffbfff10c56e5 R09: fffffbfff10c56e4 R10: fffffbfff10c56e4 R11: ffffffff8862b723 R12: fffffffffffffff0 R13: 0000000000000010 R14: ffff8881d206f1b0 R15: ffff8881d206f170 FS: 00007f89f48c6700(0000) GS:ffff8881f6900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f5fe0035008 CR3: 00000001d5617003 CR4: 00000000001606e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400