syzbot
assert failed: vp->v_type == VREG
Status:
fixed on 2019/03/07 20:48
Reported-by: syzbot+d66b1be08516a4d2d2b2@syzkaller.appspotmail.com
Fix commit:
21e56f354bb4
Change vn_openchk() to fail VNON and VBAD with error ENXIO.
First crash: 2710d, last: 2699d
Sample crash report:
login: [ 38.7521678] panic: kernel diagnostic assertion "vp->v_type == VREG" failed: file "/syzkaller/managers/netbsd/kernel/sys/ufs/ufs/ufs_readwrite.c", line 292
[ 38.7521678] cpu0: Begin traceback...
[ 38.7521678] vpanic() at netbsd:vpanic+0x214
[ 38.7632748] _GLOBAL__sub_D_65535_0_cpu_configure() at netbsd:_GLOBAL__sub_D_65535_0_cpu_configure
[ 38.7632748] ffs_write() at netbsd:ffs_write+0x6ba
[ 38.7744002] VOP_WRITE() at netbsd:VOP_WRITE+0xc3
[ 38.7855251] vn_write() at netbsd:vn_write+0x167
[ 38.7855251] dofilewrite() at netbsd:dofilewrite+0x154
[ 38.7974078] sys_write() at netbsd:sys_write+0x78
[ 38.8087170] sys_syscall() at netbsd:sys_syscall+0xe2
[ 38.8189043] syscall() at netbsd:syscall+0x30e
[ 38.8189043] --- syscall (number 0) ---
[ 38.8316164] 7c6915a3f4ca:
[ 38.8316164] cpu0: End traceback...
[ 38.8316164] dumping to dev 4,1 (offset=0, size=0): not possible
[ 38.8316164] rebooting...
SeaBIOS (version 1.8.2-20190204_181744-google)
Total RAM Size = 0x00000001e0000000 = 7680 MiB
CPUs found: 2 Max CPUs supported: 2
found virtio-scsi at 0:3
virtio-scsi vendor='Google' product='PersistentDisk' rev='1' type=0 removable=0
virtio-scsi blksize=512 sectors=4194304 = 2048 MiB
drive 0x000f2a00: PCHS=0/0/0 translation=lba LCHS=520/128/63 s=4194304
Booting from Hard Disk 0...
>> NetBSD/x86 BIOS Boot, Revision 5.10 (Tue Jul 17 14:59:51 UTC 2018) (from NetBSD 8.0)
>> Memory: 639/3144640 k
1. Boot normally
2. Boot single user
3. Disable ACPI
4. Disable ACPI and SMP
5. Drop to boot prompt
* Struck through repros no longer work on HEAD.