bisecting fixing commit since 88d6de67e390b6093f2c11189ad022988a9e2961 building syzkaller on 56cd6c9b80ee424566e3ceaf8a4b042803a130ad testing commit 88d6de67e390b6093f2c11189ad022988a9e2961 compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: 4ccdf1fc73d6da4b0cdc79f408307ef085200a85fec1b1d277d4f0364de59caf all runs: crashed: KASAN: null-ptr-deref Read in __tcf_idr_release testing current HEAD 59456c9cc40c8f75b5a7efa0fe1f211d9c6fcaf1 testing commit 59456c9cc40c8f75b5a7efa0fe1f211d9c6fcaf1 compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: 5297a66f02957d221ea1b3f3aa64f8b29252d2edcd5c632d869200cfab75adc1 all runs: crashed: KASAN: null-ptr-deref Read in __tcf_idr_release revisions tested: 2, total time: 33m17.589870564s (build: 25m36.709553598s, test: 6m15.325982569s) the crash still happens on HEAD commit msg: Linux 4.19.204 crash: KASAN: null-ptr-deref Read in __tcf_idr_release device veth0_macvtap entered promiscuous mode IPv6: ADDRCONF(NETDEV_UP): macvtap0: link is not ready IPv6: ADDRCONF(NETDEV_UP): veth1_vlan: link is not ready device veth1_macvtap entered promiscuous mode ================================================================== 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.3/7097 CPU: 1 PID: 7097 Comm: syz-executor.3 Not tainted 4.19.204-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:00007fcd79c16198 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: 00007fcd79c166bc 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: 0 PID: 7097 Comm: syz-executor.3 Tainted: G B 4.19.204-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 50 fe 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:ffff8881daeb7070 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000002 RSI: 0000000000000004 RDI: ffffffff8a18b9a0 RBP: ffff8881daeb7088 R08: fffffbfff10c56f5 R09: fffffbfff10c56f4 R10: fffffbfff10c56f4 R11: ffffffff8862b7a3 R12: fffffffffffffff0 R13: 0000000000000010 R14: ffff8881daeb71b0 R15: ffff8881daeb7170 FS: 00007fcd79c16700(0000) GS:ffff8881f6800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f55cbdc9018 CR3: 00000001db4f3001 CR4: 00000000001606f0 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:00007fcd79c16198 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: 00007fcd79c166bc R14: 00000000ffffffff R15: 0000000000000003 Modules linked in: ---[ end trace c4da4252fb989a65 ]--- 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 50 fe 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:ffff8881daeb7070 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000002 RSI: 0000000000000004 RDI: ffffffff8a18b9a0 RBP: ffff8881daeb7088 R08: fffffbfff10c56f5 R09: fffffbfff10c56f4 R10: fffffbfff10c56f4 R11: ffffffff8862b7a3 R12: fffffffffffffff0 R13: 0000000000000010 R14: ffff8881daeb71b0 R15: ffff8881daeb7170 FS: 00007fcd79c16700(0000) GS:ffff8881f6800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f55cbdc9018 CR3: 00000001db4f3001 CR4: 00000000001606f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess): 0: 89 f3 mov %esi,%ebx 2: 74 44 je 0x48 4: 84 d2 test %dl,%dl 6: 74 40 je 0x48 8: 4c 8d 6f 20 lea 0x20(%rdi),%r13 c: be 04 00 00 00 mov $0x4,%esi 11: 4c 89 ef mov %r13,%rdi 14: e8 50 fe 24 fc callq 0xfc24fe69 19: 4c 89 ea mov %r13,%rdx 1c: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 23: fc ff df 26: 48 c1 ea 03 shr $0x3,%rdx * 2a: 0f b6 14 02 movzbl (%rdx,%rax,1),%edx <-- trapping instruction 2e: 4c 89 e8 mov %r13,%rax 31: 83 e0 07 and $0x7,%eax 34: 83 c0 03 add $0x3,%eax 37: 38 d0 cmp %dl,%al 39: 7c 04 jl 0x3f 3b: 84 d2 test %dl,%dl 3d: 75 30 jne 0x6f 3f: 41 rex.B