syzbot


BUG: unable to handle kernel paging request in cpuacct_account_field

Status: fixed on 2019/08/27 17:15
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+a952f743523593b39174@syzkaller.appspotmail.com
Fix commit: 95fa145479fb bpf: sockmap/tls, close can race with map free
First crash: 1770d, last: 1770d
Cause bisection: introduced by (bisect log) :
commit e9db4ef6bf4ca9894bb324c76e01b8f1a16b2650
Author: John Fastabend <john.fastabend@gmail.com>
Date: Sat Jun 30 13:17:47 2018 +0000

  bpf: sockhash fix omitted bucket lock in sock_close

Crash: KASAN: use-after-free Write in bpf_tcp_close (log)
Repro: syz .config
  
Fix bisection: fixed by (bisect log) :
commit cf32526c8842781e32d6652a1e01e83b20490948
Author: Jakub Kicinski <jakub.kicinski@netronome.com>
Date: Fri Jul 19 17:29:23 2019 +0000

  selftests/tls: add a test for ULP but no keys

  
Discussions (3)
Title Replies (including bot) Last reply
Reminder: 36 open syzbot bugs in "net/bpf" subsystem 1 (1) 2019/07/03 06:01
BUG: unable to handle kernel paging request in cpuacct_account_field 1 (3) 2019/06/27 10:58
Reminder: 30 open syzbot bugs in "net/bpf" subsystem 1 (1) 2019/06/24 05:01

Sample crash report:
BUG: unable to handle page fault for address: ffffde202771d9b9
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 0 P4D 0 
Thread overran stack, or stack corrupted
Oops: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 8777 Comm: syz-executor.5 Not tainted 5.2.0-rc5+ #38
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:cpuacct_account_field+0x12b/0x2f0 kernel/sched/cpuacct.c:366
Code: c5 60 02 75 88 48 89 fa 48 c1 ea 03 42 80 3c 32 00 0f 85 81 01 00 00 48 03 1c c5 60 02 75 88 4a 8d 3c 3b 48 89 f8 48 c1 e8 03 <42> 80 3c 30 00 0f 85 89 01 00 00 4e 01 2c 3b 49 8d bc 24 28 01 00
RSP: 0018:ffff8880ae909c78 EFLAGS: 00010802
RAX: 1fffe2202771d9b9 RBX: ffff11013b8ecdb8 RCX: ffffffff83358d3e
RDX: 1ffffffff10ea04d RSI: ffffffff83358d4c RDI: ffff11013b8ecdc8
RBP: ffff8880ae909ca8 R08: ffff888090866500 R09: 0000000000000001
R10: fffffbfff1141b45 R11: ffff888090866500 R12: ffff88808cfecc80
R13: 0000000000966a20 R14: dffffc0000000000 R15: 0000000000000010
FS:  0000555555ff5940(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffde202771d9b9 CR3: 000000008533e000 CR4: 00000000001406e0
Call Trace:
 <IRQ>
 cgroup_account_cputime_field include/linux/cgroup.h:789 [inline]
 task_group_account_field kernel/sched/cputime.c:109 [inline]
 account_system_index_time+0x11d/0x390 kernel/sched/cputime.c:172
 irqtime_account_process_tick.isra.0+0x386/0x490 kernel/sched/cputime.c:389
 account_process_tick+0x27f/0x350 kernel/sched/cputime.c:484
 update_process_times+0x25/0x80 kernel/time/timer.c:1637
 tick_sched_handle+0xa2/0x190 kernel/time/tick-sched.c:167
 tick_sched_timer+0x47/0x130 kernel/time/tick-sched.c:1298
 __run_hrtimer kernel/time/hrtimer.c:1389 [inline]
 __hrtimer_run_queues+0x33b/0xdd0 kernel/time/hrtimer.c:1451
 hrtimer_interrupt+0x314/0x770 kernel/time/hrtimer.c:1509
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1041 [inline]
 smp_apic_timer_interrupt+0x111/0x550 arch/x86/kernel/apic/apic.c:1066
 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:806
 </IRQ>
Modules linked in:
CR2: ffffde202771d9b9
---[ end trace 4a0799d29c250606 ]---
RIP: 0010:cpuacct_account_field+0x12b/0x2f0 kernel/sched/cpuacct.c:366
Code: c5 60 02 75 88 48 89 fa 48 c1 ea 03 42 80 3c 32 00 0f 85 81 01 00 00 48 03 1c c5 60 02 75 88 4a 8d 3c 3b 48 89 f8 48 c1 e8 03 <42> 80 3c 30 00 0f 85 89 01 00 00 4e 01 2c 3b 49 8d bc 24 28 01 00
RSP: 0018:ffff8880ae909c78 EFLAGS: 00010802
RAX: 1fffe2202771d9b9 RBX: ffff11013b8ecdb8 RCX: ffffffff83358d3e
RDX: 1ffffffff10ea04d RSI: ffffffff83358d4c RDI: ffff11013b8ecdc8
RBP: ffff8880ae909ca8 R08: ffff888090866500 R09: 0000000000000001
R10: fffffbfff1141b45 R11: ffff888090866500 R12: ffff88808cfecc80
R13: 0000000000966a20 R14: dffffc0000000000 R15: 0000000000000010
FS:  0000555555ff5940(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffde202771d9b9 CR3: 000000008533e000 CR4: 00000000001406e0

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/06/21 00:02 upstream abf02e2964b3 34bf9440 .config console log report syz ci-upstream-kasan-gce-root
* Struck through repros no longer work on HEAD.