syzbot
netbsd boot error: panic: UBSan: Undefined Behavior in /syzkaller/managers/netbsd-kubsan/kernel/sys/kern/vfs_mount.c:LINE, member access wi
Status:
fixed on 2020/03/08 17:09
Reported-by: syzbot+c024c50570cccac51532@syzkaller.appspotmail.com
Fix commit:
431ed6f61bc2
- Pad kmem cache names with zeros so vmstat -m and -C are readable. - Exclude caches with size not a factor or multiple of the coherency unit.
4c7232d4a136
KMEM_SIZE: append the size_t to the allocated buffer, rather than prepending, so it doesn't screw up the alignment of the buffer.
First crash: 2464d, last: 2388d
Sample crash report:
[ 1.0000000] panic: UBSan: Undefined Behavior in /syzkaller/managers/netbsd-kubsan/kernel/sys/kern/vfs_mount.c:153:13, member access within misaligned address 0xffffce00b44cb008 for type 'struct mount' which requires 64 byte alignment
[ 1.0000000] cpu0: Begin traceback...
[ 1.0000000] vpanic() at netbsd:vpanic+0x2aa sys/kern/subr_prf.c:336
[ 1.0000000] isAlreadyReported() at netbsd:isAlreadyReported
[ 1.0000000] HandleTypeMismatch.part.1() at netbsd:HandleTypeMismatch.part.1+0xcc
[ 1.0000000] HandleTypeMismatch() at netbsd:HandleTypeMismatch+0x7b sys/../common/lib/libc/misc/ubsan.c:408
[ 1.0000000] vfs_mountalloc() at netbsd:vfs_mountalloc+0x320 sys/kern/vfs_mount.c:153
[ 1.0000000] vfs_vnode_sysinit() at netbsd:vfs_vnode_sysinit+0x1e sys/kern/vfs_vnode.c:391
[ 1.0000000] vntblinit() at netbsd:vntblinit+0x345 sys/kern/vfs_subr.c:141
[ 1.0000000] vfsinit() at netbsd:vfsinit+0x1c3 sys/kern/vfs_init.c:418
[ 1.0000000] main() at netbsd:main+0x2f9 sys/kern/init_main.c:490
[ 1.0000000] cpu0: End traceback...
[ 1.0000000] fatal breakpoint trap in supervisor mode
[ 1.0000000] trap type 1 code 0 rip 0xffffffff8021f59d cs 0x8 rflags 0x202 cr2 0 ilevel 0x8 rsp 0xffffffff86467700
[ 1.0000000] curlwp 0xffffffff85569b80 pid 0.1 lowest kstack 0xffffffff864632c0
Stopped in pid 0.1 (system) at netbsd:breakpoint+0x5: leave
db{0}>
* Struck through repros no longer work on HEAD.