panic: vref used where vget required

0 views
Skip to the first unread message

syzbot

unread,
2 Sept 2019, 13:58:0602/09/2019
to syzkaller-o...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: d599800f Fix a route use after free in multicast route. M..
git tree: openbsd
console output: https://syzkaller.appspot.com/x/log.txt?x=1195e9ea600000
kernel config: https://syzkaller.appspot.com/x/.config?x=26ca0a9c07f16a3a
dashboard link: https://syzkaller.appspot.com/bug?extid=51d13092f61df4ff11bd

Unfortunately, I don't have any reproducer for this crash yet.

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+51d130...@syzkaller.appspotmail.com

panic: vref used where vget required
Stopped at db_enter+0x18: addq $0x8,%rsp
TID PID UID PRFLAGS PFLAGS CPU COMMAND
100226 49994 0 0 0 1 syz-executor.1
*142054 49994 0 0 0x4000000 0K syz-executor.1
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398
panic() at panic+0x15c sys/kern/subr_prf.c:207
vref(fffffd80667085c0) at vref+0x7e sys/kern/vfs_subr.c:692
namei(ffff800023ba7658) at namei+0x85b sys/kern/vfs_lookup.c:328
sys_unveil(ffff800020ab0290,ffff800023ba7798,ffff800023ba77e0) at
sys_unveil+0x22e sys/kern/vfs_syscalls.c:1024
syscall(ffff800023ba7860) at syscall+0x4a4 mi_syscall
sys/sys/syscall_mi.h:92 [inline]
syscall(ffff800023ba7860) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555
Xsyscall(6,0,8,0,2,ad539e0a280) at Xsyscall+0x128
end of kernel
end trace frame: 0xad7f881dd60, count: 8
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{0}>
ddb{0}> set $lines = 0
ddb{0}> set $maxwidth = 0
ddb{0}> show panic
vref used where vget required
ddb{0}> trace
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398
panic() at panic+0x15c sys/kern/subr_prf.c:207
vref(fffffd80667085c0) at vref+0x7e sys/kern/vfs_subr.c:692
namei(ffff800023ba7658) at namei+0x85b sys/kern/vfs_lookup.c:328
sys_unveil(ffff800020ab0290,ffff800023ba7798,ffff800023ba77e0) at
sys_unveil+0x22e sys/kern/vfs_syscalls.c:1024
syscall(ffff800023ba7860) at syscall+0x4a4 mi_syscall
sys/sys/syscall_mi.h:92 [inline]
syscall(ffff800023ba7860) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555
Xsyscall(6,0,8,0,2,ad539e0a280) at Xsyscall+0x128
end of kernel
end trace frame: 0xad7f881dd60, count: -7
ddb{0}> show registers
rdi 0xffffffff81b16567 db_enter+0x17
rsi 0x1210 __ALIGN_SIZE+0x210
rbp 0xffff800023ba74b0
rbx 0xffff800023ba7560
rdx 0x1211 __ALIGN_SIZE+0x211
rcx 0xffff800021d72000
rax 0xffff800021d72000
r8 0xffffffff81da18ff kprintf+0x16f
r9 0x1
r10 0x25
r11 0xdb300b48eea6ade9
r12 0x3000000008
r13 0xffff800023ba74c0
r14 0x100
r15 0x1
rip 0xffffffff81b16568 db_enter+0x18
cs 0x8
rflags 0x246
rsp 0xffff800023ba74a0
ss 0x10
db_enter+0x18: addq $0x8,%rsp
ddb{0}> show proc
PROC (syz-executor.1) pid=142054 stat=onproc
flags process=0 proc=4000000<THREAD>
pri=32, usrpri=59, nice=20
forw=0xffffffffffffffff, list=0xffff800020ab0c70,0xffff800020ab1b50
process=0xffff800020adc000 user=0xffff800023ba2000,
vmspace=0xfffffd807f00b5c0
estcpu=9, cpticks=0, pctcpu=0.0
user=0, sys=0, intr=0
ddb{0}> ps
PID TID PPID UID S FLAGS WAIT COMMAND
49994 100226 77865 0 7 0 syz-executor.1
49994 128418 77865 0 3 0x4000080 netio syz-executor.1
49994 150424 77865 0 2 0x4000000 syz-executor.1
49994 173121 77865 0 3 0x4000080 fsleep syz-executor.1
*49994 142054 77865 0 7 0x4000000 syz-executor.1
49994 458155 77865 0 3 0x4000080 fsleep syz-executor.1
49994 492784 77865 0 3 0x4000080 netio syz-executor.1
77865 304657 22182 0 3 0x82 nanosleep syz-executor.1
52371 515446 22182 0 3 0x82 piperd syz-executor.0
87822 429101 0 0 3 0x14200 bored sosplice
22182 239940 1034 0 3 0x82 thrsleep syz-fuzzer
22182 166518 1034 0 3 0x4000082 thrsleep syz-fuzzer
22182 118484 1034 0 3 0x4000082 thrsleep syz-fuzzer
22182 429902 1034 0 3 0x4000082 thrsleep syz-fuzzer
22182 354374 1034 0 3 0x4000082 thrsleep syz-fuzzer
22182 364411 1034 0 3 0x4000082 thrsleep syz-fuzzer
22182 273804 1034 0 3 0x4000082 thrsleep syz-fuzzer
22182 451754 1034 0 3 0x4000082 thrsleep syz-fuzzer
22182 475193 1034 0 3 0x4000082 thrsleep syz-fuzzer
22182 165618 1034 0 3 0x4000082 kqread syz-fuzzer
1034 463666 1309 0 3 0x10008a pause ksh
1309 499638 78105 0 3 0x92 select sshd
56374 389529 1 0 3 0x100083 ttyin getty
78105 282598 1 0 3 0x80 select sshd
5917 352934 13789 74 3 0x100092 bpf pflogd
13789 477044 1 0 3 0x80 netio pflogd
19052 360085 43967 73 3 0x100090 kqread syslogd
43967 503909 1 0 3 0x100082 netio syslogd
79634 290671 1 77 3 0x100090 poll dhclient
45954 64261 1 0 3 0x80 poll dhclient
41432 205586 0 0 3 0x14200 pgzero zerothread
61123 239011 0 0 3 0x14200 aiodoned aiodoned
62052 223878 0 0 3 0x14200 syncer update
15789 312341 0 0 3 0x14200 cleaner cleaner
55700 30010 0 0 3 0x14200 reaper reaper
63583 462756 0 0 3 0x14200 pgdaemon pagedaemon
72712 184304 0 0 3 0x14200 bored crynlk
94581 467848 0 0 3 0x14200 bored crypto
74586 398342 0 0 3 0x40014200 acpi0 acpi0
75932 187729 0 0 3 0x40014200 idle1
7714 207270 0 0 3 0x14200 bored softnet
63897 263034 0 0 3 0x14200 bored systqmp
66855 279698 0 0 3 0x14200 bored systq
89015 490184 0 0 3 0x40014200 bored softclock
87314 84163 0 0 3 0x40014200 idle0
32805 338266 0 0 3 0x14200 bored smr
1 85807 0 0 3 0x82 wait init
0 0 -1 0 3 0x10200 scheduler swapper
ddb{0}> show all locks
Process 49994 (syz-executor.1) thread 0xffff800020ab0290 (142054)
exclusive kernel_lock &kernel_lock r = 0 (0xffffffff8266baa8)
#0 witness_lock+0x52e sys/kern/subr_witness.c:1163
#1 __mp_acquire_count+0x51 sys/kern/kern_lock.c:227
#2 mi_switch+0x392 sys/kern/sched_bsd.c:441
#3 sleep_finish+0x113 sys/kern/kern_synch.c:373
#4 rw_enter+0x352 sys/kern/kern_rwlock.c:282
#5 rrw_enter+0x4f sys/kern/kern_rwlock.c:435
#6 VOP_LOCK+0xf0 sys/kern/vfs_vops.c:615
#7 vn_lock+0x81 sys/kern/vfs_vnops.c:562
#8 vfs_lookup+0xe6 sys/kern/vfs_lookup.c:418
#9 namei+0x62c sys/kern/vfs_lookup.c:248
#10 sys_unveil+0x22e sys/kern/vfs_syscalls.c:1024
#11 syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:92 [inline]
#11 syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555
#12 Xsyscall+0x128
ddb{0}> show malloc
Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim
devbuf 9526 6430K 7040K 78643K 12895 0 0
pcb 13 8K 8K 78643K 179 0 0
rtable 91 4K 4K 78643K 629 0 0
ifaddr 57 13K 15K 78643K 191 0 0
counters 39 33K 33K 78643K 39 0 0
ioctlops 0 0K 4K 78643K 1521 0 0
iov 0 0K 16K 78643K 80 0 0
mount 1 1K 1K 78643K 1 0 0
vnodes 1206 76K 77K 78643K 2076 0 0
UFS quota 1 32K 32K 78643K 1 0 0
UFS mount 5 36K 36K 78643K 5 0 0
shm 2 1K 5K 78643K 16 0 0
VM map 2 1K 1K 78643K 2 0 0
sem 12 0K 0K 78643K 123 0 0
dirhash 12 2K 2K 78643K 12 0 0
ACPI 1809 196K 290K 78643K 12843 0 0
file desc 5 13K 25K 78643K 1023 0 0
sigio 0 0K 0K 78643K 4 0 0
proc 61 71K 83K 78643K 707 0 0
subproc 32 2K 2K 78643K 119 0 0
NFS srvsock 1 0K 0K 78643K 1 0 0
NFS daemon 1 16K 16K 78643K 1 0 0
ip_moptions 0 0K 0K 78643K 70 0 0
in_multi 22 1K 2K 78643K 120 0 0
ether_multi 1 0K 0K 78643K 8 0 0
mrt 1 0K 0K 78643K 9 0 0
ISOFS mount 1 32K 32K 78643K 1 0 0
MSDOSFS mount 1 16K 16K 78643K 1 0 0
ttys 72 318K 318K 78643K 72 0 0
exec 0 0K 1K 78643K 354 0 0
pagedep 1 8K 8K 78643K 1 0 0
inodedep 1 32K 32K 78643K 1 0 0
newblk 1 0K 0K 78643K 1 0 0
VM swap 7 26K 26K 78643K 7 0 0
UVM amap 104 21K 25K 78643K 4168 0 0
UVM aobj 34 3K 3K 78643K 37 0 0
memdesc 1 4K 4K 78643K 1 0 0
crypto data 1 1K 1K 78643K 1 0 0
ip6_options 0 0K 0K 78643K 169 0 0
NDP 14 0K 0K 78643K 57 0 0
temp 172 3555K 3628K 78643K 15032 0 0
kqueue 0 0K 0K 78643K 5 0 0
SYN cache 2 16K 16K 78643K 2 0 0
ddb{0}> show all pools
Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg
Idle
arp 64 16 0 12 1 0 1 1 0
8 0
plcache 128 20 0 0 1 0 1 1 0
8 0
rtpcb 80 82 0 80 1 0 1 1 0
8 0
rtentry 112 101 0 67 2 0 2 2 0
8 0
unpcb 120 372 0 358 1 0 1 1 0
8 0
syncache 264 4 0 4 1 1 0 1 0
8 0
tcpqe 32 5942 0 5942 2 2 0 1 0
8 0
tcpcb 544 228 0 224 1 0 1 1 0
8 0
inpcb 280 682 0 675 1 0 1 1 0
8 0
rttmr 72 2 0 2 2 2 0 1 0
8 0
nd6 48 14 0 12 1 0 1 1 0
8 0
pkpcb 40 4 0 4 1 1 0 1 0
8 0
ppxss 1128 22 0 22 1 1 0 1 0
8 0
pfosfp 40 846 0 423 5 0 5 5 0
8 0
pfosfpen 112 1428 0 714 21 0 21 21 0
8 0
pfstitem 24 28 0 18 1 0 1 1 0
8 0
pfstkey 112 28 0 18 1 0 1 1 0
8 0
pfstate 328 28 0 18 2 0 2 2 0
8 0
pfrule 1360 21 0 16 2 1 1 2 0
8 0
art_heap8 4096 1 0 0 1 0 1 1 0
8 0
art_heap4 256 442 0 269 14 0 14 14 0
8 3
art_table 32 443 0 269 2 0 2 2 0
8 0
art_node 16 96 0 65 1 0 1 1 0
8 0
sysvmsgpl 40 14 0 12 3 2 1 1 0
8 0
semapl 112 121 0 111 1 0 1 1 0
8 0
shmpl 112 35 0 3 1 0 1 1 0
8 0
dirhash 1024 17 0 0 3 0 3 3 0
8 0
dino1pl 128 2898 0 1496 46 0 46 46 0
8 0
ffsino 272 2898 0 1496 95 0 95 95 0
8 0
nchpl 144 4493 0 2886 61 0 61 61 0
8 0
uvmvnodes 72 3532 0 0 65 0 65 65 0
8 0
vnodes 208 3532 0 0 186 0 186 186 0
8 0
namei 1024 13772 0 13770 2 1 1 1 0
8 0
percpumem 16 30 0 0 1 0 1 1 0
8 0
scsiplug 64 2 0 2 2 2 0 1 0
8 0
scxspl 192 12641 0 12641 12 11 1 7 0
8 1
plimitpl 152 107 0 99 1 0 1 1 0
8 0
sigapl 432 1208 0 1193 4 2 2 3 0
8 0
futexpl 56 12586 0 12584 1 0 1 1 0
8 0
knotepl 112 272 0 253 1 0 1 1 0
8 0
kqueuepl 104 174 0 172 1 0 1 1 0
8 0
pipepl 112 654 0 635 3 2 1 2 0
8 0
fdescpl 488 1209 0 1193 3 0 3 3 0
8 0
filepl 152 7138 0 7032 9 4 5 7 0
8 0
lockfpl 104 348 0 347 1 0 1 1 0
8 0
lockfspl 48 127 0 126 1 0 1 1 0
8 0
sessionpl 112 23 0 12 1 0 1 1 0
8 0
pgrppl 48 28 0 17 1 0 1 1 0
8 0
ucredpl 96 1423 0 1414 1 0 1 1 0
8 0
zombiepl 144 1193 0 1193 2 1 1 1 0
8 1
processpl 896 1225 0 1193 4 0 4 4 0
8 0
procpl 632 3188 0 3141 6 1 5 5 0
8 1
srpgc 64 14 0 14 3 2 1 1 0
8 1
sosppl 128 8 0 8 2 2 0 1 0
8 0
sockpl 384 1150 0 1127 5 2 3 4 0
8 0
mcl64k 65536 13 0 0 2 0 2 2 0
8 0
mcl16k 16384 2 0 0 1 0 1 1 0
8 0
mcl12k 12288 10 0 0 1 0 1 1 0
8 0
mcl9k 9216 6 0 0 1 0 1 1 0
8 0
mcl8k 8192 4 0 0 1 0 1 1 0
8 0
mcl4k 4096 16 0 0 2 0 2 2 0
8 0
mcl2k2 2112 1 0 0 1 0 1 1 0
8 0
mcl2k 2048 179 0 0 21 0 21 21 0
8 0
mtagpl 80 21 0 0 1 0 1 1 0
8 0
mbufpl 256 227 0 0 14 0 14 14 0
8 0
bufpl 256 9211 0 2163 441 0 441 441 0
8 0
anonpl 16 118061 0 108131 87 20 67 67 0 124
13
amapchunkpl 152 6883 0 6767 16 7 9 10 0
158 4
amappl16 192 5473 0 4759 64 20 44 48 0
8 7
amappl15 184 1 0 1 1 1 0 1 0
8 0
amappl14 176 235 0 231 1 0 1 1 0
8 0
amappl13 168 327 0 325 1 0 1 1 0
8 0
amappl12 160 2 0 2 1 1 0 1 0
8 0
amappl11 152 215 0 198 1 0 1 1 0
8 0
amappl10 144 13 0 7 1 0 1 1 0
8 0
amappl9 136 978 0 971 1 0 1 1 0
8 0
amappl8 128 493 0 469 1 0 1 1 0
8 0
amappl7 120 61 0 55 1 0 1 1 0
8 0
amappl6 112 222 0 212 1 0 1 1 0
8 0
amappl5 104 172 0 158 1 0 1 1 0
8 0
amappl4 96 1645 0 1616 1 0 1 1 0
8 0
amappl3 88 405 0 399 1 0 1 1 0
8 0
amappl2 80 8360 0 8288 3 1 2 3 0
8 0
amappl1 72 36179 0 35732 25 15 10 20 0
8 0
amappl 80 3515 0 3473 1 0 1 1 0
84 0
dma4096 4096 1 0 1 1 1 0 1 0
8 0
dma256 256 6 0 6 1 1 0 1 0
8 0
dma64 64 259 0 259 1 1 0 1 0
8 0
dma32 32 7 0 7 1 1 0 1 0
8 0
dma16 16 17 0 17 1 1 0 1 0
8 0
aobjpl 64 36 0 3 1 0 1 1 0
8 0
uaddrrnd 24 1209 0 1193 1 0 1 1 0
8 0
uaddrbest 32 2 0 0 1 0 1 1 0
8 0
uaddr 24 1209 0 1193 1 0 1 1 0
8 0
vmmpekpl 168 13123 0 13090 2 0 2 2 0
8 0
vmmpepl 168 153132 0 151277 168 62 106 108 0 357
21
vmsppl 368 1208 0 1193 2 0 2 2 0
8 0
pdppl 4096 2425 0 2386 7 1 6 6 0
8 0
pvpl 32 357458 0 344308 226 56 170 170 0 265
37
pmappl 232 1208 0 1193 3 2 1 2 0
8 0
extentpl 40 38 0 22 1 0 1 1 0
8 0
phpool 112 611 0 5 18 0 18 18 0
8 0


---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
1 Dec 2019, 12:58:0501/12/2019
to syzkaller-o...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages