panic: ufsdirhash_lookup: bad offset in hash array Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *262977 95551 0 0 0x4000000 0 syz-executor.0 db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff8306956b) at panic+0x1cf sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd80693505a0,ffff80002a4ff000,1,fffffd806935064c,ffff80002a5876a0,ffff80002a5876b8) 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(fffffd806f70eea0,ffff80002a5879f8,ffff80002a587a28) at VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 vfs_lookup(ffff80002a5879c8) at vfs_lookup+0x8e1 sys/kern/vfs_lookup.c:566 namei(ffff80002a5879c8) at namei+0x7aa sys/kern/vfs_lookup.c:250 dorenameat(ffff80002a542a40,4,200000c0,3,0) at dorenameat+0x91 sys/kern/vfs_syscalls.c:2976 syscall(ffff80002a587bc0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x51fba3ffd80, 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:437 panic(ffffffff8306956b) at panic+0x1cf sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd80693505a0,ffff80002a4ff000,1,fffffd806935064c,ffff80002a5876a0,ffff80002a5876b8) 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(fffffd806f70eea0,ffff80002a5879f8,ffff80002a587a28) at VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 vfs_lookup(ffff80002a5879c8) at vfs_lookup+0x8e1 sys/kern/vfs_lookup.c:566 namei(ffff80002a5879c8) at namei+0x7aa sys/kern/vfs_lookup.c:250 dorenameat(ffff80002a542a40,4,200000c0,3,0) at dorenameat+0x91 sys/kern/vfs_syscalls.c:2976 syscall(ffff80002a587bc0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x51fba3ffd80, count: -10 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002a5874c0 rbx 0xffff800000a43bc0 rdx 0x3fd rcx 0 rax 0x33 r8 0x101010101010101 r9 0x8080808080808080 r10 0x18c39aee2a6bf8f4 r11 0xf328bbe9914769e0 r12 0 r13 0xffff800001155e00 r14 0 r15 0x1 rip 0xffffffff81a816b5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002a5874b0 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) tid=262977 pid=95551 tcnt=2 stat=onproc flags process=0 proc=4000000 runpri=32, usrpri=52, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a542f50,0xffffffff835df878 process=0xffff8000ffffb370 user=0xffff80002a582000, vmspace=0xfffffd807ec91560 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 95551 200027 98830 0 2 0 syz-executor.0 *95551 262977 98830 0 7 0x4000000 syz-executor.0 98830 337893 46910 0 3 0x82 nanoslp syz-executor.0 46910 431192 50630 0 3 0x82 thrsleep syz-execprog 46910 277059 50630 0 3 0x4000082 thrsleep syz-execprog 46910 418427 50630 0 3 0x4000082 thrsleep syz-execprog 46910 208852 50630 0 3 0x4000082 wait syz-execprog 46910 923 50630 0 3 0x4000082 thrsleep syz-execprog 46910 234555 50630 0 3 0x4000082 thrsleep syz-execprog 46910 30778 50630 0 3 0x4000082 kqread syz-execprog 46910 296196 50630 0 3 0x4000082 thrsleep syz-execprog 46910 413029 50630 0 3 0x4000082 thrsleep syz-execprog 46910 249300 50630 0 3 0x4000082 thrsleep syz-execprog 50630 421408 3117 0 3 0x10008a sigsusp ksh 3117 478265 73178 0 3 0x98 kqread sshd-session 73178 177281 44870 0 3 0x92 kqread sshd-session 7291 219536 1 0 3 0x100083 ttyin getty 44870 237103 1 0 3 0x88 kqread sshd 70800 145311 45820 73 3 0x1100090 kqread syslogd 45820 134304 1 0 3 0x100082 sbwait syslogd 28710 126495 1 0 3 0x100080 kqread resolvd 30821 313170 13147 77 3 0x100092 kqread dhcpleased 14854 355936 13147 77 3 0x100092 kqread dhcpleased 13147 36671 1 0 3 0x80 kqread dhcpleased 72588 406034 0 0 3 0x14200 bored smr 62080 90490 0 0 2 0x14200 zerothread 63399 447429 0 0 3 0x14200 aiodoned aiodoned 86759 72314 0 0 3 0x14200 syncer update 67020 67067 0 0 3 0x14200 cleaner cleaner 68589 3559 0 0 3 0x14200 reaper reaper 88718 237124 0 0 3 0x14200 pgdaemon pagedaemon 62198 204593 0 0 3 0x14200 bored viomb 72115 394870 0 0 3 0x40014200 acpi0 acpi0 65970 225482 0 0 3 0x14200 bored softnet3 20776 375401 0 0 3 0x14200 bored softnet2 2184 316023 0 0 3 0x14200 bored softnet1 98862 318394 0 0 3 0x14200 bored softnet0 59644 332581 0 0 3 0x14200 bored systqmp 47247 421120 0 0 3 0x14200 bored systq 91582 341184 0 0 3 0x40014200 tmoslp softclock 12882 25298 0 0 3 0x40014200 idle0 1 72542 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 10145 10001K 10029K 166960K 11226 0 pcb 17 12K 12K 166960K 17 0 rtable 80 2K 2K 166960K 166 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 21 3K 3K 166960K 21 0 ACPI 1697 195K 286K 166960K 12548 0 file desc 3 8K 12K 166960K 35 0 proc 55 58K 67K 166960K 302 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 309 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 160 15K 15K 166960K 3410 0 UVM aobj 3 2K 2K 166960K 3 0 pinsyscall 26 52K 104K 166960K 1152 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 6800K 6864K 166960K 3766 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 22 0 19 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 20 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 1823 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 6485 0 6484 3 0 3 3 0 8 2 kstatmem 264 10 0 2 1 0 1 1 0 8 0 scxspl 216 8218 0 8218 8 0 8 8 1 8 8 plimitpl 152 51 0 42 1 0 1 1 0 8 0 sigapl 424 389 0 357 5 0 5 5 0 8 1 futexpl 64 11 0 11 1 0 1 1 0 8 1 knotepl 120 6975 0 6938 2 0 2 2 0 8 0 kqueuepl 184 42 0 33 1 0 1 1 0 8 0 pipepl 288 153 0 146 1 0 1 1 0 8 0 fdescpl 432 373 0 357 4 0 4 4 0 8 2 filepl 120 1806 0 1736 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 357 0 357 1 0 1 1 0 8 1 processpl 1096 389 0 357 4 0 4 4 0 8 1 procpl 648 410 0 368 5 0 5 5 0 8 0 sockpl 504 127 0 103 4 0 4 4 0 8 1 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 19116 0 19009 41 18 23 34 0 8 8 mtagpl 96 3 0 3 1 0 1 1 0 8 1 mbufpl 256 22995 0 22874 18 2 16 18 0 8 7 bufpl 280 4304 0 155 297 0 297 297 0 8 0 anonpl 24 260178 0 256623 54 0 54 54 0 187 22 amapchunkpl 152 12635 0 12304 27 0 27 27 0 158 12 amappl16 200 6878 0 6812 5 0 5 5 0 8 1 amappl15 192 15 0 14 1 0 1 1 0 8 0 amappl14 184 235 0 223 2 0 2 2 0 8 1 amappl13 176 19 0 19 1 0 1 1 0 8 1 amappl12 168 974 0 957 2 0 2 2 0 8 1 amappl11 160 53 0 42 1 0 1 1 0 8 0 amappl10 152 60 0 57 1 0 1 1 0 8 0 amappl9 144 379 0 379 1 0 1 1 0 8 1 amappl8 136 114 0 96 1 0 1 1 0 8 0 amappl7 128 209 0 196 2 0 2 2 0 8 0 amappl6 120 201 0 199 1 0 1 1 0 8 0 amappl5 112 160 0 152 1 0 1 1 0 8 0 amappl4 104 483 0 465 2 0 2 2 0 8 1 amappl3 96 3865 0 3819 3 0 3 3 0 8 1 amappl2 88 1010 0 950 4 0 4 4 0 8 2 amappl1 80 14448 0 13941 29 7 22 23 0 8 11 amappl 88 2745 0 2655 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 373 0 357 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 373 0 357 1 0 1 1 0 8 0 vmmpekpl 168 12110 0 12082 2 0 2 2 0 8 0 vmmpepl 168 59236 0 57919 119 0 119 119 0 357 58 vmsppl 344 372 0 357 3 0 3 3 0 8 1 rwobjpl 24 27770 0 25423 20 0 20 20 0 8 0 pdppl 4096 753 0 714 105 42 63 63 0 8 24 pvpl 32 582391 0 573940 388 76 312 381 0 265 232 pmappl 216 372 0 357 2 0 2 2 0 8 1 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 375 0 62 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(ffffffff8306956b) at panic+0x1cf sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd80693505a0,ffff80002a4ff000,1,fffffd806935064c,ffff80002a5876a0,ffff80002a5876b8) 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(fffffd806f70eea0,ffff80002a5879f8,ffff80002a587a28) at VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 vfs_lookup(ffff80002a5879c8) at vfs_lookup+0x8e1 sys/kern/vfs_lookup.c:566 namei(ffff80002a5879c8) at namei+0x7aa sys/kern/vfs_lookup.c:250 dorenameat(ffff80002a542a40,4,200000c0,3,0) at dorenameat+0x91 sys/kern/vfs_syscalls.c:2976 syscall(ffff80002a587bc0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x51fba3ffd80, count: -10 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff8306956b) at panic+0x1cf sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd80693505a0,ffff80002a4ff000,1,fffffd806935064c,ffff80002a5876a0,ffff80002a5876b8) 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(fffffd806f70eea0,ffff80002a5879f8,ffff80002a587a28) at VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 vfs_lookup(ffff80002a5879c8) at vfs_lookup+0x8e1 sys/kern/vfs_lookup.c:566 namei(ffff80002a5879c8) at namei+0x7aa sys/kern/vfs_lookup.c:250 dorenameat(ffff80002a542a40,4,200000c0,3,0) at dorenameat+0x91 sys/kern/vfs_syscalls.c:2976 syscall(ffff80002a587bc0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x51fba3ffd80, count: -10