panic: ufsdirhash_lookup: bad offset in hash array Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *140865 74818 0 0 0x4000000 0 syz-executor.0 db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff833e3c32) at panic+0x1cf sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd806ca08e88,ffff80002a7f1400,1,fffffd806ca08f3c,ffff80002a89f9d0,ffff80002a89f9e8) 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(fffffd806a805708,ffff80002a89fd28,ffff80002a89fd58) at VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 vfs_lookup(ffff80002a89fcf8) at vfs_lookup+0x8e1 sys/kern/vfs_lookup.c:566 namei(ffff80002a89fcf8) at namei+0x7aa sys/kern/vfs_lookup.c:250 dorenameat(ffff80002a8202b0,4,200000c0,3,0) at dorenameat+0x91 sys/kern/vfs_syscalls.c:2986 syscall(ffff80002a89fef0) at syscall+0x97e mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a89fef0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:579 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xb642cc98d50, count: 5 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:438 panic(ffffffff833e3c32) at panic+0x1cf sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd806ca08e88,ffff80002a7f1400,1,fffffd806ca08f3c,ffff80002a89f9d0,ffff80002a89f9e8) 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(fffffd806a805708,ffff80002a89fd28,ffff80002a89fd58) at VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 vfs_lookup(ffff80002a89fcf8) at vfs_lookup+0x8e1 sys/kern/vfs_lookup.c:566 namei(ffff80002a89fcf8) at namei+0x7aa sys/kern/vfs_lookup.c:250 dorenameat(ffff80002a8202b0,4,200000c0,3,0) at dorenameat+0x91 sys/kern/vfs_syscalls.c:2986 syscall(ffff80002a89fef0) at syscall+0x97e mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a89fef0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:579 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xb642cc98d50, count: -10 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002a89f7f0 rbx 0xffff800000b49bf0 rdx 0x3fd rcx 0 rax 0x33 r8 0x101010101010101 r9 0x8080808080808080 r10 0xaf5fb895a6e59ca6 r11 0xa80849867243224b r12 0 r13 0xffff800001441e00 r14 0 r15 0x1 rip 0xffffffff81602ea5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002a89f7e0 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) tid=140865 pid=74818 tcnt=2 stat=onproc flags process=0 proc=4000000 runpri=32, usrpri=86, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a820cf0,0xffffffff839cff30 process=0xffff80002a787af0 user=0xffff80002a89a000, vmspace=0xfffffd807ebbaca8 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 74818 8316 18889 0 2 0 syz-executor.0 *74818 140865 18889 0 7 0x4000000 syz-executor.0 18889 430068 19163 0 3 0x82 nanoslp syz-executor.0 19163 312964 84320 0 3 0x82 wait syz-execprog 19163 427863 84320 0 3 0x4000082 thrsleep syz-execprog 19163 150301 84320 0 3 0x4000082 thrsleep syz-execprog 19163 429858 84320 0 3 0x4000082 thrsleep syz-execprog 19163 218596 84320 0 3 0x4000082 thrsleep syz-execprog 19163 71590 84320 0 3 0x4000082 kqread syz-execprog 19163 213130 84320 0 3 0x4000082 thrsleep syz-execprog 19163 218497 84320 0 3 0x4000082 thrsleep syz-execprog 19163 27719 84320 0 3 0x4000082 thrsleep syz-execprog 19163 359996 84320 0 3 0x4000082 thrsleep syz-execprog 84320 230641 11408 0 3 0x10008a sigsusp ksh 11408 402018 92218 0 3 0x98 kqread sshd-session 92218 241927 92368 0 3 0x92 kqread sshd-session 31114 149878 1 0 3 0x100083 ttyin getty 92368 5136 1 0 3 0x88 kqread sshd 86887 473716 21548 73 3 0x1100090 kqread syslogd 21548 250435 1 0 3 0x100082 sbwait syslogd 16891 271732 1 0 3 0x100080 kqread resolvd 92634 294858 62678 77 3 0x100092 kqread dhcpleased 87656 21290 62678 77 3 0x100092 kqread dhcpleased 62678 291047 1 0 3 0x80 kqread dhcpleased 33696 310129 0 0 3 0x14200 bored smr 50464 353866 0 0 2 0x14200 zerothread 35095 386223 0 0 3 0x14200 aiodoned aiodoned 73662 97705 0 0 3 0x14200 syncer update 55663 451485 0 0 3 0x14200 cleaner cleaner 5448 343261 0 0 3 0x14200 reaper reaper 29172 508960 0 0 3 0x14200 pgdaemon pagedaemon 3843 16997 0 0 3 0x14200 bored viomb 46386 389692 0 0 3 0x40014200 acpi0 acpi0 61271 435973 0 0 3 0x14200 bored softnet3 99980 345960 0 0 3 0x14200 bored softnet2 78311 275661 0 0 3 0x14200 bored softnet1 77810 443468 0 0 3 0x14200 bored softnet0 45188 493464 0 0 3 0x14200 bored systqmp 59788 385682 0 0 3 0x14200 bored systq 3643 6165 0 0 3 0x40014200 tmoslp softclock 1038 306058 0 0 3 0x40014200 idle0 1 245473 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 10144 11023K 11052K 166960K 11223 0 pcb 17 12K 12K 166960K 17 0 rtable 80 2K 2K 166960K 170 0 pf 16 10K 10K 166960K 19 0 ifaddr 14 2K 2K 166960K 18 0 ifgroup 22 1K 1K 166960K 27 0 sysctl 1 1K 9K 166960K 5 0 counters 25 16K 16K 166960K 26 0 ioctlops 0 0K 2K 166960K 23 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1262 79K 80K 166960K 1278 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 21 3K 3K 166960K 21 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 3 8K 12K 166960K 35 0 proc 57 58K 67K 166960K 304 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 324 0 fusefs mount 1 32K 32K 166960K 1 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 161 101K 214K 166960K 3626 0 UVM aobj 3 2K 2K 166960K 3 0 pinsyscall 26 52K 104K 166960K 1199 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 8672K 8736K 166960K 3948 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 24 0 21 1 0 1 1 0 8 0 rtentry 136 45 0 12 2 0 2 2 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 736 12 0 9 1 0 1 1 0 8 0 arp 88 6 0 2 1 0 1 1 0 8 0 inpcb 328 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 20 0 0 3 0 3 3 0 8 0 dino2pl 256 1563 0 73 94 0 94 94 0 8 0 ffsino 248 1563 0 73 94 0 94 94 0 8 0 nchpl 144 1828 0 100 65 0 65 65 0 8 0 uvmvnodes 80 1572 0 0 33 0 33 33 0 8 0 vnodes 216 1572 0 0 88 0 88 88 0 8 0 namei 1024 6694 0 6693 2 0 2 2 0 8 1 kstatmem 264 10 0 2 1 0 1 1 0 8 0 scxspl 216 8911 0 8911 8 0 8 8 1 8 8 plimitpl 152 51 0 42 1 0 1 1 0 8 0 sigapl 424 395 0 363 5 0 5 5 0 8 1 knotepl 120 7700 0 7663 2 0 2 2 0 8 0 kqueuepl 184 42 0 33 1 0 1 1 0 8 0 pipepl 296 146 0 139 2 0 2 2 0 8 1 fdescpl 440 379 0 363 4 0 4 4 0 8 2 filepl 120 1891 0 1820 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 147 0 136 1 0 1 1 0 8 0 zombiepl 144 363 0 363 1 0 1 1 0 8 1 processpl 1160 395 0 363 4 0 4 4 0 8 1 procpl 656 415 0 373 5 0 5 5 0 8 0 sockpl 528 129 0 105 2 0 2 2 0 8 0 mcl8k 8192 4 0 4 1 0 1 1 0 8 1 mcl4k 4096 9893 0 9837 17 1 16 17 0 8 8 mcl2k 2048 90 0 90 1 0 1 1 0 8 1 mtagpl 96 4 0 4 1 0 1 1 0 8 1 mbufpl 256 13136 0 13066 9 0 9 9 0 8 4 bufpl 280 4431 0 181 304 0 304 304 0 8 0 anonpl 24 192086 0 188646 51 0 51 51 0 187 21 amapchunkpl 152 11488 0 11153 26 0 26 26 0 158 9 amappl16 200 4057 0 3984 5 0 5 5 0 8 0 amappl15 192 14 0 14 1 0 1 1 0 8 1 amappl14 184 187 0 175 2 0 2 2 0 8 1 amappl13 176 39 0 39 1 0 1 1 0 8 1 amappl12 168 955 0 938 2 0 2 2 0 8 1 amappl11 160 49 0 39 1 0 1 1 0 8 0 amappl10 152 46 0 43 1 0 1 1 0 8 0 amappl9 144 1058 0 1057 1 0 1 1 0 8 0 amappl8 136 162 0 143 1 0 1 1 0 8 0 amappl7 128 256 0 242 2 0 2 2 0 8 0 amappl6 120 231 0 226 1 0 1 1 0 8 0 amappl5 112 138 0 132 1 0 1 1 0 8 0 amappl4 104 463 0 446 2 0 2 2 0 8 1 amappl3 96 1181 0 1136 2 0 2 2 0 8 0 amappl2 88 999 0 939 4 0 4 4 0 8 1 amappl1 80 14501 0 13992 28 7 21 23 0 8 10 amappl 88 2650 0 2565 4 0 4 4 0 92 0 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 379 0 363 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 379 0 363 1 0 1 1 0 8 0 vmmpekpl 168 11149 0 11128 2 0 2 2 0 8 0 vmmpepl 168 54170 0 52790 120 0 120 120 0 357 56 vmsppl 360 378 0 363 3 0 3 3 0 8 1 rwobjpl 32 23125 0 20780 26 0 26 26 0 8 1 pdppl 4096 764 0 726 104 42 62 62 0 8 24 pvpl 32 513607 0 505313 384 76 308 371 0 265 232 pmappl 216 378 0 363 2 0 2 2 0 8 1 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 247 0 43 6 0 6 6 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:438 panic(ffffffff833e3c32) at panic+0x1cf sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd806ca08e88,ffff80002a7f1400,1,fffffd806ca08f3c,ffff80002a89f9d0,ffff80002a89f9e8) 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(fffffd806a805708,ffff80002a89fd28,ffff80002a89fd58) at VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 vfs_lookup(ffff80002a89fcf8) at vfs_lookup+0x8e1 sys/kern/vfs_lookup.c:566 namei(ffff80002a89fcf8) at namei+0x7aa sys/kern/vfs_lookup.c:250 dorenameat(ffff80002a8202b0,4,200000c0,3,0) at dorenameat+0x91 sys/kern/vfs_syscalls.c:2986 syscall(ffff80002a89fef0) at syscall+0x97e mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a89fef0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:579 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xb642cc98d50, count: -10 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff833e3c32) at panic+0x1cf sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd806ca08e88,ffff80002a7f1400,1,fffffd806ca08f3c,ffff80002a89f9d0,ffff80002a89f9e8) 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(fffffd806a805708,ffff80002a89fd28,ffff80002a89fd58) at VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 vfs_lookup(ffff80002a89fcf8) at vfs_lookup+0x8e1 sys/kern/vfs_lookup.c:566 namei(ffff80002a89fcf8) at namei+0x7aa sys/kern/vfs_lookup.c:250 dorenameat(ffff80002a8202b0,4,200000c0,3,0) at dorenameat+0x91 sys/kern/vfs_syscalls.c:2986 syscall(ffff80002a89fef0) at syscall+0x97e mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a89fef0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:579 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xb642cc98d50, count: -10