panic: ffs_valloc: dup alloc

39 views
Skip to first unread message

syzbot

unread,
Oct 24, 2019, 6:58:07 AM10/24/19
to syzkaller-o...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 837509c5 Enable sxisid(4).
git tree: openbsd
console output: https://syzkaller.appspot.com/x/log.txt?x=1438972f600000
kernel config: https://syzkaller.appspot.com/x/.config?x=d0fe83f82fe104d4
dashboard link: https://syzkaller.appspot.com/bug?extid=3e7518ccfa1627f92ce1

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+3e7518...@syzkaller.appspotmail.com

panic: ffs_valloc: dup alloc
Stopped at db_enter+0x18: addq $0x8,%rsp
TID PID UID PRFLAGS PFLAGS CPU COMMAND
*135309 97919 0 0 0x4000000 0 syz-executor.0
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398
panic() at panic+0x15c sys/kern/subr_prf.c:207
ffs_inode_alloc() at ffs_inode_alloc+0x778 sys/ufs/ffs/ffs_alloc.c:403
ufs_makeinode(2000,fffffd803de91500,ffff80001580d220,ffff80001580d270) at
ufs_makeinode+0xaa sys/ufs/ufs/ufs_vnops.c:1832
ufs_mknod(ffff80001580d0c0) at ufs_mknod+0x4e sys/ufs/ufs/ufs_vnops.c:172
VOP_MKNOD(fffffd803de91500,ffff80001580d220,ffff80001580d270,ffff80001580d150)
at
VOP_MKNOD+0xc6 sys/kern/vfs_vops.c:135
domknodat(ffff8000ffff33d8,ffffff9c,20000040,80002002,28ae) at
domknodat+0x31e sys/kern/vfs_syscalls.c:1565
syscall(ffff80001580d410) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555
Xsyscall(6,0,ffffffffffffff8d,0,3,4c4987fd010) at Xsyscall+0x128
end of kernel
end trace frame: 0x4c6ca7a2f80, count: 6
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
ffs_valloc: dup alloc
ddb> 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
ffs_inode_alloc() at ffs_inode_alloc+0x778 sys/ufs/ffs/ffs_alloc.c:403
ufs_makeinode(2000,fffffd803de91500,ffff80001580d220,ffff80001580d270) at
ufs_makeinode+0xaa sys/ufs/ufs/ufs_vnops.c:1832
ufs_mknod(ffff80001580d0c0) at ufs_mknod+0x4e sys/ufs/ufs/ufs_vnops.c:172
VOP_MKNOD(fffffd803de91500,ffff80001580d220,ffff80001580d270,ffff80001580d150)
at
VOP_MKNOD+0xc6 sys/kern/vfs_vops.c:135
domknodat(ffff8000ffff33d8,ffffff9c,20000040,80002002,28ae) at
domknodat+0x31e sys/kern/vfs_syscalls.c:1565
syscall(ffff80001580d410) at syscall+0x507 sys/arch/amd64/amd64/trap.c:555
Xsyscall(6,0,ffffffffffffff8d,0,3,4c4987fd010) at Xsyscall+0x128
end of kernel
end trace frame: 0x4c6ca7a2f80, count: -9
ddb> show registers
rdi 0xffffffff8208d767 db_enter+0x17
rsi 0x27d7 __ALIGN_SIZE+0x17d7
rbp 0xffff80001580cd90
rbx 0xffff80001580ce40
rdx 0x27d8 __ALIGN_SIZE+0x17d8
rcx 0xffff800017398000
rax 0xffff800017398000
r8 0xffff80001580cd50
r9 0x1
r10 0xffff800000075980
r11 0x368e091562ae72be
r12 0x3000000008
r13 0xffff80001580cda0
r14 0x100
r15 0x1
rip 0xffffffff8208d768 db_enter+0x18
cs 0x8
rflags 0x246
rsp 0xffff80001580cd80
ss 0x10
db_enter+0x18: addq $0x8,%rsp
ddb> show proc
PROC (syz-executor.0) pid=135309 stat=onproc
flags process=0 proc=4000000<THREAD>
pri=17, usrpri=81, nice=20
forw=0xffffffffffffffff, list=0xffff8000ffff2290,0xffffffff82577d38
process=0xffff8000148a2018 user=0xffff800015808000,
vmspace=0xfffffd803f013440
estcpu=36, cpticks=1, pctcpu=0.0
user=0, sys=1, intr=0
ddb> ps
PID TID PPID UID S FLAGS WAIT COMMAND
97919 265415 44183 0 2 0 syz-executor.0
*97919 135309 44183 0 7 0x4000000 syz-executor.0
39190 228536 74526 0 2 0 syz-executor.1
39190 49742 74526 0 3 0x4000080 fsleep syz-executor.1
74526 431182 56856 0 2 0x482 syz-executor.1
44183 282346 56856 0 2 0x482 syz-executor.0
66760 234596 0 0 3 0x14200 acct acct
9440 56867 1 0 3 0x100083 ttyin getty
65607 3671 0 0 3 0x14200 bored sosplice
56856 369299 12053 0 3 0x82 thrsleep syz-fuzzer
56856 387841 12053 0 3 0x4000082 thrsleep syz-fuzzer
56856 279805 12053 0 3 0x4000082 thrsleep syz-fuzzer
56856 194962 12053 0 3 0x4000082 thrsleep syz-fuzzer
56856 83521 12053 0 3 0x4000082 kqread syz-fuzzer
56856 461018 12053 0 3 0x4000082 thrsleep syz-fuzzer
56856 166364 12053 0 3 0x4000082 thrsleep syz-fuzzer
56856 355527 12053 0 3 0x4000082 thrsleep syz-fuzzer
12053 380103 88055 0 3 0x10008a pause ksh
88055 190891 64905 0 3 0x92 select sshd
64905 230863 1 0 3 0x80 select sshd
61674 166773 75312 73 3 0x100090 kqread syslogd
75312 335144 1 0 3 0x100082 netio syslogd
30982 365791 1 77 3 0x100090 poll dhclient
48059 75619 1 0 3 0x80 poll dhclient
99228 87265 0 0 2 0x14200 zerothread
91676 228054 0 0 3 0x14200 aiodoned aiodoned
16101 28906 0 0 3 0x14200 syncer update
87427 479151 0 0 3 0x14200 cleaner cleaner
1406 418876 0 0 3 0x14200 reaper reaper
55175 73081 0 0 3 0x14200 pgdaemon pagedaemon
75257 107605 0 0 3 0x14200 bored crynlk
99114 277285 0 0 3 0x14200 bored crypto
7749 257899 0 0 3 0x40014200 acpi0 acpi0
45085 270582 0 0 3 0x14200 bored softnet
33958 90764 0 0 3 0x14200 bored systqmp
48228 124651 0 0 3 0x14200 bored systq
98007 413899 0 0 3 0x40014200 bored softclock
9894 249729 0 0 3 0x40014200 idle0
39669 210225 0 0 3 0x14200 bored smr
1 433366 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 Kern Lim
devbuf 9631 7046K 8386K 78643K 57449 0 0
pcb 13 14K 16K 78643K 3620 0 0
rtable 110 12K 13K 78643K 9077 0 0
ifaddr 114 32K 39K 78643K 2198 0 0
counters 19 16K 16K 78643K 19 0 0
ioctlops 0 0K 2K 78643K 5724 0 0
iov 0 0K 32K 78643K 3813 0 0
mount 1 1K 1K 78643K 1 0 0
vnodes 1226 77K 77K 78643K 17632 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 162 0 0
VM map 167 41K 41K 78643K 262 0 0
sem 12 0K 0K 78643K 12214 0 0
dirhash 12 2K 2K 78643K 12 0 0
ACPI 1793 195K 288K 78643K 12645 0 0
file desc 6 17K 25K 78643K 14422 0 0
sigio 0 0K 0K 78643K 297 0 0
proc 50 38K 63K 78643K 5052 0 0
subproc 32 2K 2K 78643K 1471 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 1314 0 0
in_multi 34 2K 3K 78643K 1753 0 0
ether_multi 1 0K 0K 78643K 128 0 0
mrt 1 0K 0K 78643K 83 0 0
ISOFS mount 1 32K 32K 78643K 1 0 0
MSDOSFS mount 1 16K 16K 78643K 1 0 0
ttys 150 662K 662K 78643K 150 0 0
exec 0 0K 1K 78643K 3096 0 0
pfkey data 0 0K 4K 78643K 2 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 321 1276K 1276K 78643K 37284 0 0
UVM aobj 130 4K 4K 78643K 141 0 0
memdesc 1 4K 4K 78643K 1 0 0
crypto data 1 1K 1K 78643K 1 0 0
ip6_options 0 0K 1K 78643K 3236 0 0
NDP 27 0K 1K 78643K 753 0 0
temp 276 3546K 4185K 78643K 706819 0 0
kqueue 0 0K 0K 78643K 110 0 0
SYN cache 2 16K 16K 78643K 2 0 0
ddb> show all pools
Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg
Idle
arp 64 337 0 333 1 0 1 1 0
8 0
rtpcb 80 1646 0 1643 1 0 1 1 0
8 0
rtentry 112 1828 0 1791 2 0 2 2 0
8 0
unpcb 120 7296 0 7276 11 9 2 2 0
8 1
syncache 264 84 0 84 39 39 0 1 0
8 0
sackhl 24 4 0 4 3 3 0 1 0
8 0
tcpqe 32 289 0 289 25 25 0 1 0
8 0
tcpcb 544 21067 0 21060 143 141 2 16 0
8 1
ipq 40 127 0 127 43 43 0 1 0
8 0
ipqe 40 3006 0 3006 43 43 0 1 0
8 0
inpcb 280 56599 0 56583 224 220 4 13 0
8 2
rttmr 72 34 0 34 2 2 0 1 0
8 0
ip6q 72 11 0 11 7 7 0 1 0
8 0
ip6af 40 33 0 33 7 7 0 1 0
8 0
nd6 48 263 0 259 8 7 1 1 0
8 0
pkpcb 40 59 0 59 21 21 0 1 0
8 0
swfcl 56 16 0 0 1 0 1 1 0
8 0
ppxss 1128 265 0 263 56 55 1 1 0
8 0
art_heap8 4096 58 0 57 34 33 1 3 0
8 0
art_heap4 256 8162 0 7949 83 66 17 33 0
8 0
art_table 32 8220 0 8006 14 11 3 5 0
8 0
art_node 16 1827 0 1793 1 0 1 1 0
8 0
sysvmsgpl 40 20 0 17 1 0 1 1 0
8 0
semapl 112 12212 0 12202 1 0 1 1 0
8 0
shmpl 112 139 0 11 4 0 4 4 0
8 0
dirhash 1024 17 0 0 3 0 3 3 0
8 0
dino1pl 128 23516 0 22051 50 2 48 48 0
8 0
ffsino 240 23516 0 22051 87 0 87 87 0
8 0
nchpl 144 45099 0 44612 60 41 19 60 0
8 0
uvmvnodes 72 9222 0 0 168 0 168 168 0
8 0
vnodes 208 9222 0 0 486 0 486 486 0
8 0
namei 1024 164791 0 164790 4 3 1 1 0
8 0
vcpupl 1984 165 0 0 21 0 21 21 0
8 0
vmpool 520 260 0 95 15 4 11 11 0
8 0
scsiplug 64 8 0 8 7 7 0 1 0
8 0
scxspl 192 165263 0 165263 63 62 1 6 0
8 1
plimitpl 152 1288 0 1281 1 0 1 1 0
8 0
sigapl 432 14344 0 14330 2 0 2 2 0
8 0
futexpl 56 538654 0 538653 4 3 1 1 0
8 0
knotepl 112 3877 0 3858 9 8 1 2 0
8 0
kqueuepl 104 4575 0 4573 16 15 1 4 0
8 0
pipepl 112 8770 0 8751 29 28 1 2 0
8 0
fdescpl 424 14345 0 14330 2 0 2 2 0
8 0
filepl 120 153939 0 153828 130 125 5 11 0
8 1
lockfpl 104 6122 0 6120 1 0 1 1 0
8 0
lockfspl 48 1813 0 1811 1 0 1 1 0
8 0
sessionpl 112 104 0 94 1 0 1 1 0
8 0
pgrppl 48 248 0 238 1 0 1 1 0
8 0
ucredpl 96 15678 0 15669 1 0 1 1 0
8 0
zombiepl 144 14335 0 14335 1 0 1 1 0
8 1
processpl 864 14366 0 14335 4 0 4 4 0
8 0
procpl 632 32001 0 31961 7 3 4 5 0
8 0
sosppl 128 264 0 264 58 58 0 1 0
8 0
sockpl 384 66361 0 66321 317 308 9 21 0
8 5
mcl64k 65536 3661 0 3661 234 233 1 64 0
8 1
mcl16k 16384 251 0 251 58 57 1 1 0
8 1
mcl12k 12288 503 0 503 31 30 1 1 0
8 1
mcl9k 9216 302 0 302 49 48 1 1 0
8 1
mcl8k 8192 1043 0 1043 11 10 1 1 0
8 1
mcl4k 4096 1570 0 1570 8 7 1 1 0
8 1
mcl2k2 2112 135 0 135 56 56 0 1 0
8 0
mcl2k 2048 100343 0 100297 51 44 7 14 0
8 0
mtagpl 80 800 0 794 9 8 1 1 0
8 0
mbufpl 256 379415 0 379299 518 488 30 52 0 8
21
bufpl 256 65651 0 56429 577 0 577 577 0
8 0
anonpl 16 1894033 0 1870804 485 375 110 113 0
62 9
amapchunkpl 152 75592 0 75432 190 182 8 20 0
158 0
amappl16 192 93881 0 92446 517 433 84 91 0
8 8
amappl15 184 3308 0 3308 16 15 1 1 0
8 1
amappl14 176 4510 0 4501 1 0 1 1 0
8 0
amappl13 168 557 0 557 13 13 0 1 0
8 0
amappl12 160 1367 0 1365 1 0 1 1 0
8 0
amappl11 152 1135 0 1124 1 0 1 1 0
8 0
amappl10 144 1867 0 1862 1 0 1 1 0
8 0
amappl9 136 3585 0 3578 1 0 1 1 0
8 0
amappl8 128 3049 0 3005 2 0 2 2 0
8 0
amappl7 120 2147 0 2140 1 0 1 1 0
8 0
amappl6 112 936 0 926 1 0 1 1 0
8 0
amappl5 104 2395 0 2383 1 0 1 1 0
8 0
amappl4 96 13592 0 13562 1 0 1 1 0
8 0
amappl3 88 4613 0 4587 1 0 1 1 0
8 0
amappl2 80 111190 0 111100 3 1 2 3 0
8 0
amappl1 72 273371 0 272931 29 20 9 20 0
8 0
amappl 80 33776 0 33652 4 1 3 3 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
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 17 0 17 1 1 0 1 0
8 0
aobjpl 64 140 0 11 3 0 3 3 0
8 0
uaddrrnd 24 14605 0 14330 2 0 2 2 0
8 0
uaddrbest 32 2 0 0 1 0 1 1 0
8 0
uaddr 24 14605 0 14330 2 0 2 2 0
8 0
vmmpekpl 168 80194 0 80136 3 0 3 3 0
8 0
vmmpepl 168 1769488 0 1766354 897 724 173 181 0 357
34
vmsppl 272 14344 0 14330 11 10 1 2 0
8 0
pdppl 4096 29216 0 29015 35 9 26 26 0
8 0
pvpl 32 4914027 0 4891426 1021 801 220 332 0 265
25
pmappl 200 14604 0 14425 11 1 10 10 0
8 0
extentpl 40 41 0 26 1 0 1 1 0
8 0
phpool 112 1859 0 1103 23 1 22 22 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,
Jan 25, 2020, 10:52:06 AM1/25/20
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