syzbot


BUG: unable to handle kernel paging request in pcpu_freelist_populate
Status: fixed on 2021/03/10 01:48
Reported-by: syzbot+@syzkaller.appspotmail.com
Fix commit: e1868b9e36d0 bpf: Avoid overflows involving hash elem_size
First crash: 533d, last: 522d

Cause bisection: introduced by (bisect log) [no-op commit]:
commit 024cd2cbd1ca2d29e6df538855d52c4e5990cab7
Author: Santucci Pierpaolo <santucci@epigenesys.com>
Date: Mon Nov 16 10:30:37 2020 +0000

  selftest/bpf: Fix IPV6FR handling in flow dissector

Crash: BUG: sleeping function called from invalid context in sta_info_move_state (log)
Repro: C syz .config

Sample crash report:
BUG: unable to handle page fault for address: fffff5200686aa39
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 23fff2067 P4D 23fff2067 PUD 101a4067 PMD 358e8067 PTE 0
Oops: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 8494 Comm: syz-executor408 Not tainted 5.10.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:pcpu_freelist_push_node kernel/bpf/percpu_freelist.c:33 [inline]
RIP: 0010:pcpu_freelist_populate+0x1a5/0x260 kernel/bpf/percpu_freelist.c:114
Code: 85 8f 00 00 00 48 8b 04 24 48 03 2c c5 c0 16 e4 8a 48 89 e8 48 c1 e8 03 42 80 3c 30 00 75 6b 48 89 da 48 8b 45 00 48 c1 ea 03 <42> 80 3c 32 00 75 45 48 89 03 44 89 ee 44 89 e7 48 89 5d 00 48 03
RSP: 0018:ffffc9000163fc30 EFLAGS: 00010a06
RAX: ffffc9003414b368 RBX: ffffc900343551c8 RCX: ffffffff8184af27
RDX: 1ffff9200686aa39 RSI: ffffffff8184af34 RDI: 0000000000000005
RBP: ffffe8ffffc31e68 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 000000000000013b
R13: 0000000000004003 R14: dffffc0000000000 R15: ffff8880208069c0
FS:  0000000000eef880(0000) GS:ffff8880b9e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: fffff5200686aa39 CR3: 000000001164a000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 prealloc_init kernel/bpf/hashtab.c:323 [inline]
 htab_map_alloc+0x981/0x1230 kernel/bpf/hashtab.c:507
 find_and_alloc_map kernel/bpf/syscall.c:123 [inline]
 map_create kernel/bpf/syscall.c:829 [inline]
 __do_sys_bpf+0xa81/0x5170 kernel/bpf/syscall.c:4374
 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x4412e9
Code: e8 fc ab 02 00 48 83 c4 18 c3 0f 1f 80 00 00 00 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 0f 83 1b 09 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffc6428d8b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000004412e9
RDX: 0000000000000040 RSI: 00000000200002c0 RDI: 0000000000000000
RBP: 00000000006cb018 R08: 0000000000000004 R09: 00000000004002c8
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000402090
R13: 0000000000402120 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
CR2: fffff5200686aa39
---[ end trace f4fc32505ab0c3de ]---
RIP: 0010:pcpu_freelist_push_node kernel/bpf/percpu_freelist.c:33 [inline]
RIP: 0010:pcpu_freelist_populate+0x1a5/0x260 kernel/bpf/percpu_freelist.c:114
Code: 85 8f 00 00 00 48 8b 04 24 48 03 2c c5 c0 16 e4 8a 48 89 e8 48 c1 e8 03 42 80 3c 30 00 75 6b 48 89 da 48 8b 45 00 48 c1 ea 03 <42> 80 3c 32 00 75 45 48 89 03 44 89 ee 44 89 e7 48 89 5d 00 48 03
RSP: 0018:ffffc9000163fc30 EFLAGS: 00010a06
RAX: ffffc9003414b368 RBX: ffffc900343551c8 RCX: ffffffff8184af27
RDX: 1ffff9200686aa39 RSI: ffffffff8184af34 RDI: 0000000000000005
RBP: ffffe8ffffc31e68 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 000000000000013b
R13: 0000000000004003 R14: dffffc0000000000 R15: ffff8880208069c0
FS:  0000000000eef880(0000) GS:ffff8880b9e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: fffff5200686aa39 CR3: 000000001164a000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (42):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-bpf-next-kasan-gce 2020/12/05 13:26 bpf-next 34da87213d3d 50503117 .config log report syz C
ci-upstream-net-kasan-gce 2020/12/05 13:03 net-next bcd684aace34 50503117 .config log report syz C
ci-upstream-bpf-next-kasan-gce 2020/12/05 13:01 bpf-next 34da87213d3d 50503117 .config log report syz C
ci-upstream-net-kasan-gce 2020/12/15 01:16 net-next 13458ffe0a95 97183ed7 .config log report info
ci-upstream-net-kasan-gce 2020/12/14 16:09 net-next 13458ffe0a95 97183ed7 .config log report info
ci-upstream-net-kasan-gce 2020/12/14 15:15 net-next 13458ffe0a95 97183ed7 .config log report info
ci-upstream-net-kasan-gce 2020/12/14 11:52 net-next 13458ffe0a95 b22a7ec3 .config log report info
ci-upstream-net-kasan-gce 2020/12/13 09:22 net-next 00f7763a26cb bca53db9 .config log report info
ci-upstream-net-kasan-gce 2020/12/12 20:05 net-next 91163f821436 bca53db9 .config log report info
ci-upstream-net-kasan-gce 2020/12/11 20:53 net-next 91163f821436 ba24ffcd .config log report info
ci-upstream-net-kasan-gce 2020/12/11 16:07 net-next 91163f821436 ba24ffcd .config log report info
ci-upstream-net-kasan-gce 2020/12/11 14:25 net-next 91163f821436 ba24ffcd .config log report info
ci-upstream-net-kasan-gce 2020/12/10 08:53 net-next 9125abe7b9cb c090b4da .config log report info
ci-upstream-net-kasan-gce 2020/12/09 16:43 net-next afae3cc2da10 40cc414d .config log report info
ci-upstream-net-kasan-gce 2020/12/08 19:14 net-next 8e98387b16b8 a7f7f4a4 .config log report info
ci-upstream-net-kasan-gce 2020/12/08 11:36 net-next b1f7b0983601 51a9082e .config log report info
ci-upstream-net-kasan-gce 2020/12/08 02:11 net-next b1f7b0983601 51a9082e .config log report info
ci-upstream-bpf-next-kasan-gce 2020/12/07 19:08 bpf-next 34da87213d3d 1190297f .config log report info
ci-upstream-bpf-next-kasan-gce 2020/12/07 06:25 bpf-next 34da87213d3d c521566d .config log report info
ci-upstream-bpf-next-kasan-gce 2020/12/07 05:33 bpf-next 34da87213d3d c521566d .config log report info
ci-upstream-net-kasan-gce 2020/12/07 05:31 net-next 4054eebf0fb0 c521566d .config log report info
ci-upstream-bpf-next-kasan-gce 2020/12/07 02:57 bpf-next 34da87213d3d c521566d .config log report info
ci-upstream-bpf-next-kasan-gce 2020/12/07 00:23 bpf-next 34da87213d3d c521566d .config log report info
ci-upstream-bpf-next-kasan-gce 2020/12/06 22:57 bpf-next 34da87213d3d c521566d .config log report info
ci-upstream-net-kasan-gce 2020/12/06 22:52 net-next 4054eebf0fb0 c521566d .config log report info
ci-upstream-bpf-next-kasan-gce 2020/12/06 14:26 bpf-next 34da87213d3d f12ba0c5 .config log report info
ci-upstream-net-kasan-gce 2020/12/06 07:14 net-next 00649542f1ba f12ba0c5 .config log report info
ci-upstream-bpf-next-kasan-gce 2020/12/06 07:10 bpf-next 34da87213d3d f12ba0c5 .config log report info
ci-upstream-net-kasan-gce 2020/12/06 03:54 net-next bcd684aace34 50503117 .config log report info
ci-upstream-bpf-next-kasan-gce 2020/12/06 03:51 bpf-next 34da87213d3d 50503117 .config log report info
ci-upstream-bpf-next-kasan-gce 2020/12/05 17:28 bpf-next 34da87213d3d 50503117 .config log report info
ci-upstream-net-kasan-gce 2020/12/05 16:55 net-next bcd684aace34 50503117 .config log report info
ci-upstream-bpf-next-kasan-gce 2020/12/05 16:55 bpf-next 34da87213d3d 50503117 .config log report info
ci-upstream-bpf-next-kasan-gce 2020/12/05 12:23 bpf-next 34da87213d3d 50503117 .config log report info
ci-upstream-net-kasan-gce 2020/12/05 12:17 net-next bcd684aace34 50503117 .config log report info
ci-upstream-bpf-next-kasan-gce 2020/12/05 05:28 bpf-next eceae70bdeae 20366b87 .config log report info
ci-upstream-bpf-next-kasan-gce 2020/12/05 03:48 bpf-next eceae70bdeae 20366b87 .config log report info
ci-upstream-bpf-next-kasan-gce 2020/12/04 02:25 bpf-next 97306be45fbe e6b0d314 .config log report info
ci-upstream-bpf-next-kasan-gce 2020/12/03 22:07 bpf-next 97306be45fbe e6b0d314 .config log report info
ci-upstream-linux-next-kasan-gce-root 2020/12/10 08:51 linux-next a9e26cb5f261 c090b4da .config log report info
ci-upstream-linux-next-kasan-gce-root 2020/12/09 16:44 linux-next a9e26cb5f261 40cc414d .config log report info
ci-upstream-linux-next-kasan-gce-root 2020/12/08 11:39 linux-next 15ac8fdb7440 51a9082e .config log report info