bisecting fixing commit since 88d6de67e390b6093f2c11189ad022988a9e2961 building syzkaller on 56cd6c9b80ee424566e3ceaf8a4b042803a130ad testing commit 88d6de67e390b6093f2c11189ad022988a9e2961 compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: 679680a762182fa6d623f717bea21977d3e67da33ac04252389bb78c58b40efb all runs: crashed: KASAN: null-ptr-deref Read in __tcf_idr_release testing current HEAD 2950c9c5e0df6bd34af45a5168bbee345e95eae2 testing commit 2950c9c5e0df6bd34af45a5168bbee345e95eae2 compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: 7a60e2fc2006dd9d39b9d1dce4ae601fa967160c1c703cb4eb2478b5111822b8 all runs: crashed: KASAN: null-ptr-deref Read in __tcf_idr_release revisions tested: 2, total time: 28m51.381025734s (build: 20m54.107829483s, test: 6m20.446809716s) the crash still happens on HEAD commit msg: Linux 4.19.207 crash: KASAN: null-ptr-deref Read in __tcf_idr_release batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3e) already exists on: batadv_slave_1 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 ================================================================== 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.0/7103 CPU: 1 PID: 7103 Comm: syz-executor.0 Not tainted 4.19.207-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:2227 __sys_sendmsg+0xd9/0x180 net/socket.c:2265 __do_sys_sendmsg net/socket.c:2274 [inline] __se_sys_sendmsg net/socket.c:2272 [inline] __x64_sys_sendmsg+0x73/0xb0 net/socket.c:2272 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:00007f90ebbd2198 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: 00007f90ebbd26bc 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: 7103 Comm: syz-executor.0 Tainted: G B 4.19.207-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 40 e9 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:ffff8881d9867070 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000002 RSI: 0000000000000004 RDI: ffffffff8a38b9a0 RBP: ffff8881d9867088 R08: fffffbfff110571d R09: fffffbfff110571c R10: fffffbfff110571c R11: ffffffff8882b8e3 R12: fffffffffffffff0 R13: 0000000000000010 R14: ffff8881d98671b0 R15: ffff8881d9867170 FS: 00007f90ebbd2700(0000) GS:ffff8881f6700000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000000052c000 CR3: 00000001e5d23004 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:2227 __sys_sendmsg+0xd9/0x180 net/socket.c:2265 __do_sys_sendmsg net/socket.c:2274 [inline] __se_sys_sendmsg net/socket.c:2272 [inline] __x64_sys_sendmsg+0x73/0xb0 net/socket.c:2272 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:00007f90ebbd2198 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: 00007f90ebbd26bc R14: 00000000ffffffff R15: 0000000000000003 Modules linked in: ---[ end trace b92b94112d206f83 ]--- 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 40 e9 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:ffff8881d9867070 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000002 RSI: 0000000000000004 RDI: ffffffff8a38b9a0 RBP: ffff8881d9867088 R08: fffffbfff110571d R09: fffffbfff110571c R10: fffffbfff110571c R11: ffffffff8882b8e3 R12: fffffffffffffff0 R13: 0000000000000010 R14: ffff8881d98671b0 R15: ffff8881d9867170 FS: 00007f90ebbd2700(0000) GS:ffff8881f6700000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fe2cb655000 CR3: 00000001e5d23004 CR4: 00000000001606e0 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 40 e9 24 fc callq 0xfc24e959 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