syzbot


BUG: unable to handle kernel paging request in bpf_prog_ADDR

Status: fixed on 2019/08/27 17:15
Reported-by: syzbot+@syzkaller.appspotmail.com
Fix commit: 06a22d897d82 bpf: fix access to skb_shared_info->gso_segs
First crash: 1298d, last: 1282d

Cause bisection: introduced by (bisect log) :
commit d9ff286a0f59fa7843549e49bd240393dd7d8b87
Author: Eric Dumazet <edumazet@google.com>
Date: Wed Jan 23 17:22:27 2019 +0000

  bpf: allow BPF programs access skb_shared_info->gso_segs field

Crash: BUG: unable to handle kernel paging request in corrupted (log)
Repro: C syz .config
similar bugs (1):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream BUG: sleeping function called from invalid context in do_user_addr_fault (2) syz done unreliable 27 209d 773d 0/24 upstream: reported syz repro on 2020/12/25 13:45

Sample crash report:
BUG: unable to handle page fault for address: ffff8880cdc896aa
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD aa01067 P4D aa01067 PUD 0 
Oops: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 8232 Comm: syz-executor316 Not tainted 5.2.0+ #35
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:bpf_prog_9e69188709424cd0+0xe6c/0x1000
Code: cc cc cc 55 48 89 e5 48 81 ec 00 00 00 00 53 41 55 41 56 41 57 6a 00 31 c0 48 8b bf c0 00 00 00 44 8b 97 bc 00 00 00 4c 01 d7 <48> 0f b7 7f 06 5b 41 5f 41 5e 41 5d 5b c9 c3 cc cc cc cc cc cc cc
RSP: 0018:ffff888093a076a8 EFLAGS: 00010282
RAX: 0000000000000000 RBX: ffffc90005f45020 RCX: dffffc0000000000
RDX: 0000000000000000 RSI: ffffc90005f45038 RDI: ffff8880cdc896a4
RBP: ffff888093a076d0 R08: ffffffff8167ede0 R09: fffffbfff11fba3d
R10: 00000000316abb64 R11: 0000000000000000 R12: 0000000000000100
R13: fffffff2bf323ba5 R14: ffffc90005f45030 R15: 0000000000000000
FS:  0000555557226880(0000) GS:ffff8880aea00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffff8880cdc896aa CR3: 0000000095597000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 bpf_test_run+0x33a/0x860 /net/bpf/test_run.c:44
 bpf_prog_test_run_skb+0x944/0x1260 /net/bpf/test_run.c:310
 bpf_prog_test_run /kernel/bpf/syscall.c:2091 [inline]
 __do_sys_bpf+0x2ace/0xc1b0 /kernel/bpf/syscall.c:2867
 __se_sys_bpf /kernel/bpf/syscall.c:2808 [inline]
 __x64_sys_bpf+0x7a/0x90 /kernel/bpf/syscall.c:2808
 do_syscall_64+0xfe/0x140 /arch/x86/entry/common.c:296
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x4403b9
Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 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 fb 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffcf7665858 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 00000000004403b9
RDX: 0000000000000028 RSI: 0000000020000040 RDI: 000000000000000a
RBP: 00000000006ca018 R08: 0000000000000000 R09: 00000000004002c8
R10: 0000000000401cd0 R11: 0000000000000246 R12: 0000000000401c40
R13: 0000000000401cd0 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
CR2: ffff8880cdc896aa
---[ end trace 4b87649d13798381 ]---
RIP: 0010:bpf_prog_9e69188709424cd0+0xe6c/0x1000
Code: cc cc cc 55 48 89 e5 48 81 ec 00 00 00 00 53 41 55 41 56 41 57 6a 00 31 c0 48 8b bf c0 00 00 00 44 8b 97 bc 00 00 00 4c 01 d7 <48> 0f b7 7f 06 5b 41 5f 41 5e 41 5d 5b c9 c3 cc cc cc cc cc cc cc
RSP: 0018:ffff888093a076a8 EFLAGS: 00010282
RAX: 0000000000000000 RBX: ffffc90005f45020 RCX: dffffc0000000000
RDX: 0000000000000000 RSI: ffffc90005f45038 RDI: ffff8880cdc896a4
RBP: ffff888093a076d0 R08: ffffffff8167ede0 R09: fffffbfff11fba3d
R10: 00000000316abb64 R11: 0000000000000000 R12: 0000000000000100
R13: fffffff2bf323ba5 R14: ffffc90005f45030 R15: 0000000000000000
FS:  0000555557226880(0000) GS:ffff8880aea00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffff8880cdc896aa CR3: 0000000095597000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (13):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci-upstream-kasan-gce-smack-root 2019/07/19 19:47 upstream 3bfe1fc46794 1656845f .config console log report syz C
ci-upstream-kasan-gce-root 2019/07/19 19:34 upstream 3bfe1fc46794 1656845f .config console log report syz C
ci-upstream-kasan-gce-selinux-root 2019/07/19 19:23 upstream 3bfe1fc46794 1656845f .config console log report syz C
ci-upstream-bpf-kasan-gce 2019/07/19 17:49 bpf 9b3d15e6b05e 1656845f .config console log report syz C
ci-upstream-net-this-kasan-gce 2019/07/19 17:19 net 8d650cdedaab 1656845f .config console log report syz C
ci-upstream-net-kasan-gce 2019/07/19 17:23 net-next 192f0f8e9db7 1656845f .config console log report syz C
ci-upstream-bpf-next-kasan-gce 2019/07/19 16:56 bpf-next 192f0f8e9db7 1656845f .config console log report syz C
ci-upstream-linux-next-kasan-gce-root 2019/07/19 17:18 linux-next 6d21a41b7b1f 1656845f .config console log report syz C
ci-upstream-bpf-next-kasan-gce 2019/08/04 23:31 bpf-next 192f0f8e9db7 6affd8e8 .config console log report
ci-upstream-bpf-next-kasan-gce 2019/08/01 14:56 bpf-next 192f0f8e9db7 c692b5bd .config console log report
ci-upstream-bpf-next-kasan-gce 2019/07/29 23:16 bpf-next 192f0f8e9db7 f67095ee .config console log report
ci-upstream-bpf-next-kasan-gce 2019/07/26 06:41 bpf-next 192f0f8e9db7 732bc5a0 .config console log report
ci-upstream-bpf-next-kasan-gce 2019/07/19 16:22 bpf-next 192f0f8e9db7 1656845f .config console log report
* Struck through repros no longer work on HEAD.