syzbot
netbsd boot error: panic: UBSan: Undefined Behavior in /syzkaller/managers/netbsd-kubsan/kernel/sys/crypto/nist_hash_drbg/nist_hash_drbg.c:
Status:
fixed on 2019/10/02 22:57
Reported-by: syzbot+fa6b829ea0f49393a7fe@syzkaller.appspotmail.com
Fix commit:
338a6d8211a1
Use an explicit run-time assertion where compile-time doesn't work.
First crash: 2558d, last: 2557d
Sample crash report:
[ 1.0000000] panic: UBSan: Undefined Behavior in /syzkaller/managers/netbsd-kubsan/kernel/sys/crypto/nist_hash_drbg/nist_hash_drbg.c:1094:4, variable length array bound value -1 <= 0
[ 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] HandleVlaBoundNotPositive() at netbsd:HandleVlaBoundNotPositive+0xed sys/../common/lib/libc/misc/ubsan.c:431
[ 1.0000000] nist_sha256_hash_drbg_initialize() at netbsd:nist_sha256_hash_drbg_initialize+0x10aa sys/crypto/nist_hash_drbg/nist_hash_drbg.c:1094
[ 1.0000000] cprng_init() at netbsd:cprng_init+0x12 sys/kern/subr_cprng.c:80
[ 1.0000000] main() at netbsd:main+0x18a sys/kern/init_main.c:394
[ 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 0xffffffff85e16680
[ 1.0000000] curlwp 0xffffffff84c01d60 pid 0.1 lowest kstack 0xffffffff85e122c0
Stopped in pid 0.1 (system) at netbsd:breakpoint+0x5: leave
db{0}>
* Struck through repros no longer work on HEAD.