uvm_fault: fifo_write (2)

4 views
Skip to first unread message

syzbot

unread,
Sep 12, 2022, 5:45:36 AM9/12/22
to syzkaller-o...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 81d2f9166a86 Remove the DKF_LABELVALID flag from struct di..
git tree: openbsd
console output: https://syzkaller.appspot.com/x/log.txt?x=1420864f080000
kernel config: https://syzkaller.appspot.com/x/.config?x=7058272de1526588
dashboard link: https://syzkaller.appspot.com/bug?extid=5779bc64fc4fdd0a5140
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=128e9120880000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+5779bc...@syzkaller.appspotmail.com

uvm_fault(0xfffffd806ab3fe78, 0x8, 0, 1) -> e
kernel: page fault trap, code=0
Stopped at fifo_write+0x4e: movq 0x8(%rax),%r12
TID PID UID PRFLAGS PFLAGS CPU COMMAND
256633 23036 32767 0x10 0 0 syz-executor.4
* 26645 23036 32767 0x10 0x4000000 1K syz-executor.4
fifo_write(ffff8000214a8aa0) at fifo_write+0x4e sys/miscfs/fifofs/fifo_vnops.c:271
VOP_WRITE(fffffd807e7e1a38,ffff8000214a8b38,8,fffffd807f7d71a0) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245
vn_rdwr(1,fffffd807e7e1a38,ffff800021258800,104,0,1,1266d70fcb37a0f2,ffff8000214a8c60,fffffd807e7e1a38,78) at vn_rdwr+0xe9 sys/kern/vfs_vnops.c:324
ufs_symlink(ffff8000214a8c60) at ufs_symlink+0x142 sys/ufs/ufs/ufs_vnops.c:1386
VOP_SYMLINK(fffffd806b1d7968,ffff8000214a8de0,ffff8000214a8e10,ffff8000214a8d10,ffff800021258800) at VOP_SYMLINK+0xd0 sys/kern/vfs_vops.c:426
dosymlinkat(ffff80002140e7f0,20000200,ffffff9c,20000340) at dosymlinkat+0x154 sys/kern/vfs_syscalls.c:1802
syscall(ffff8000214a8f90) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline]
syscall(ffff8000214a8f90) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0xf890e948140, count: 7
https://www.openbsd.org/ddb.html describes the minimum info required in bug
reports. Insufficient info makes it difficult to find and fix bugs.
ddb{1}>
ddb{1}> set $lines = 0
ddb{1}> set $maxwidth = 0
ddb{1}> show panic
*cpu1: uvm_fault(0xfffffd806ab3fe78, 0x8, 0, 1) -> e
ddb{1}> trace
fifo_write(ffff8000214a8aa0) at fifo_write+0x4e sys/miscfs/fifofs/fifo_vnops.c:271
VOP_WRITE(fffffd807e7e1a38,ffff8000214a8b38,8,fffffd807f7d71a0) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245
vn_rdwr(1,fffffd807e7e1a38,ffff800021258800,104,0,1,1266d70fcb37a0f2,ffff8000214a8c60,fffffd807e7e1a38,78) at vn_rdwr+0xe9 sys/kern/vfs_vnops.c:324
ufs_symlink(ffff8000214a8c60) at ufs_symlink+0x142 sys/ufs/ufs/ufs_vnops.c:1386
VOP_SYMLINK(fffffd806b1d7968,ffff8000214a8de0,ffff8000214a8e10,ffff8000214a8d10,ffff800021258800) at VOP_SYMLINK+0xd0 sys/kern/vfs_vops.c:426
dosymlinkat(ffff80002140e7f0,20000200,ffffff9c,20000340) at dosymlinkat+0x154 sys/kern/vfs_syscalls.c:1802
syscall(ffff8000214a8f90) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline]
syscall(ffff8000214a8f90) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0xf890e948140, count: -8
ddb{1}> show registers
rdi 0x1
rsi 0x1
rbp 0xffff8000214a8a90
rbx 0x8
rdx 0x8
rcx 0x1
rax 0
r8 0
r9 0x1
r10 0xfffffd807f7d71a0
r11 0x32e26d187ca1eb49
r12 0x1
r13 0xffff8000214a8b38
r14 0xffff8000214a8aa0
r15 0xfffffd807e7e1a38
rip 0xffffffff81ad958e fifo_write+0x4e
cs 0x8
rflags 0x10246 __ALIGN_SIZE+0xf246
rsp 0xffff8000214a8a50
ss 0x10
fifo_write+0x4e: movq 0x8(%rax),%r12
ddb{1}> show proc
PROC (syz-executor.4) pid=26645 stat=onproc
flags process=10<SUGID> proc=4000000<THREAD>
pri=17, usrpri=86, nice=20
forw=0xffffffffffffffff, list=0xffff80002140efd0,0xffff80002140e560
process=0xffff8000213ff620 user=0xffff8000214a4000, vmspace=0xfffffd806ab3fe78
estcpu=36, cpticks=1, pctcpu=0.0
user=0, sys=1, intr=0
ddb{1}> ps
PID TID PPID UID S FLAGS WAIT COMMAND
88889 71929 25221 32767 2 0x10 syz-executor.7
63537 110186 47923 32767 2 0x10 syz-executor.2
63537 328376 47923 32767 3 0x4000090 fsleep syz-executor.2
63537 294138 47923 32767 3 0x4000090 fifor syz-executor.2
53691 129720 99563 32767 2 0x10 syz-executor.6
53691 26088 99563 32767 3 0x4000090 fifor syz-executor.6
23036 256633 95467 32767 7 0x10 syz-executor.4
23036 278752 95467 32767 2 0x4000010 syz-executor.4
*23036 26645 95467 32767 7 0x4000010 syz-executor.4
23036 80733 95467 32767 3 0x4000090 fsleep syz-executor.4
23036 221913 95467 32767 3 0x4000090 fsleep syz-executor.4
23036 194135 95467 32767 3 0x4000090 fsleep syz-executor.4
96874 78963 4859 32767 2 0x10 syz-executor.1
96874 251460 4859 32767 3 0x4000090 fsleep syz-executor.1
55533 243034 25852 32767 2 0x10 syz-executor.3
55533 145875 25852 32767 2 0x4000010 syz-executor.3
99563 489012 60391 32767 3 0x90 nanoslp syz-executor.6
60391 247236 81812 0 3 0x82 wait syz-executor.6
47923 302697 5429 32767 3 0x90 nanoslp syz-executor.2
95467 235115 41254 32767 3 0x90 nanoslp syz-executor.4
5429 162390 81812 0 3 0x82 wait syz-executor.2
41254 340668 81812 0 3 0x82 wait syz-executor.4
25221 198681 21251 32767 3 0x90 nanoslp syz-executor.7
4859 422732 16674 32767 3 0x90 nanoslp syz-executor.1
21251 119286 81812 0 3 0x82 wait syz-executor.7
25852 16837 16026 32767 3 0x90 nanoslp syz-executor.3
16674 220028 81812 0 3 0x82 wait syz-executor.1
16026 160617 81812 0 3 0x82 wait syz-executor.3
49967 460103 30365 32767 3 0x10 biowait syz-executor.5
30365 55450 81812 0 3 0x82 wait syz-executor.5
47086 338729 99031 32767 2 0x10 syz-executor.0
99031 144740 81812 0 3 0x82 wait syz-executor.0
81812 178730 77852 0 3 0x82 thrsleep syz-execprog
81812 524154 77852 0 3 0x4000082 nanoslp syz-execprog
81812 79250 77852 0 3 0x4000082 wait syz-execprog
81812 24537 77852 0 3 0x4000082 thrsleep syz-execprog
81812 322144 77852 0 3 0x4000082 wait syz-execprog
81812 413631 77852 0 3 0x4000082 wait syz-execprog
81812 453003 77852 0 3 0x4000082 wait syz-execprog
81812 61390 77852 0 3 0x4000082 thrsleep syz-execprog
81812 334779 77852 0 3 0x4000082 wait syz-execprog
81812 362930 77852 0 3 0x4000082 wait syz-execprog
81812 394523 77852 0 3 0x4000082 wait syz-execprog
81812 115627 77852 0 3 0x4000082 wait syz-execprog
81812 10552 77852 0 3 0x4000082 thrsleep syz-execprog
81812 2987 77852 0 3 0x4000082 thrsleep syz-execprog
81812 312288 77852 0 3 0x4000082 kqread syz-execprog
77852 45369 44046 0 3 0x10008a sigsusp ksh
44046 307328 84549 0 3 0x9a kqread sshd
14338 329790 1 0 3 0x100083 ttyin getty
84549 134660 1 0 3 0x88 kqread sshd
85370 218841 64818 73 3 0x1100090 kqread syslogd
64818 425110 1 0 3 0x100082 netio syslogd
22093 163714 1 0 3 0x100080 kqread resolvd
15374 301116 78204 77 3 0x100092 kqread dhcpleased
24261 510476 78204 77 3 0x100092 kqread dhcpleased
78204 473779 1 0 3 0x80 kqread dhcpleased
71208 463058 0 0 3 0x14200 bored smr
93882 508770 0 0 2 0x14200 zerothread
75723 464431 0 0 3 0x14200 aiodoned aiodoned
10975 443940 0 0 3 0x14200 syncer update
48752 310263 0 0 3 0x14200 cleaner cleaner
42670 265448 0 0 3 0x14200 reaper reaper
53816 125511 0 0 3 0x14200 pgdaemon pagedaemon
87757 280640 0 0 3 0x14200 bored viomb
96465 135568 0 0 3 0x40014200 acpi0 acpi0
59429 63212 0 0 3 0x40014200 idle1
87896 450933 0 0 3 0x14200 bored softnet
74958 88989 0 0 3 0x14200 bored softnet
96373 40517 0 0 3 0x14200 bored softnet
95725 511812 0 0 3 0x14200 bored softnet
75613 154396 0 0 3 0x14200 bored systqmp
24350 104716 0 0 3 0x14200 bored systq
21887 270487 0 0 3 0x40014200 bored softclock
49160 238465 0 0 3 0x40014200 idle0
1 102358 0 0 3 0x82 wait init
0 0 -1 0 3 0x10200 scheduler swapper
ddb{1}> show all locks
Process 23036 (syz-executor.4) thread 0xffff80002140e7f0 (26645)
exclusive kernel_lock &kernel_lock r = 1 (0xffffffff829f2a00)
#0 witness_lock+0x44d
#1 __mp_acquire_count+0x48 sys/kern/kern_lock.c:227
#2 mi_switch+0x3bb sys/kern/sched_bsd.c:415
#3 sleep_finish+0x180 sys/kern/kern_synch.c:417
#4 tsleep+0x12c sys/kern/kern_synch.c:155
#5 biowait+0x91 sys/kern/vfs_bio.c:1268
#6 bwrite+0x21b sys/kern/vfs_bio.c:769
#7 VOP_BWRITE+0x4a sys/kern/vfs_vops.c:640
#8 ufs_direnter+0x8fa sys/ufs/ufs/ufs_lookup.c:909
#9 ufs_makeinode+0x4cc sys/ufs/ufs/ufs_vnops.c:1856
#10 ufs_symlink+0x47 sys/ufs/ufs/ufs_vnops.c:1370
#11 VOP_SYMLINK+0xd0 sys/kern/vfs_vops.c:426
#12 dosymlinkat+0x154 sys/kern/vfs_syscalls.c:1802
#13 syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline]
#13 syscall+0x435 sys/arch/amd64/amd64/trap.c:585
#14 Xsyscall+0x128
exclusive rrwlock inode r = 0 (0xfffffd8069f1ab48)
#0 witness_lock+0x44d
#1 rw_enter+0x3e1 sys/kern/kern_rwlock.c:310
#2 rrw_enter+0x8b sys/kern/kern_rwlock.c:465
#3 VOP_LOCK+0x87 sys/kern/vfs_vops.c:518
#4 vn_lock+0x84 sys/kern/vfs_vnops.c:564
#5 vget+0x1fc sys/kern/vfs_subr.c:676
#6 ufs_ihashget+0x121 sys/ufs/ufs/ufs_ihash.c:119
#7 ffs_vget+0x7c sys/ufs/ffs/ffs_vfsops.c:1324
#8 ffs_inode_alloc+0x1be sys/ufs/ffs/ffs_alloc.c:394
#9 ufs_makeinode+0xae sys/ufs/ufs/ufs_vnops.c:1818
#10 ufs_symlink+0x47 sys/ufs/ufs/ufs_vnops.c:1370
#11 VOP_SYMLINK+0xd0 sys/kern/vfs_vops.c:426
#12 dosymlinkat+0x154 sys/kern/vfs_syscalls.c:1802
#13 syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline]
#13 syscall+0x435 sys/arch/amd64/amd64/trap.c:585
#14 Xsyscall+0x128
Process 49967 (syz-executor.5) thread 0xffff8000ffff47e0 (460103)
exclusive rrwlock inode r = 0 (0xfffffd8069f1a0a8)
#0 witness_lock+0x44d
#1 rw_enter+0x3e1 sys/kern/kern_rwlock.c:310
#2 rrw_enter+0x8b sys/kern/kern_rwlock.c:465
#3 VOP_LOCK+0x87 sys/kern/vfs_vops.c:518
#4 vn_lock+0x84 sys/kern/vfs_vnops.c:564
#5 vget+0x1fc sys/kern/vfs_subr.c:676
#6 ufs_ihashget+0x121 sys/ufs/ufs/ufs_ihash.c:119
#7 ffs_vget+0x7c sys/ufs/ffs/ffs_vfsops.c:1324
#8 ufs_lookup+0x13ba sys/ufs/ufs/ufs_lookup.c:487
#9 VOP_LOOKUP+0x58 sys/kern/vfs_vops.c:85
#10 vfs_lookup+0x6e5 sys/kern/vfs_lookup.c:560
#11 namei+0x36a sys/kern/vfs_lookup.c:244
#12 dounlinkat+0x99 sys/kern/vfs_syscalls.c:1848
#13 syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline]
#13 syscall+0x435 sys/arch/amd64/amd64/trap.c:585
#14 Xsyscall+0x128
exclusive rrwlock inode r = 0 (0xfffffd806a20e808)
#0 witness_lock+0x44d
#1 rw_enter+0x3e1 sys/kern/kern_rwlock.c:310
#2 rrw_enter+0x8b sys/kern/kern_rwlock.c:465
#3 VOP_LOCK+0x87 sys/kern/vfs_vops.c:518
#4 vn_lock+0x84 sys/kern/vfs_vnops.c:564
#5 vfs_lookup+0xd1 sys/kern/vfs_lookup.c:412
#6 namei+0x36a sys/kern/vfs_lookup.c:244
#7 dounlinkat+0x99 sys/kern/vfs_syscalls.c:1848
#8 syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline]
#8 syscall+0x435 sys/arch/amd64/amd64/trap.c:585
#9 Xsyscall+0x128
Process 47086 (syz-executor.0) thread 0xffff8000ffff42a0 (338729)
exclusive rrwlock inode r = 0 (0xfffffd8069f1aa38)
#0 witness_lock+0x44d
#1 rw_enter+0x3e1 sys/kern/kern_rwlock.c:310
#2 rrw_enter+0x8b sys/kern/kern_rwlock.c:465
#3 VOP_LOCK+0x87 sys/kern/vfs_vops.c:518
#4 ufs_ihashins+0x42 sys/ufs/ufs/ufs_ihash.c:140
#5 ffs_vget+0x141 sys/ufs/ffs/ffs_vfsops.c:1353
#6 ffs_inode_alloc+0x1be sys/ufs/ffs/ffs_alloc.c:394
#7 ufs_mkdir+0xf4 sys/ufs/ufs/ufs_vnops.c:1150
#8 VOP_MKDIR+0xbf sys/kern/vfs_vops.c:388
#9 domkdirat+0x121 sys/kern/vfs_syscalls.c:3112
#10 syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline]
#10 syscall+0x435 sys/arch/amd64/amd64/trap.c:585
#11 Xsyscall+0x128
exclusive rrwlock inode r = 0 (0xfffffd806a20e1a8)
#0 witness_lock+0x44d
#1 rw_enter+0x3e1 sys/kern/kern_rwlock.c:310
#2 rrw_enter+0x8b sys/kern/kern_rwlock.c:465
#3 VOP_LOCK+0x87 sys/kern/vfs_vops.c:518
#4 vn_lock+0x84 sys/kern/vfs_vnops.c:564
#5 vfs_lookup+0xd1 sys/kern/vfs_lookup.c:412
#6 namei+0x36a sys/kern/vfs_lookup.c:244
#7 domkdirat+0x75 sys/kern/vfs_syscalls.c:3097
#8 syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline]
#8 syscall+0x435 sys/arch/amd64/amd64/trap.c:585
#9 Xsyscall+0x128
ddb{1}> show malloc
Type InUse MemUse HighUse Limit Requests Type Lim
devbuf 10179 6407K 6420K 78643K 11269 0
pcb 13 8K 8K 78643K 13 0
rtable 234 6K 6K 78643K 351 0
ifaddr 82 16K 16K 78643K 84 0
counters 56 35K 35K 78643K 56 0
ioctlops 0 0K 2K 78643K 33 0
iov 0 0K 0K 78643K 3128 0
mount 1 1K 1K 78643K 1 0
log 0 0K 0K 78643K 4 0
vnodes 1168 73K 73K 78643K 4265 0
UFS quota 1 32K 32K 78643K 1 0
UFS mount 5 36K 36K 78643K 5 0
shm 2 1K 1K 78643K 2 0
VM map 2 1K 1K 78643K 2 0
sem 12 0K 0K 78643K 6258 0
dirhash 12 2K 2K 78643K 12 0
ACPI 1697 195K 286K 78643K 12548 0
file desc 24 89K 125K 78643K 3272 0
proc 56 78K 115K 78643K 451 0
NFS srvsock 1 0K 0K 78643K 1 0
NFS daemon 1 16K 16K 78643K 1 0
in_multi 99 6K 6K 78643K 99 0
ether_multi 1 0K 0K 78643K 1 0
ISOFS mount 1 32K 32K 78643K 1 0
MSDOSFS mount 1 16K 16K 78643K 1 0
ttys 25 122K 122K 78643K 25 0
exec 0 0K 2K 78643K 628 0
tdb 3 0K 0K 78643K 3 0
pagedep 1 8K 8K 78643K 1 0
inodedep 1 32K 32K 78643K 1 0
newblk 1 0K 0K 78643K 1 0
VM swap 8 62K 64K 78643K 10 0
UVM amap 206 75K 76K 78643K 24098 0
UVM aobj 3 2K 2K 78643K 3 0
memdesc 1 4K 4K 78643K 1 0
crypto data 1 1K 1K 78643K 1 0
NDP 11 0K 2K 78643K 27 0
temp 51 4718K 4782K 78643K 12760 0
kqueue 13 20K 44K 78643K 4024 0
SYN cache 2 16K 16K 78643K 2 0
ddb{1}> show all pools
Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
plcache 128 22 0 0 1 0 1 1 0 8 0
rtpcb 120 37 0 34 1 0 1 1 0 8 0
rtentry 112 111 0 1 4 0 4 4 0 8 0
unpcb 144 6205 0 6188 2 0 2 2 0 8 1
syncache 296 5 0 5 2 2 0 1 0 8 0
tcpcb 768 8 0 5 1 0 1 1 0 8 0
arp 120 18 0 0 1 0 1 1 0 8 0
inpcb 368 3185 0 3178 2 0 2 2 0 8 1
nd6 48 24 0 0 1 0 1 1 0 8 0
art_heap8 4096 1 0 0 1 0 1 1 0 8 0
art_heap4 256 452 0 0 29 0 29 29 0 8 0
art_table 32 453 0 0 4 0 4 4 0 8 0
art_node 16 110 0 10 1 0 1 1 0 8 0
semapl 112 6256 0 6246 1 0 1 1 0 8 0
dirhash 1024 17 0 0 3 0 3 3 0 8 0
dino2pl 256 10890 0 9457 90 0 90 90 0 8 0
ffsino 272 10890 0 9457 96 0 96 96 0 8 0
nchpl 144 17414 0 15743 63 0 63 63 0 8 0
uvmvnodes 80 5926 0 0 121 0 121 121 0 8 0
vnodes 216 5926 0 0 330 0 330 330 0 8 0
namei 1024 52756 0 52754 3 2 1 2 0 8 0
percpumem 16 40 0 0 1 0 1 1 0 8 0
kstatmem 264 22 0 0 2 0 2 2 0 8 0
scxspl 216 33863 0 33862 16 15 1 8 0 8 0
plimitpl 152 32 0 9 1 0 1 1 0 8 0
sigapl 424 3565 0 3513 7 0 7 7 0 8 0
futexpl 64 103890 0 103885 1 0 1 1 0 8 0
knotepl 120 104 0 0 4 0 4 4 0 8 0
kqueuepl 216 4047 0 4037 4 2 2 2 0 8 1
pipepl 320 131 0 103 4 1 3 3 0 8 0
fdescpl 496 3548 0 3513 7 2 5 6 0 8 0
filepl 152 14011 0 13880 6 0 6 6 0 8 0
lockfpl 104 6 0 4 1 0 1 1 0 8 0
lockfspl 48 4 0 2 1 0 1 1 0 8 0
sessionpl 144 25 0 9 1 0 1 1 0 8 0
pgrppl 48 25 0 9 1 0 1 1 0 8 0
ucredpl 104 88 0 70 1 0 1 1 0 8 0
zombiepl 144 3513 0 3513 2 1 1 1 0 8 1
processpl 1064 3565 0 3513 5 1 4 5 0 8 0
procpl 672 11428 0 11352 8 0 8 8 0 8 1
sockpl 488 9427 0 9400 6 0 6 6 0 8 2
mcl8k 8192 5 0 0 1 0 1 1 0 8 0
mcl4k 4096 3 0 0 1 0 1 1 0 8 0
mcl2k 2048 78 0 0 9 0 9 9 0 8 0
mtagpl 96 2 0 0 1 0 1 1 0 8 0
mbufpl 256 289 0 0 18 0 18 18 0 8 0
bufpl 288 6683 0 346 453 0 453 453 0 8 0
anonpl 24 711179 0 704933 51 8 43 45 0 186 0
amapchunkpl 152 67065 0 66581 25 3 22 23 0 158 1
amappl16 200 6605 0 6468 8 0 8 8 0 8 0
amappl15 192 13 0 10 2 1 1 1 0 8 0
amappl14 184 401 0 395 1 0 1 1 0 8 0
amappl13 176 80 0 79 2 1 1 1 0 8 0
amappl12 168 822 0 817 2 1 1 1 0 8 0
amappl11 160 483 0 467 1 0 1 1 0 8 0
amappl10 152 427 0 422 1 0 1 1 0 8 0
amappl9 144 1264 0 1261 2 1 1 1 0 8 0
amappl8 136 914 0 879 3 1 2 2 0 8 0
amappl7 128 511 0 492 1 0 1 1 0 8 0
amappl6 120 971 0 953 2 1 1 2 0 8 0
amappl5 112 2411 0 2392 1 0 1 1 0 8 0
amappl4 104 1654 0 1623 2 0 2 2 0 8 0
amappl3 96 12278 0 12210 3 0 3 3 0 8 1
amappl2 88 1237 0 1184 3 1 2 2 0 8 0
amappl1 80 96676 0 95862 22 3 19 21 0 8 0
amappl 88 23669 0 23524 5 1 4 4 0 92 0
dma4096 4096 1 0 1 1 1 0 1 0 8 0
dma1024 1024 1 0 0 1 0 1 1 0 8 0
dma256 256 6 0 6 1 1 0 1 0 8 0
dma128 128 253 0 253 1 1 0 1 0 8 0
dma64 64 6 0 6 1 1 0 1 0 8 0
dma32 32 7 0 7 1 1 0 1 0 8 0
dma16 16 18 0 17 1 0 1 1 0 8 0
aobjpl 72 2 0 0 1 0 1 1 0 8 0
uaddrrnd 24 3548 0 3513 1 0 1 1 0 8 0
uaddrbest 32 2 0 0 1 0 1 1 0 8 0
uaddr 24 3548 0 3513 1 0 1 1 0 8 0
vmmpekpl 168 34652 0 34620 2 0 2 2 0 8 0
vmmpepl 168 321353 0 318984 117 3 114 115 0 357 5
vmsppl 368 3547 0 3513 4 0 4 4 0 8 0
rwobjpl 56 98821 0 91746 104 2 102 102 0 8 1
pdppl 4096 7103 0 7026 121 40 81 95 0 8 4
pvpl 32 1365670 0 1354332 264 94 170 263 0 265 69
pmappl 248 3547 0 3513 4 1 3 3 0 8 0
extentpl 40 56 0 38 1 0 1 1 0 8 0
phpool 112 834 0 44 23 0 23 23 0 8 0
ddb{1}> machine ddbcpu 0
Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp
x86_ipi_db(ffffffff8297aff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:393
x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106
Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23
__mp_lock(ffffffff829f27f8) at __mp_lock+0x122 __mp_lock_spin sys/kern/kern_lock.c:116 [inline]
__mp_lock(ffffffff829f27f8) at __mp_lock+0x122 sys/kern/kern_lock.c:147
intr_handler(ffff800021405720,ffff80000004bd00) at intr_handler+0x5e sys/arch/amd64/amd64/intr.c:532
Xintr_ioapic_edge21_untramp() at Xintr_ioapic_edge21_untramp+0x18f
end of kernel
end trace frame: 0x7f7ffffecd30, count: 9
ddb{0}> trace
x86_ipi_db(ffffffff8297aff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:393
x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106
Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23
__mp_lock(ffffffff829f27f8) at __mp_lock+0x122 __mp_lock_spin sys/kern/kern_lock.c:116 [inline]
__mp_lock(ffffffff829f27f8) at __mp_lock+0x122 sys/kern/kern_lock.c:147
intr_handler(ffff800021405720,ffff80000004bd00) at intr_handler+0x5e sys/arch/amd64/amd64/intr.c:532
Xintr_ioapic_edge21_untramp() at Xintr_ioapic_edge21_untramp+0x18f
end of kernel
end trace frame: 0x7f7ffffecd30, count: -6
ddb{0}> machine ddbcpu 1
Stopped at fifo_write+0x4e: movq 0x8(%rax),%r12
fifo_write(ffff8000214a8aa0) at fifo_write+0x4e sys/miscfs/fifofs/fifo_vnops.c:271
VOP_WRITE(fffffd807e7e1a38,ffff8000214a8b38,8,fffffd807f7d71a0) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245
vn_rdwr(1,fffffd807e7e1a38,ffff800021258800,104,0,1,1266d70fcb37a0f2,ffff8000214a8c60,fffffd807e7e1a38,78) at vn_rdwr+0xe9 sys/kern/vfs_vnops.c:324
ufs_symlink(ffff8000214a8c60) at ufs_symlink+0x142 sys/ufs/ufs/ufs_vnops.c:1386
VOP_SYMLINK(fffffd806b1d7968,ffff8000214a8de0,ffff8000214a8e10,ffff8000214a8d10,ffff800021258800) at VOP_SYMLINK+0xd0 sys/kern/vfs_vops.c:426
dosymlinkat(ffff80002140e7f0,20000200,ffffff9c,20000340) at dosymlinkat+0x154 sys/kern/vfs_syscalls.c:1802
syscall(ffff8000214a8f90) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline]
syscall(ffff8000214a8f90) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0xf890e948140, count: 7
ddb{1}> trace
fifo_write(ffff8000214a8aa0) at fifo_write+0x4e sys/miscfs/fifofs/fifo_vnops.c:271
VOP_WRITE(fffffd807e7e1a38,ffff8000214a8b38,8,fffffd807f7d71a0) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245
vn_rdwr(1,fffffd807e7e1a38,ffff800021258800,104,0,1,1266d70fcb37a0f2,ffff8000214a8c60,fffffd807e7e1a38,78) at vn_rdwr+0xe9 sys/kern/vfs_vnops.c:324
ufs_symlink(ffff8000214a8c60) at ufs_symlink+0x142 sys/ufs/ufs/ufs_vnops.c:1386
VOP_SYMLINK(fffffd806b1d7968,ffff8000214a8de0,ffff8000214a8e10,ffff8000214a8d10,ffff800021258800) at VOP_SYMLINK+0xd0 sys/kern/vfs_vops.c:426
dosymlinkat(ffff80002140e7f0,20000200,ffffff9c,20000340) at dosymlinkat+0x154 sys/kern/vfs_syscalls.c:1802
syscall(ffff8000214a8f90) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline]
syscall(ffff8000214a8f90) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0xf890e948140, count: -8

syzbot

unread,
Nov 4, 2022, 10:56:46 AM11/4/22
to syzkaller-o...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 8eb56b7e496f Don't show CPS URIs when in filemode
git tree: openbsd
console output: https://syzkaller.appspot.com/x/log.txt?x=1404fb19880000
kernel config: https://syzkaller.appspot.com/x/.config?x=1bc15e68cd2a49e5
dashboard link: https://syzkaller.appspot.com/bug?extid=5779bc64fc4fdd0a5140
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=13904f7a880000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1117060e880000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/129e109feabd/disk-8eb56b7e.raw.xz
bsd.gdb: https://storage.googleapis.com/syzbot-assets/ea9fe563c7e7/bsd-8eb56b7e.gdb.xz
kernel image: https://storage.googleapis.com/syzbot-assets/40893d5278b4/kernel-8eb56b7e.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+5779bc...@syzkaller.appspotmail.com

uvm_fault(0xfffffd806d2c9780, 0x8, 0, 1) -> e
kernel: page fault trap, code=0
Stopped at fifo_write+0x4e: movq 0x8(%rax),%r12
TID PID UID PRFLAGS PFLAGS CPU COMMAND
*290330 93464 0 0 0 0 syz-executor411574844
fifo_write(ffff800021787760) at fifo_write+0x4e sys/miscfs/fifofs/fifo_vnops.c:271
VOP_WRITE(fffffd806c625458,ffff8000217877f8,8,fffffd807f7d78f0) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245
vn_rdwr(1,fffffd806c625458,ffff8000216f7800,101,0,1,d9047f15e8059303,ffff800021787920,fffffd806c625458,78) at vn_rdwr+0xe9 sys/kern/vfs_vnops.c:324
ufs_symlink(ffff800021787920) at ufs_symlink+0x136 sys/ufs/ufs/ufs_vnops.c:1386
VOP_SYMLINK(fffffd806c625b18,ffff800021787aa0,ffff800021787ad0,ffff8000217879d0,ffff8000216f7800) at VOP_SYMLINK+0xd0 sys/kern/vfs_vops.c:426
dosymlinkat(ffff8000216f5260,200004c0,3,20000600) at dosymlinkat+0x154 sys/kern/vfs_syscalls.c:1802
syscall(ffff800021787c50) at syscall+0x446 sys/arch/amd64/amd64/trap.c:585
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7f7ffffbf7d0, count: 7
https://www.openbsd.org/ddb.html describes the minimum info required in bug
reports. Insufficient info makes it difficult to find and fix bugs.
ddb>
ddb> set $lines = 0
ddb> set $maxwidth = 0
ddb> show panic
*cpu0: uvm_fault(0xfffffd806d2c9780, 0x8, 0, 1) -> e
ddb> trace
fifo_write(ffff800021787760) at fifo_write+0x4e sys/miscfs/fifofs/fifo_vnops.c:271
VOP_WRITE(fffffd806c625458,ffff8000217877f8,8,fffffd807f7d78f0) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245
vn_rdwr(1,fffffd806c625458,ffff8000216f7800,101,0,1,d9047f15e8059303,ffff800021787920,fffffd806c625458,78) at vn_rdwr+0xe9 sys/kern/vfs_vnops.c:324
ufs_symlink(ffff800021787920) at ufs_symlink+0x136 sys/ufs/ufs/ufs_vnops.c:1386
VOP_SYMLINK(fffffd806c625b18,ffff800021787aa0,ffff800021787ad0,ffff8000217879d0,ffff8000216f7800) at VOP_SYMLINK+0xd0 sys/kern/vfs_vops.c:426
dosymlinkat(ffff8000216f5260,200004c0,3,20000600) at dosymlinkat+0x154 sys/kern/vfs_syscalls.c:1802
syscall(ffff800021787c50) at syscall+0x446 sys/arch/amd64/amd64/trap.c:585
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7f7ffffbf7d0, count: -8
ddb> show registers
rdi 0x1
rsi 0x1
rbp 0xffff800021787750
rbx 0x8
rdx 0x8
rcx 0x1
rax 0
r8 0
r9 0x1
r10 0x1ea23b1352a20a71
r11 0x5402baa6f999f2ba
r12 0x1
r13 0xffff8000217877f8
r14 0xffff800021787760
r15 0xfffffd806c625458
rip 0xffffffff8181b5de fifo_write+0x4e
cs 0x8
rflags 0x10246 __ALIGN_SIZE+0xf246
rsp 0xffff800021787710
ss 0x10
fifo_write+0x4e: movq 0x8(%rax),%r12
ddb> show proc
PROC (syz-executor411574844) pid=290330 stat=onproc
flags process=0 proc=0
pri=17, usrpri=50, nice=20
forw=0xffffffffffffffff, list=0xffff8000216f5ce0,0xffff8000216f57b0
process=0xffff800021709b88 user=0xffff800021782000, vmspace=0xfffffd806d2c9780
estcpu=0, cpticks=1, pctcpu=0.0
user=0, sys=1, intr=0
ddb> ps
PID TID PPID UID S FLAGS WAIT COMMAND
75131 480427 99531 0 2 0 syz-executor411574844
*93464 290330 83965 0 7 0 syz-executor411574844
3912 397535 17876 0 2 0x480 syz-executor411574844
25570 207260 17876 0 2 0 syz-executor411574844
93440 146802 17876 0 2 0x480 syz-executor411574844
16684 307516 17876 0 2 0x480 syz-executor411574844
81116 244606 17876 0 2 0 syz-executor411574844
15061 487562 17876 0 2 0x480 syz-executor411574844
83965 203628 17876 0 2 0x480 syz-executor411574844
99531 107306 17876 0 3 0x80 nanoslp syz-executor411574844
17876 202424 82288 0 3 0x82 nanoslp syz-executor411574844
82288 78760 24164 0 3 0x10008a sigsusp ksh
24164 494983 95751 0 3 0x9a kqread sshd
36604 199438 1 0 3 0x100083 ttyin getty
95751 226392 1 0 3 0x88 kqread sshd
61368 1296 72457 73 3 0x1100090 kqread syslogd
72457 524190 1 0 3 0x100082 netio syslogd
14673 425342 1 0 3 0x100080 kqread resolvd
27345 521161 62177 77 3 0x100092 kqread dhcpleased
54957 237614 62177 77 3 0x100092 kqread dhcpleased
62177 236417 1 0 3 0x80 kqread dhcpleased
538 386781 0 0 3 0x14200 bored smr
66073 14339 0 0 3 0x14200 pgzero zerothread
2824 444891 0 0 3 0x14200 aiodoned aiodoned
96393 513352 0 0 3 0x14200 syncer update
16609 118863 0 0 3 0x14200 cleaner cleaner
98038 502216 0 0 3 0x14200 reaper reaper
53554 25442 0 0 3 0x14200 pgdaemon pagedaemon
61911 312263 0 0 3 0x14200 bored viomb
77174 247244 0 0 3 0x40014200 acpi0 acpi0
25702 314771 0 0 3 0x14200 bored softnet
26139 2599 0 0 3 0x14200 bored softnet
25428 67858 0 0 3 0x14200 bored softnet
49598 269596 0 0 3 0x14200 bored softnet
18489 368007 0 0 3 0x14200 bored systqmp
85444 356694 0 0 3 0x14200 bored systq
9559 460256 0 0 3 0x40014200 bored softclock
82362 78584 0 0 3 0x40014200 idle0
1 316289 0 0 3 0x82 wait init
0 0 -1 0 3 0x10200 scheduler swapper
ddb> show all locks
No such command
ddb> show malloc
Type InUse MemUse HighUse Limit Requests Type Lim
devbuf 10149 6383K 6414K 78643K 11239 0
pcb 13 8K 8K 78643K 13 0
rtable 58 1K 2K 78643K 111 0
ifaddr 25 7K 7K 78643K 25 0
counters 19 16K 16K 78643K 19 0
ioctlops 0 0K 2K 78643K 25 0
mount 1 1K 1K 78643K 1 0
log 0 0K 0K 78643K 4 0
vnodes 1166 73K 73K 78643K 1179 0
UFS quota 1 32K 32K 78643K 1 0
UFS mount 5 36K 36K 78643K 5 0
shm 2 1K 1K 78643K 2 0
VM map 2 0K 0K 78643K 2 0
sem 2 0K 0K 78643K 2 0
dirhash 12 2K 2K 78643K 12 0
ACPI 1697 195K 286K 78643K 12548 0
file desc 1 0K 0K 78643K 1 0
proc 55 58K 59K 78643K 239 0
NFS srvsock 1 0K 0K 78643K 1 0
NFS daemon 1 16K 16K 78643K 1 0
in_multi 11 0K 0K 78643K 11 0
ether_multi 1 0K 0K 78643K 1 0
ISOFS mount 1 32K 32K 78643K 1 0
MSDOSFS mount 1 16K 16K 78643K 1 0
ttys 25 122K 122K 78643K 25 0
exec 0 0K 1K 78643K 244 0
tdb 3 0K 0K 78643K 3 0
pagedep 1 8K 8K 78643K 1 0
inodedep 1 32K 32K 78643K 1 0
newblk 1 0K 0K 78643K 1 0
VM swap 8 62K 64K 78643K 10 0
UVM amap 73 4K 4K 78643K 1238 0
UVM aobj 3 2K 2K 78643K 3 0
memdesc 1 4K 4K 78643K 1 0
crypto data 1 1K 1K 78643K 1 0
NDP 3 0K 0K 78643K 3 0
temp 18 4713K 4777K 78643K 2873 0
kqueue 11 16K 18K 78643K 24 0
SYN cache 2 16K 16K 78643K 2 0
ddb> show all pools
Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
rtpcb 120 21 0 18 1 0 1 1 0 8 0
rtentry 112 23 0 1 1 0 1 1 0 8 0
unpcb 144 33 0 20 1 0 1 1 0 8 0
syncache 296 5 0 5 2 1 1 1 0 8 1
tcpcb 768 8 0 5 1 0 1 1 0 8 0
arp 88 2 0 0 1 0 1 1 0 8 0
inpcb 336 25 0 19 1 0 1 1 0 8 0
art_heap8 4096 1 0 0 1 0 1 1 0 8 0
art_heap4 256 96 0 0 6 0 6 6 0 8 0
art_table 32 97 0 0 1 0 1 1 0 8 0
art_node 16 22 0 2 1 0 1 1 0 8 0
dirhash 1024 17 0 0 3 0 3 3 0 8 0
dino2pl 256 1477 0 76 88 0 88 88 0 8 0
ffsino 240 1477 0 76 83 0 83 83 0 8 0
nchpl 144 1660 0 88 59 0 59 59 0 8 0
uvmvnodes 80 1486 0 0 31 0 31 31 0 8 0
vnodes 216 1486 0 0 83 0 83 83 0 8 0
namei 1024 4409 0 4406 3 1 2 2 0 8 1
kstatmem 264 6 0 0 1 0 1 1 0 8 0
scxspl 216 4579 0 4579 10 9 1 8 0 8 1
plimitpl 152 16 0 10 1 0 1 1 0 8 0
sigapl 424 331 0 288 6 0 6 6 0 8 0
knotepl 120 10513 0 10484 3 1 2 2 0 8 1
kqueuepl 184 20 0 13 1 0 1 1 0 8 0
pipepl 288 99 0 96 2 1 1 1 0 8 0
fdescpl 432 315 0 292 4 0 4 4 0 8 1
filepl 120 1173 0 1117 2 0 2 2 0 8 0
lockfpl 104 6 0 4 1 0 1 1 0 8 0
lockfspl 48 4 0 2 1 0 1 1 0 8 0
sessionpl 144 17 0 9 1 0 1 1 0 8 0
pgrppl 48 17 0 9 1 0 1 1 0 8 0
ucredpl 104 66 0 56 1 0 1 1 0 8 0
zombiepl 144 292 0 288 2 1 1 1 0 8 0
processpl 1000 331 0 288 7 1 6 6 0 8 0
procpl 672 331 0 288 4 0 4 4 0 8 0
sockpl 456 79 0 57 3 0 3 3 0 8 0
mcl8k 8192 9 0 9 2 1 1 1 0 8 1
mcl4k 4096 5 0 5 2 1 1 1 0 8 1
mcl2k 2048 10746 0 10708 8 1 7 7 0 8 0
mtagpl 96 4 0 4 1 1 0 1 0 8 0
mbufpl 256 19247 0 19165 7 0 7 7 0 8 1
bufpl 288 2388 0 72 166 0 166 166 0 8 0
anonpl 24 41867 0 39309 19 3 16 16 0 188 0
amapchunkpl 152 2727 0 2599 6 1 5 5 0 158 0
amappl16 200 49 0 39 2 1 1 1 0 8 0
amappl14 184 87 0 78 1 0 1 1 0 8 0
amappl12 168 298 0 297 2 1 1 1 0 8 0
amappl11 160 40 0 30 1 0 1 1 0 8 0
amappl10 152 1 0 1 1 1 0 1 0 8 0
amappl9 144 943 0 942 1 0 1 1 0 8 0
amappl8 136 20 0 17 1 0 1 1 0 8 0
amappl7 128 18 0 14 1 0 1 1 0 8 0
amappl6 120 117 0 108 1 0 1 1 0 8 0
amappl5 112 78 0 70 1 0 1 1 0 8 0
amappl4 104 367 0 338 1 0 1 1 0 8 0
amappl3 96 439 0 407 1 0 1 1 0 8 0
amappl2 88 508 0 460 3 1 2 2 0 8 0
amappl1 80 9193 0 8682 14 3 11 11 0 8 0
amappl 88 1085 0 1032 2 0 2 2 0 92 0
dma4096 4096 1 0 1 1 1 0 1 0 8 0
dma1024 1024 1 0 0 1 0 1 1 0 8 0
dma256 256 6 0 6 1 1 0 1 0 8 0
dma128 128 253 0 253 1 1 0 1 0 8 0
dma64 64 6 0 6 1 1 0 1 0 8 0
dma32 32 7 0 7 1 1 0 1 0 8 0
dma16 16 18 0 17 1 0 1 1 0 8 0
aobjpl 72 2 0 0 1 0 1 1 0 8 0
uaddrrnd 24 315 0 292 1 0 1 1 0 8 0
uaddrbest 32 2 0 0 1 0 1 1 0 8 0
uaddr 24 315 0 292 1 0 1 1 0 8 0
vmmpekpl 168 6873 0 6859 1 0 1 1 0 8 0
vmmpepl 168 27521 0 26326 60 5 55 55 0 357 1
vmsppl 272 314 0 292 3 1 2 2 0 8 0
rwobjpl 24 10466 0 8296 14 0 14 14 0 8 0
pdppl 4096 636 0 584 86 22 64 64 0 8 12
pvpl 32 131045 0 125899 50 8 42 42 0 265 0
pmappl 216 314 0 292 2 0 2 2 0 8 0
extentpl 40 56 0 38 1 0 1 1 0 8 0
phpool 112 464 0 30 13 0 13 13 0 8 0
ddb> machine ddbcpu 0
No such command
ddb> trace
fifo_write(ffff800021787760) at fifo_write+0x4e sys/miscfs/fifofs/fifo_vnops.c:271
VOP_WRITE(fffffd806c625458,ffff8000217877f8,8,fffffd807f7d78f0) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245
vn_rdwr(1,fffffd806c625458,ffff8000216f7800,101,0,1,d9047f15e8059303,ffff800021787920,fffffd806c625458,78) at vn_rdwr+0xe9 sys/kern/vfs_vnops.c:324
ufs_symlink(ffff800021787920) at ufs_symlink+0x136 sys/ufs/ufs/ufs_vnops.c:1386
VOP_SYMLINK(fffffd806c625b18,ffff800021787aa0,ffff800021787ad0,ffff8000217879d0,ffff8000216f7800) at VOP_SYMLINK+0xd0 sys/kern/vfs_vops.c:426
dosymlinkat(ffff8000216f5260,200004c0,3,20000600) at dosymlinkat+0x154 sys/kern/vfs_syscalls.c:1802
syscall(ffff800021787c50) at syscall+0x446 sys/arch/amd64/amd64/trap.c:585
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7f7ffffbf7d0, count: -8
ddb> machine ddbcpu 1
No such command
ddb> trace
fifo_write(ffff800021787760) at fifo_write+0x4e sys/miscfs/fifofs/fifo_vnops.c:271
VOP_WRITE(fffffd806c625458,ffff8000217877f8,8,fffffd807f7d78f0) at VOP_WRITE+0xbf sys/kern/vfs_vops.c:245
vn_rdwr(1,fffffd806c625458,ffff8000216f7800,101,0,1,d9047f15e8059303,ffff800021787920,fffffd806c625458,78) at vn_rdwr+0xe9 sys/kern/vfs_vnops.c:324
ufs_symlink(ffff800021787920) at ufs_symlink+0x136 sys/ufs/ufs/ufs_vnops.c:1386
VOP_SYMLINK(fffffd806c625b18,ffff800021787aa0,ffff800021787ad0,ffff8000217879d0,ffff8000216f7800) at VOP_SYMLINK+0xd0 sys/kern/vfs_vops.c:426
dosymlinkat(ffff8000216f5260,200004c0,3,20000600) at dosymlinkat+0x154 sys/kern/vfs_syscalls.c:1802
syscall(ffff800021787c50) at syscall+0x446 sys/arch/amd64/amd64/trap.c:585
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7f7ffffbf7d0, count: -8
ddb>

Reply all
Reply to author
Forward
0 new messages