syzbot


netbsd boot error: panic: UBSan: Undefined Behavior in /syzkaller/managers/netbsd-kubsan/kernel/sys/kern/subr_percpu.c:LINE, null pointer p

Status: fixed on 2019/09/19 21:25
Reported-by: syzbot+48cfcefd986572d7e677@syzkaller.appspotmail.com
Fix commit: 360cafb4be56 Decorate percpu_cpu_swap() with __noubsan
First crash: 1891d, last: 1891d

Sample crash report:
[   1.0000000] panic: UBSan: Undefined Behavior in /syzkaller/managers/netbsd-kubsan/kernel/sys/kern/subr_percpu.c:113:3, null pointer passed as argument 2, which is declared to never be null

[   1.0000000] cpu0: Begin traceback...
[   1.0000000] vpanic() at netbsd:vpanic+0x258 sys/kern/subr_prf.c:336
[   1.0000000] isAlreadyReported() at netbsd:isAlreadyReported
[   1.0000000] HandleNonnullArg() at netbsd:HandleNonnullArg+0x13a sys/../common/lib/libc/misc/ubsan.c:647
[   1.0000000] percpu_cpu_swap() at netbsd:percpu_cpu_swap+0x263 sys/kern/subr_percpu.c:113
[   1.0000000] percpu_backend_alloc() at netbsd:percpu_backend_alloc+0xb7 percpu_cpu_enlarge sys/kern/subr_percpu.c:152 [inline]
[   1.0000000] percpu_backend_alloc() at netbsd:percpu_backend_alloc+0xb7 sys/kern/subr_percpu.c:182
[   1.0000000] vmem_xalloc() at netbsd:vmem_xalloc+0xb0f vmem_import sys/kern/subr_vmem.c:772 [inline]
[   1.0000000] vmem_xalloc() at netbsd:vmem_xalloc+0xb0f sys/kern/subr_vmem.c:1198
[   1.0000000] vmem_alloc() at netbsd:vmem_alloc+0x240 sys/kern/subr_vmem.c:1065
[   1.0000000] percpu_alloc() at netbsd:percpu_alloc+0x30 sys/kern/subr_percpu.c:262
[   1.0000000] pserialize_init() at netbsd:pserialize_init+0x93 sys/kern/subr_pserialize.c:99
[   1.0000000] main() at netbsd:main+0x135 sys/kern/init_main.c:331
[   1.0000000] cpu0: End traceback...
[   1.0000000] fatal breakpoint trap in supervisor mode
[   1.0000000] trap type 1 code 0 rip 0xffffffff8021ddad cs 0x8 rflags 0x202 cr2 0 ilevel 0x8 rsp 0xffffffff85e162e0
[   1.0000000] curlwp 0xffffffff84c01a20 pid 0.1 lowest kstack 0xffffffff85e122c0
Stopped in pid 0.1 (system) at  netbsd:breakpoint+0x5:  leave
db{0}> 

Crashes (12):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/09/18 16:56 netbsd bf0b964ee0ae 46c0be24 .config console log report ci2-netbsd-kubsan
2019/09/18 16:56 netbsd bf0b964ee0ae 46c0be24 .config console log report ci2-netbsd-kubsan
2019/09/18 16:56 netbsd bf0b964ee0ae 46c0be24 .config console log report ci2-netbsd-kubsan
2019/09/18 16:20 netbsd fc383f1ebb70 46c0be24 .config console log report ci2-netbsd-kubsan
2019/09/18 16:20 netbsd fc383f1ebb70 46c0be24 .config console log report ci2-netbsd-kubsan
2019/09/18 16:20 netbsd fc383f1ebb70 46c0be24 .config console log report ci2-netbsd-kubsan
2019/09/18 14:51 netbsd fc383f1ebb70 1037b424 .config console log report ci2-netbsd-kubsan
2019/09/18 14:51 netbsd fc383f1ebb70 1037b424 .config console log report ci2-netbsd-kubsan
2019/09/18 14:51 netbsd fc383f1ebb70 1037b424 .config console log report ci2-netbsd-kubsan
2019/09/18 13:41 netbsd 28fdd03c65b1 1037b424 .config console log report ci2-netbsd-kubsan
2019/09/18 13:41 netbsd 28fdd03c65b1 1037b424 .config console log report ci2-netbsd-kubsan
2019/09/18 13:41 netbsd 28fdd03c65b1 1037b424 .config console log report ci2-netbsd-kubsan
* Struck through repros no longer work on HEAD.