syzbot


assert failed: vp->v_type == VREG || vp->v_type == VDIR

Status: fixed on 2019/03/07 20:48
Reported-by: syzbot+c5eaef5a8af535c3b217@syzkaller.appspotmail.com
Fix commit: 21e56f354bb4 Change vn_openchk() to fail VNON and VBAD with error ENXIO.
First crash: 2097d, last: 2085d

Sample crash report:
[  22.5720914] panic: kernel diagnostic assertion "vp->v_type == VREG || vp->v_type == VDIR" failed: file "/syzkaller/managers/netbsd/kernel/sys/ufs/ufs/ufs_readwrite.c", line 104 
[  22.5720914] cpu0: Begin traceback...
[  22.5835783] vpanic() at netbsd:vpanic+0x214
[  22.5835783] _GLOBAL__sub_D_65535_0_cpu_configure() at netbsd:_GLOBAL__sub_D_65535_0_cpu_configure
[  22.5934574] ffs_read() at netbsd:ffs_read+0x2a7
[  22.5934574] VOP_READ() at netbsd:VOP_READ+0xc3
[  22.6041268] vn_read() at netbsd:vn_read+0xd7
[  22.6148140] do_filereadv.part.0() at netbsd:do_filereadv.part.0+0x333
[  22.6148140] sys_preadv() at netbsd:sys_preadv+0xb9
[  22.6276583] sys_syscall() at netbsd:sys_syscall+0xe2
[  22.6361863] syscall() at netbsd:syscall+0x30e
[  22.6473240] --- syscall (number 0) ---
[  22.6473240] 75ff6823f4ca:
[  22.6591883] cpu0: End traceback...

[  22.6591883] dumping to dev 4,1 (offset=0, size=0): not possible
[  22.6591883] 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 AC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-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-+2877616\|/- [1062312\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/+1363032-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/+1044535-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-]=0x2b4fc28
\|/-\|/-\|/-\|/-\|/-\|/-\|/-WARNING: couldn't open /var/db/entropy-file
WARNING: 1 module failed to load

Crashes (1085):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/02/28 10:43 netbsd 909ff0137ae9 09aeeba4 console log report syz C ci2-netbsd
2019/02/24 10:39 netbsd dc893675b200 7a06e792 console log report syz C ci2-netbsd
2019/03/07 20:28 netbsd 4c653981f172 8c085c5e console log report ci2-netbsd
2019/03/07 19:16 netbsd 4c653981f172 8c085c5e console log report ci2-netbsd
2019/03/07 19:06 netbsd 4c653981f172 8c085c5e console log report ci2-netbsd
2019/03/07 17:56 netbsd 4c653981f172 8c085c5e console log report ci2-netbsd
2019/03/07 16:55 netbsd 4c653981f172 8c085c5e console log report ci2-netbsd
2019/03/07 16:14 netbsd 4c653981f172 8c085c5e console log report ci2-netbsd
2019/03/07 15:10 netbsd 4c653981f172 8c085c5e console log report ci2-netbsd
2019/03/07 13:47 netbsd 4c653981f172 8c085c5e console log report ci2-netbsd
2019/03/07 12:52 netbsd 4c653981f172 8c085c5e console log report ci2-netbsd
2019/03/07 11:04 netbsd 4c653981f172 8c085c5e console log report ci2-netbsd
2019/03/07 09:45 netbsd 4c653981f172 8c085c5e console log report ci2-netbsd
2019/03/07 09:11 netbsd 4c653981f172 8c085c5e console log report ci2-netbsd
2019/03/07 07:24 netbsd b7158b3eb48d 18215b8d console log report ci2-netbsd
2019/03/07 06:20 netbsd b7158b3eb48d 18215b8d console log report ci2-netbsd
2019/03/07 05:06 netbsd b7158b3eb48d 18215b8d console log report ci2-netbsd
2019/03/07 04:03 netbsd b7158b3eb48d 18215b8d console log report ci2-netbsd
2019/03/07 03:27 netbsd b7158b3eb48d 18215b8d console log report ci2-netbsd
2019/03/07 02:13 netbsd b7158b3eb48d 18215b8d console log report ci2-netbsd
2019/03/07 00:51 netbsd b7158b3eb48d 18215b8d console log report ci2-netbsd
2019/03/06 23:30 netbsd b7158b3eb48d 18215b8d console log report ci2-netbsd
2019/03/06 23:27 netbsd b7158b3eb48d 18215b8d console log report ci2-netbsd
2019/03/06 22:23 netbsd b7158b3eb48d 18215b8d console log report ci2-netbsd
2019/03/06 21:10 netbsd b7158b3eb48d 18215b8d console log report ci2-netbsd
2019/03/06 19:42 netbsd 3ee0d5e1d4d6 05cf83bf console log report ci2-netbsd
2019/03/06 18:20 netbsd 3ee0d5e1d4d6 05cf83bf console log report ci2-netbsd
2019/03/06 17:57 netbsd 3ee0d5e1d4d6 05cf83bf console log report ci2-netbsd
2019/03/06 16:46 netbsd 3ee0d5e1d4d6 05cf83bf console log report ci2-netbsd
2019/03/06 15:39 netbsd 3ee0d5e1d4d6 05cf83bf console log report ci2-netbsd
2019/03/06 14:35 netbsd 3ee0d5e1d4d6 05cf83bf console log report ci2-netbsd
2019/03/06 13:23 netbsd 3ee0d5e1d4d6 05cf83bf console log report ci2-netbsd
2019/03/06 12:41 netbsd 3ee0d5e1d4d6 05cf83bf console log report ci2-netbsd
2019/03/06 11:33 netbsd 3ee0d5e1d4d6 05cf83bf console log report ci2-netbsd
2019/03/06 10:20 netbsd 3ee0d5e1d4d6 05cf83bf console log report ci2-netbsd
2019/03/06 09:11 netbsd 3ee0d5e1d4d6 05cf83bf console log report ci2-netbsd
2019/03/06 08:22 netbsd 3ee0d5e1d4d6 05cf83bf console log report ci2-netbsd
2019/03/06 07:19 netbsd 6b47b08a7a66 16559f86 console log report ci2-netbsd
2019/03/06 06:15 netbsd 6b47b08a7a66 16559f86 console log report ci2-netbsd
2019/03/06 05:37 netbsd 6b47b08a7a66 16559f86 console log report ci2-netbsd
2019/03/06 04:29 netbsd 6b47b08a7a66 16559f86 console log report ci2-netbsd
2019/03/06 03:18 netbsd 6b47b08a7a66 16559f86 console log report ci2-netbsd
2019/03/06 02:28 netbsd 6b47b08a7a66 16559f86 console log report ci2-netbsd
2019/03/06 01:26 netbsd 6b47b08a7a66 16559f86 console log report ci2-netbsd
2019/02/24 10:05 netbsd dc893675b200 7a06e792 console log report ci2-netbsd
* Struck through repros no longer work on HEAD.