panic: ufsdirhash_lookup: bad offset in hash array Stopped at db_enter+0x1c: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *190069 41595 0 0 0x4000000 0 syz-executor.2 db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff8295b480) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd80661dce18,ffff80002a666000,1,fffffd80661dcec4,ffff80002f53b6b8,0) at ufsdirhash_lookup+0x8b8 sys/ufs/ufs/ufs_dirhash.c:342 ufs_lookup() at ufs_lookup+0xbb6 sys/ufs/ufs/ufs_lookup.c:214 VOP_LOOKUP(fffffd806852ad88,ffff80002f53bb38,ffff80002f53bb68) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 vfs_lookup(ffff80002f53bb08) at vfs_lookup+0x6dc sys/kern/vfs_lookup.c:566 namei(ffff80002f53bb08) at namei+0x55a sys/kern/vfs_lookup.c:250 vn_open(ffff80002f53bb08,1,0) at vn_open+0xf8 sys/kern/vfs_vnops.c:140 doopenat(ffff80002a63daa8,ffffff9c,20000300,0,0,ffff80002f53bcb0) at doopenat+0x26e sys/kern/vfs_syscalls.c:1126 syscall(ffff80002f53bd60) at syscall+0x751 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7afde126800, count: 4 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+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff8295b480) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd80661dce18,ffff80002a666000,1,fffffd80661dcec4,ffff80002f53b6b8,0) at ufsdirhash_lookup+0x8b8 sys/ufs/ufs/ufs_dirhash.c:342 ufs_lookup() at ufs_lookup+0xbb6 sys/ufs/ufs/ufs_lookup.c:214 VOP_LOOKUP(fffffd806852ad88,ffff80002f53bb38,ffff80002f53bb68) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 vfs_lookup(ffff80002f53bb08) at vfs_lookup+0x6dc sys/kern/vfs_lookup.c:566 namei(ffff80002f53bb08) at namei+0x55a sys/kern/vfs_lookup.c:250 vn_open(ffff80002f53bb08,1,0) at vn_open+0xf8 sys/kern/vfs_vnops.c:140 doopenat(ffff80002a63daa8,ffffff9c,20000300,0,0,ffff80002f53bcb0) at doopenat+0x26e sys/kern/vfs_syscalls.c:1126 syscall(ffff80002f53bd60) at syscall+0x751 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7afde126800, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002f53b4e0 rbx 0 rdx 0 rcx 0 rax 0xffff80002a63daa8 r8 0 r9 0x8080808080808080 r10 0xbe5b771a0c64c3b5 r11 0x9318fef56a6aa6be r12 0 r13 0xffff800000e2ca70 r14 0 r15 0x1 rip 0xffffffff8161ea8c db_enter+0x1c cs 0x8 rflags 0x246 rsp 0xffff80002f53b4d0 ss 0x10 db_enter+0x1c: addq $0x8,%rsp ddb> show proc PROC (syz-executor.2) tid=190069 pid=41595 tcnt=2 stat=onproc flags process=0 proc=4000000 runpri=32, usrpri=80, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 forw=0xffffffffffffffff, list=0xffff80002a63c810,0xffffffff82d96a40 process=0xffff8000ffff0020 user=0xffff80002f536000, vmspace=0xfffffd806990d170 estcpu=36, cpticks=0, pctcpu=0.0, user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 41595 194728 62478 0 2 0 syz-executor.2 *41595 190069 62478 0 7 0x4000000 syz-executor.2 91499 213208 34897 0 2 0 syz-executor.3 91499 440026 34897 0 3 0x4000080 bpf syz-executor.3 32369 297661 11081 0 2 0 syz-executor.1 76292 247282 68332 0 2 0 syz-executor.4 76292 52576 68332 0 3 0x4000080 fsleep syz-executor.4 76292 403688 68332 0 3 0x4000080 fsleep syz-executor.4 76292 236752 68332 0 3 0x4000080 fsleep syz-executor.4 41141 120739 82828 0 3 0x80 nanoslp syz-executor.7 41141 434484 82828 0 3 0x4000080 fifor syz-executor.7 41141 508789 82828 0 3 0x4000080 fsleep syz-executor.7 48877 380520 0 0 3 0x14280 nfsidl nfsio 21373 145364 0 0 3 0x14280 nfsidl nfsio 72003 271821 0 0 3 0x14280 nfsidl nfsio 31751 511527 0 0 3 0x14280 nfsidl nfsio 22638 480366 0 0 3 0x14280 nfsidl nfsio 20750 453421 0 0 3 0x14280 nfsidl nfsio 16825 493115 0 0 3 0x14280 nfsidl nfsio 18730 122896 0 0 3 0x14280 nfsidl nfsio 21212 466968 0 0 3 0x14280 nfsidl nfsio 52730 371820 0 0 3 0x14280 nfsidl nfsio 24417 231626 0 0 3 0x14280 nfsidl nfsio 46023 418196 0 0 3 0x14280 nfsidl nfsio 91866 230210 0 0 3 0x14280 nfsidl nfsio 11170 250714 0 0 3 0x14280 nfsidl nfsio 78398 435385 0 0 3 0x14280 nfsidl nfsio 21988 289237 0 0 3 0x14280 nfsidl nfsio 51058 4872 0 0 3 0x14280 nfsidl nfsio 1689 271362 0 0 3 0x14280 nfsidl nfsio 29659 124758 0 0 3 0x14280 nfsidl nfsio 30821 135469 0 0 3 0x14280 nfsidl nfsio 34897 264620 57087 0 3 0x82 nanoslp syz-executor.3 98186 311881 0 0 3 0x14200 bored sosplice 82828 160366 57087 0 2 0x482 syz-executor.7 14708 249656 57087 0 2 0x482 syz-executor.5 68332 447331 57087 0 2 0x482 syz-executor.4 62478 90278 57087 0 2 0x482 syz-executor.2 80128 411393 57087 0 3 0x82 piperd syz-executor.6 92415 522495 57087 0 3 0x82 piperd syz-executor.0 11081 373190 57087 0 3 0x82 nanoslp syz-executor.1 57087 163656 38528 0 3 0x2000082 thrsleep syz-fuzzer 57087 418631 38528 0 3 0x6000082 nanoslp syz-fuzzer 57087 393064 38528 0 3 0x6000082 wait syz-fuzzer 57087 90250 38528 0 3 0x6000082 wait syz-fuzzer 57087 474698 38528 0 3 0x6000082 thrsleep syz-fuzzer 57087 164668 38528 0 3 0x6000082 wait syz-fuzzer 57087 518602 38528 0 3 0x6000082 wait syz-fuzzer 57087 166179 38528 0 3 0x6000082 wait syz-fuzzer 57087 45166 38528 0 3 0x6000082 wait syz-fuzzer 57087 187756 38528 0 3 0x6000082 thrsleep syz-fuzzer 57087 249394 38528 0 3 0x6000082 wait syz-fuzzer 57087 224510 38528 0 3 0x6000082 wait syz-fuzzer 57087 510166 38528 0 3 0x6000082 thrsleep syz-fuzzer 57087 210945 38528 0 3 0x6000082 kqread syz-fuzzer 38528 518884 1238 0 3 0x10008a sigsusp ksh 1238 458178 3058 0 3 0x9a kqread sshd 11573 484730 1 0 3 0x100083 ttyin getty 3058 65051 1 0 3 0x88 kqread sshd 26814 439328 67024 73 3 0x1100090 kqread syslogd 67024 173885 1 0 3 0x100082 netio syslogd 95421 124055 1 0 3 0x100080 kqread resolvd 2730 414273 98194 77 3 0x100092 kqread dhcpleased 69909 179288 98194 77 3 0x100092 kqread dhcpleased 98194 293837 1 0 3 0x80 kqread dhcpleased 8654 292062 0 0 3 0x14200 bored smr 91187 17587 0 0 2 0x14200 zerothread 76094 495574 0 0 3 0x14200 aiodoned aiodoned 81128 3962 0 0 3 0x14200 syncer update 26047 196648 0 0 3 0x14200 cleaner cleaner 54608 386047 0 0 3 0x14200 reaper reaper 78681 295901 0 0 3 0x14200 pgdaemon pagedaemon 30510 449436 0 0 3 0x14200 bored viomb 90945 32364 0 0 3 0x40014200 acpi0 acpi0 28678 285363 0 0 3 0x14200 bored softnet3 85757 439787 0 0 3 0x14200 bored softnet2 21932 305513 0 0 3 0x14200 bored softnet1 88247 328861 0 0 3 0x14200 bored softnet0 41109 135862 0 0 3 0x14200 bored systqmp 60474 268934 0 0 3 0x14200 bored systq 84200 148625 0 0 3 0x40014200 tmoslp softclock 75949 279873 0 0 3 0x40014200 idle0 1 141120 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 10170 6402K 6851K 166960K 14111 0 pcb 15 16K 18K 166960K 218 0 rtable 196 14K 14K 166960K 430 0 pf 27 8K 9K 166960K 54 0 ifaddr 36 10K 11K 166960K 61 0 ifgroup 46 2K 2K 166960K 85 0 sysctl 2 0K 0K 166960K 2 0 counters 29 17K 17K 166960K 41 0 ioctlops 0 0K 2K 166960K 68 0 iov 0 0K 32K 166960K 223 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1406 88K 88K 166960K 2359 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 9K 166960K 30 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 292 0 dirhash 78 14K 15K 166960K 1746 0 ACPI 1697 195K 286K 166960K 12548 0 file desc 15 53K 73K 166960K 1763 0 sigio 0 0K 0K 166960K 195 0 proc 58 59K 75K 166960K 552 0 subproc 104 6K 6K 166960K 117 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 137 0 in_multi 77 5K 7K 166960K 119 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 67 307K 307K 166960K 67 0 exec 0 0K 1K 166960K 505 0 pfkey data 0 0K 0K 166960K 6 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 318 84K 88K 166960K 18392 0 UVM aobj 131 6K 6K 166960K 136 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 77 0 NDP 10 0K 2K 166960K 40 0 temp 74 6764K 6828K 166960K 25450 0 kqueue 12 18K 26K 166960K 155 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 224 0 221 5 2 3 3 0 8 2 rtentry 112 122 0 34 4 0 4 4 0 8 0 unpcb 144 1823 0 1808 12 5 7 7 0 8 6 syncache 320 22 0 22 2 1 1 1 0 8 1 tcpqe 32 70 0 70 1 1 0 1 0 8 0 tcpcb 808 1018 0 1013 27 18 9 17 0 8 8 arp 88 20 0 6 1 0 1 1 0 8 0 inpcb 344 1920 0 1912 39 30 9 17 0 8 8 nd6 104 27 0 9 1 0 1 1 0 8 0 pkpcb 40 16 0 16 2 1 1 1 0 8 1 kcovpl 48 9 0 1 1 0 1 1 0 8 0 ppxss 1072 6 0 6 2 1 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 500 0 132 29 1 28 29 0 8 3 art_table 32 501 0 132 4 0 4 4 0 8 0 art_node 16 121 0 41 1 0 1 1 0 8 0 sysvmsgpl 40 2 0 2 1 1 0 1 0 8 0 semapl 112 290 0 280 1 0 1 1 0 8 0 shmpl 112 133 0 5 4 0 4 4 0 8 0 dirhash 1024 595 0 556 6 0 6 6 0 8 0 dino2pl 256 3932 0 2491 91 0 91 91 0 8 0 ffsino 240 3932 0 2491 86 0 86 86 0 8 0 nchpl 144 6466 0 4820 63 0 63 63 0 8 0 uvmvnodes 80 4702 0 0 96 0 96 96 0 8 0 vnodes 216 4702 0 0 262 0 262 262 0 8 0 namei 1024 22196 0 22195 3 2 1 3 0 8 0 vcpupl 2048 3 0 0 1 0 1 1 0 8 0 vmpool 664 11 0 8 1 0 1 1 0 8 0 kstatmem 264 44 0 24 2 0 2 2 0 8 0 scxspl 216 19748 0 19748 9 7 2 8 1 8 2 plimitpl 152 151 0 136 1 0 1 1 0 8 0 sigapl 424 2078 0 2014 8 0 8 8 0 8 0 futexpl 64 16213 0 16209 1 0 1 1 0 8 0 knotepl 120 18690 0 18608 5 0 5 5 0 8 0 kqueuepl 184 274 0 266 3 0 3 3 0 8 2 pipepl 288 352 0 324 7 0 7 7 0 8 4 fdescpl 432 2041 0 2015 4 0 4 4 0 8 0 filepl 120 13521 0 13280 29 13 16 24 0 8 8 lockfpl 104 663 0 660 2 0 2 2 0 8 1 lockfspl 48 240 0 237 1 0 1 1 0 8 0 sessionpl 144 24 0 8 1 0 1 1 0 8 0 pgrppl 48 101 0 85 1 0 1 1 0 8 0 ucredpl 104 1933 0 1923 1 0 1 1 0 8 0 zombiepl 144 2015 0 2014 1 0 1 1 0 8 0 processpl 1072 2078 0 2014 5 0 5 5 0 8 0 procpl 680 4596 0 4512 9 1 8 8 0 8 0 sosppl 168 22 0 22 2 1 1 1 0 8 1 sockpl 488 3983 0 3957 144 127 17 42 0 8 13 mcl64k 65536 74 0 74 2 1 1 1 0 8 1 mcl16k 16384 31 0 31 2 1 1 1 0 8 1 mcl12k 12288 64 0 64 2 1 1 1 0 8 1 mcl9k 9216 22 0 22 2 1 1 1 0 8 1 mcl8k 8192 100 0 100 2 1 1 1 0 8 1 mcl4k 4096 218 0 217 4 1 3 3 0 8 2 mcl2k2 2112 9 0 9 2 1 1 1 0 8 1 mcl2k 2048 72634 0 72593 30 23 7 30 0 8 1 mtagpl 96 224 0 87 4 0 4 4 0 8 0 mbufpl 256 127056 0 126820 30 9 21 24 0 8 3 bufpl 280 6560 0 170 457 0 457 457 0 8 0 anonpl 24 316229 0 302773 84 0 84 84 0 188 0 amapchunkpl 152 58557 0 57753 42 4 38 38 0 158 3 amappl16 200 7390 0 6977 22 0 22 22 0 8 0 amappl15 192 48 0 48 1 1 0 1 0 8 0 amappl14 184 152 0 140 2 1 1 2 0 8 0 amappl13 176 15 0 15 2 1 1 1 0 8 1 amappl12 168 2697 0 2669 2 0 2 2 0 8 0 amappl11 160 50 0 40 1 0 1 1 0 8 0 amappl10 152 22 0 13 1 0 1 1 0 8 0 amappl9 144 148 0 146 1 0 1 1 0 8 0 amappl8 136 234 0 174 3 0 3 3 0 8 0 amappl7 128 170 0 152 2 0 2 2 0 8 0 amappl6 120 265 0 255 1 0 1 1 0 8 0 amappl5 112 157 0 147 1 0 1 1 0 8 0 amappl4 104 419 0 399 2 1 1 2 0 8 0 amappl3 96 12312 0 12237 3 0 3 3 0 8 0 amappl2 88 2546 0 2474 3 1 2 3 0 8 0 amappl1 80 15371 0 14862 22 11 11 22 0 8 0 amappl 88 17833 0 17625 6 0 6 6 0 92 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma1024 1024 1 0 0 1 0 1 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 18 0 17 1 0 1 1 0 8 0 aobjpl 72 135 0 5 3 0 3 3 0 8 0 uaddrrnd 24 2052 0 2023 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2052 0 2023 1 0 1 1 0 8 0 vmmpekpl 168 20255 0 20197 3 0 3 3 0 8 0 vmmpepl 168 138608 0 136468 149 35 114 132 0 357 15 vmsppl 352 2051 0 2023 3 0 3 3 0 8 0 rwobjpl 24 43942 0 37710 38 0 38 38 0 8 0 pdppl 4096 4110 0 4049 185 116 69 69 0 8 8 pvpl 32 760477 0 741787 307 147 160 302 0 265 1 pmappl 216 2051 0 2023 2 0 2 2 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 518 0 176 10 0 10 10 0 8 0 ddb> machine ddbcpu 0 No such command ddb> trace db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff8295b480) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd80661dce18,ffff80002a666000,1,fffffd80661dcec4,ffff80002f53b6b8,0) at ufsdirhash_lookup+0x8b8 sys/ufs/ufs/ufs_dirhash.c:342 ufs_lookup() at ufs_lookup+0xbb6 sys/ufs/ufs/ufs_lookup.c:214 VOP_LOOKUP(fffffd806852ad88,ffff80002f53bb38,ffff80002f53bb68) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 vfs_lookup(ffff80002f53bb08) at vfs_lookup+0x6dc sys/kern/vfs_lookup.c:566 namei(ffff80002f53bb08) at namei+0x55a sys/kern/vfs_lookup.c:250 vn_open(ffff80002f53bb08,1,0) at vn_open+0xf8 sys/kern/vfs_vnops.c:140 doopenat(ffff80002a63daa8,ffffff9c,20000300,0,0,ffff80002f53bcb0) at doopenat+0x26e sys/kern/vfs_syscalls.c:1126 syscall(ffff80002f53bd60) at syscall+0x751 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7afde126800, count: -11 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff8295b480) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd80661dce18,ffff80002a666000,1,fffffd80661dcec4,ffff80002f53b6b8,0) at ufsdirhash_lookup+0x8b8 sys/ufs/ufs/ufs_dirhash.c:342 ufs_lookup() at ufs_lookup+0xbb6 sys/ufs/ufs/ufs_lookup.c:214 VOP_LOOKUP(fffffd806852ad88,ffff80002f53bb38,ffff80002f53bb68) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 vfs_lookup(ffff80002f53bb08) at vfs_lookup+0x6dc sys/kern/vfs_lookup.c:566 namei(ffff80002f53bb08) at namei+0x55a sys/kern/vfs_lookup.c:250 vn_open(ffff80002f53bb08,1,0) at vn_open+0xf8 sys/kern/vfs_vnops.c:140 doopenat(ffff80002a63daa8,ffffff9c,20000300,0,0,ffff80002f53bcb0) at doopenat+0x26e sys/kern/vfs_syscalls.c:1126 syscall(ffff80002f53bd60) at syscall+0x751 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7afde126800, count: -11