panic: ufsdirhash_lookup: bad offset in hash array Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *280942 92189 0 0x8000000 0x4000000 0 syz-executor.0 db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830611fe) at panic+0x1cf sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd8069560870,ffffffff82fa76fc,2,fffffd806956091c,ffff80002a578b60,0) at ufsdirhash_lookup+0xb9a sys/ufs/ufs/ufs_dirhash.c:342 ufs_lookup() at ufs_lookup+0xf58 sys/ufs/ufs/ufs_lookup.c:214 VOP_LOOKUP(fffffd806c37fea0,ffff80002a578d08,ffff80002a578ca8) at VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 unveil_find_cover(fffffd806c37fea0,ffff80002a52ca38) at unveil_find_cover+0x16d sys/kern/kern_unveil.c:277 unveil_start_relative(ffff80002a52ca38,ffff80002a579048,fffffd806c37fea0) at unveil_start_relative+0x14b sys/kern/kern_unveil.c:606 namei(ffff80002a579048) at namei+0x62e sys/kern/vfs_lookup.c:237 vn_open(ffff80002a579048,201,0) at vn_open+0x1f4 sys/kern/vfs_vnops.c:107 doopenat(ffff80002a52ca38,4,20000240,200,0,ffff80002a5791f0) at doopenat+0x31d sys/kern/vfs_syscalls.c:1123 syscall(ffff80002a5792a0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x96c42175430, count: 3 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: ufsdirhash_lookup: bad offset in hash array ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830611fe) at panic+0x1cf sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd8069560870,ffffffff82fa76fc,2,fffffd806956091c,ffff80002a578b60,0) at ufsdirhash_lookup+0xb9a sys/ufs/ufs/ufs_dirhash.c:342 ufs_lookup() at ufs_lookup+0xf58 sys/ufs/ufs/ufs_lookup.c:214 VOP_LOOKUP(fffffd806c37fea0,ffff80002a578d08,ffff80002a578ca8) at VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 unveil_find_cover(fffffd806c37fea0,ffff80002a52ca38) at unveil_find_cover+0x16d sys/kern/kern_unveil.c:277 unveil_start_relative(ffff80002a52ca38,ffff80002a579048,fffffd806c37fea0) at unveil_start_relative+0x14b sys/kern/kern_unveil.c:606 namei(ffff80002a579048) at namei+0x62e sys/kern/vfs_lookup.c:237 vn_open(ffff80002a579048,201,0) at vn_open+0x1f4 sys/kern/vfs_vnops.c:107 doopenat(ffff80002a52ca38,4,20000240,200,0,ffff80002a5791f0) at doopenat+0x31d sys/kern/vfs_syscalls.c:1123 syscall(ffff80002a5792a0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x96c42175430, count: -12 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002a578980 rbx 0xffff800000a52a20 rdx 0x3fd rcx 0 rax 0x33 r8 0x101010101010101 r9 0x8080808080808080 r10 0xd4f8768065fb4ce2 r11 0x4dbbc88ae55b4ff4 r12 0 r13 0xffff800001163e00 r14 0 r15 0x1 rip 0xffffffff818db095 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002a578970 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) tid=280942 pid=92189 tcnt=2 stat=onproc flags process=8000000 proc=4000000 runpri=32, usrpri=50, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a52c528,0xffffffff834d1830 process=0xffff80002a4e6210 user=0xffff80002a574000, vmspace=0xfffffd807ec83968 estcpu=36, cpticks=0, pctcpu=0.0, user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 92189 113728 85424 0 2 0x8000000 syz-executor.0 *92189 280942 85424 0 7 0xc000000 syz-executor.0 85424 150994 62362 0 3 0x8000082 nanoslp syz-executor.0 62362 351693 52681 0 3 0x18000082 wait syz-execprog 62362 347741 52681 0 3 0x1c000082 thrsleep syz-execprog 62362 144128 52681 0 3 0x1c000082 thrsleep syz-execprog 62362 343248 52681 0 3 0x1c000082 kqread syz-execprog 62362 229821 52681 0 3 0x1c000082 thrsleep syz-execprog 62362 132114 52681 0 3 0x1c000082 thrsleep syz-execprog 62362 457412 52681 0 3 0x1c000082 thrsleep syz-execprog 62362 240947 52681 0 3 0x1c000082 thrsleep syz-execprog 62362 27551 52681 0 3 0x1c000082 thrsleep syz-execprog 62362 282715 52681 0 3 0x1c000082 thrsleep syz-execprog 52681 377065 4749 0 3 0x810008a sigsusp ksh 4749 298476 29630 0 3 0x18000098 kqread sshd-session 29630 313284 87984 0 3 0x18000092 kqread sshd-session 99099 256159 1 0 3 0x18100083 ttyin getty 87984 260 1 0 3 0x18000088 kqread sshd 34093 130252 29004 73 3 0x19100090 kqread syslogd 29004 192785 1 0 3 0x18100082 sbwait syslogd 49595 297247 1 0 3 0x18100080 kqread resolvd 51003 214222 22909 77 3 0x18100092 kqread dhcpleased 43626 166778 22909 77 3 0x18100092 kqread dhcpleased 22909 121952 1 0 3 0x18000080 kqread dhcpleased 15366 357548 0 0 3 0x14200 bored smr 65351 211277 0 0 2 0x14200 zerothread 65613 347167 0 0 3 0x14200 aiodoned aiodoned 62987 74470 0 0 3 0x14200 syncer update 75038 339707 0 0 3 0x14200 cleaner cleaner 26933 82597 0 0 3 0x14200 reaper reaper 51803 320740 0 0 3 0x14200 pgdaemon pagedaemon 7587 423931 0 0 3 0x14200 bored viomb 3756 139944 0 0 3 0x40014200 acpi0 acpi0 7342 434367 0 0 3 0x14200 bored softnet3 58679 487449 0 0 3 0x14200 bored softnet2 19090 116998 0 0 3 0x14200 bored softnet1 27356 186956 0 0 3 0x14200 bored softnet0 61315 460206 0 0 3 0x14200 bored systqmp 18493 47843 0 0 3 0x14200 bored systq 31126 244723 0 0 3 0x40014200 tmoslp softclock 32572 243562 0 0 3 0x40014200 idle0 1 84026 0 0 3 0x8000082 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 10141 10064K 10093K 166960K 11222 0 pcb 17 12K 12K 166960K 17 0 rtable 80 2K 2K 166960K 172 0 pf 16 10K 10K 166960K 19 0 ifaddr 14 2K 2K 166960K 18 0 ifgroup 22 1K 1K 166960K 27 0 counters 23 16K 16K 166960K 24 0 ioctlops 0 0K 2K 166960K 23 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1259 79K 79K 166960K 1275 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 1K 166960K 2 0 VM map 2 1K 1K 166960K 2 0 sem 2 0K 0K 166960K 2 0 dirhash 30 5K 5K 166960K 30 0 ACPI 1697 195K 286K 166960K 12548 0 file desc 3 8K 12K 166960K 35 0 proc 56 66K 67K 166960K 303 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 in_multi 22 1K 1K 166960K 33 0 ether_multi 1 0K 0K 166960K 1 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 25 122K 122K 166960K 25 0 exec 0 0K 1K 166960K 318 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 161 15K 15K 166960K 3570 0 UVM aobj 3 2K 2K 166960K 3 0 pinsyscall 26 52K 104K 166960K 1182 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 NDP 6 0K 0K 166960K 9 0 temp 1 6792K 6856K 166960K 3782 0 kqueue 13 20K 20K 166960K 46 0 SYN cache 2 16K 16K 166960K 2 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle rtpcb 120 25 0 22 1 0 1 1 0 8 0 rtentry 112 45 0 12 1 0 1 1 0 8 0 unpcb 144 67 0 52 1 0 1 1 0 8 0 syncache 336 9 0 9 1 0 1 1 0 8 1 tcpcb 808 12 0 9 1 0 1 1 0 8 0 arp 88 6 0 2 1 0 1 1 0 8 0 inpcb 336 38 0 32 1 0 1 1 0 8 0 nd6 104 6 0 3 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 193 0 48 10 0 10 10 0 8 0 art_table 32 194 0 48 2 0 2 2 0 8 0 art_node 16 44 0 14 1 0 1 1 0 8 0 dirhash 1024 23 0 0 3 0 3 3 0 8 0 dino2pl 256 1559 0 73 93 0 93 93 0 8 0 ffsino 240 1559 0 73 88 0 88 88 0 8 0 nchpl 144 1821 0 100 64 0 64 64 0 8 0 uvmvnodes 80 1568 0 0 32 0 32 32 0 8 0 vnodes 216 1568 0 0 88 0 88 88 0 8 0 namei 1024 6530 0 6529 2 0 2 2 0 8 1 kstatmem 264 10 0 2 1 0 1 1 0 8 0 scxspl 216 7981 0 7981 8 0 8 8 1 8 8 plimitpl 152 51 0 42 1 0 1 1 0 8 0 sigapl 424 398 0 366 5 0 5 5 0 8 1 futexpl 64 14 0 14 1 0 1 1 0 8 1 knotepl 120 6453 0 6416 2 0 2 2 0 8 0 kqueuepl 184 42 0 33 1 0 1 1 0 8 0 pipepl 288 156 0 149 1 0 1 1 0 8 0 fdescpl 432 382 0 366 4 0 4 4 0 8 1 filepl 120 1823 0 1752 3 0 3 3 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 27 0 18 1 0 1 1 0 8 0 pgrppl 48 27 0 18 1 0 1 1 0 8 0 ucredpl 104 111 0 100 1 0 1 1 0 8 0 zombiepl 144 366 0 366 1 0 1 1 0 8 1 processpl 1088 398 0 366 3 0 3 3 0 8 0 procpl 648 419 0 377 5 0 5 5 0 8 1 sockpl 504 130 0 106 4 0 4 4 0 8 0 mcl8k 8192 13 0 13 1 0 1 1 0 8 1 mcl4k 4096 9 0 9 1 0 1 1 0 8 1 mcl2k 2048 17094 0 16993 53 29 24 43 0 8 8 mtagpl 96 4 0 4 1 0 1 1 0 8 1 mbufpl 256 20675 0 20560 23 7 16 22 0 8 7 bufpl 280 4198 0 154 289 0 289 289 0 8 0 anonpl 24 311532 0 308003 51 0 51 51 0 187 17 amapchunkpl 152 13764 0 13416 26 0 26 26 0 158 11 amappl16 200 9231 0 9170 5 0 5 5 0 8 1 amappl15 192 42 0 41 1 0 1 1 0 8 0 amappl14 184 294 0 281 2 0 2 2 0 8 0 amappl13 176 22 0 22 1 0 1 1 0 8 1 amappl12 168 995 0 979 2 0 2 2 0 8 1 amappl11 160 59 0 49 1 0 1 1 0 8 0 amappl10 152 73 0 70 1 0 1 1 0 8 0 amappl9 144 353 0 352 1 0 1 1 0 8 0 amappl8 136 159 0 141 1 0 1 1 0 8 0 amappl7 128 257 0 245 2 0 2 2 0 8 0 amappl6 120 216 0 213 1 0 1 1 0 8 0 amappl5 112 167 0 159 1 0 1 1 0 8 0 amappl4 104 467 0 446 2 0 2 2 0 8 1 amappl3 96 3600 0 3552 3 0 3 3 0 8 1 amappl2 88 995 0 936 4 0 4 4 0 8 1 amappl1 80 14371 0 13863 24 5 19 23 0 8 8 amappl 88 2895 0 2802 4 0 4 4 0 92 1 dma4096 4096 1 0 1 1 0 1 1 0 8 1 dma1024 1024 1 0 0 1 0 1 1 0 8 0 dma256 256 6 0 6 1 0 1 1 0 8 1 dma128 128 253 0 253 1 0 1 1 0 8 1 dma64 64 6 0 6 1 0 1 1 0 8 1 dma32 32 7 0 7 1 0 1 1 0 8 1 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 382 0 366 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 382 0 366 1 0 1 1 0 8 0 vmmpekpl 168 12195 0 12172 2 0 2 2 0 8 0 vmmpepl 168 61510 0 60184 116 0 116 116 0 357 51 vmsppl 344 381 0 366 3 0 3 3 0 8 1 rwobjpl 24 29828 0 27475 20 0 20 20 0 8 2 pdppl 4096 771 0 732 101 46 55 63 0 8 16 pvpl 32 635596 0 627289 356 52 304 356 0 265 217 pmappl 216 381 0 366 2 0 2 2 0 8 1 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 390 0 82 10 0 10 10 0 8 0 ddb> machine ddbcpu 0 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830611fe) at panic+0x1cf sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd8069560870,ffffffff82fa76fc,2,fffffd806956091c,ffff80002a578b60,0) at ufsdirhash_lookup+0xb9a sys/ufs/ufs/ufs_dirhash.c:342 ufs_lookup() at ufs_lookup+0xf58 sys/ufs/ufs/ufs_lookup.c:214 VOP_LOOKUP(fffffd806c37fea0,ffff80002a578d08,ffff80002a578ca8) at VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 unveil_find_cover(fffffd806c37fea0,ffff80002a52ca38) at unveil_find_cover+0x16d sys/kern/kern_unveil.c:277 unveil_start_relative(ffff80002a52ca38,ffff80002a579048,fffffd806c37fea0) at unveil_start_relative+0x14b sys/kern/kern_unveil.c:606 namei(ffff80002a579048) at namei+0x62e sys/kern/vfs_lookup.c:237 vn_open(ffff80002a579048,201,0) at vn_open+0x1f4 sys/kern/vfs_vnops.c:107 doopenat(ffff80002a52ca38,4,20000240,200,0,ffff80002a5791f0) at doopenat+0x31d sys/kern/vfs_syscalls.c:1123 syscall(ffff80002a5792a0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x96c42175430, count: -12 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830611fe) at panic+0x1cf sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd8069560870,ffffffff82fa76fc,2,fffffd806956091c,ffff80002a578b60,0) at ufsdirhash_lookup+0xb9a sys/ufs/ufs/ufs_dirhash.c:342 ufs_lookup() at ufs_lookup+0xf58 sys/ufs/ufs/ufs_lookup.c:214 VOP_LOOKUP(fffffd806c37fea0,ffff80002a578d08,ffff80002a578ca8) at VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 unveil_find_cover(fffffd806c37fea0,ffff80002a52ca38) at unveil_find_cover+0x16d sys/kern/kern_unveil.c:277 unveil_start_relative(ffff80002a52ca38,ffff80002a579048,fffffd806c37fea0) at unveil_start_relative+0x14b sys/kern/kern_unveil.c:606 namei(ffff80002a579048) at namei+0x62e sys/kern/vfs_lookup.c:237 vn_open(ffff80002a579048,201,0) at vn_open+0x1f4 sys/kern/vfs_vnops.c:107 doopenat(ffff80002a52ca38,4,20000240,200,0,ffff80002a5791f0) at doopenat+0x31d sys/kern/vfs_syscalls.c:1123 syscall(ffff80002a5792a0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x96c42175430, count: -12