panic: ufsdirhash_lookup: bad offset in hash array Stopped at db_enter+0x1c: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 78393 54115 0 0 0x4000000 0 syz-executor.6 db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff8282eb42) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd806b3b0970,ffffffff8280bf16,2,fffffd806b3b0a1c,ffff800027fb73e8,0) at ufsdirhash_lookup+0x8b8 sys/ufs/ufs/ufs_dirhash.c:343 ufs_lookup() at ufs_lookup+0xc15 sys/ufs/ufs/ufs_lookup.c:216 VOP_LOOKUP(fffffd80686d6298,ffff800027fb7588,ffff800027fb7528) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 unveil_find_cover(fffffd80686d6298,ffff8000216f8e08) at unveil_find_cover+0x130 sys/kern/kern_unveil.c:277 unveil_start_relative(ffff8000216f8e08,ffff800027fb77a0,fffffd80686d6298) at unveil_start_relative+0xf6 sys/kern/kern_unveil.c:606 namei(ffff800027fb77a0) at namei+0x453 sys/kern/vfs_lookup.c:237 dosymlinkat(ffff8000216f8e08,20000040,3,20000100) at dosymlinkat+0xb8 sys/kern/vfs_syscalls.c:1788 syscall(ffff800027fb7980) at syscall+0x4a8 sys/arch/amd64/amd64/trap.c:632 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x6d9f67ecc00, 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(ffffffff8282eb42) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd806b3b0970,ffffffff8280bf16,2,fffffd806b3b0a1c,ffff800027fb73e8,0) at ufsdirhash_lookup+0x8b8 sys/ufs/ufs/ufs_dirhash.c:343 ufs_lookup() at ufs_lookup+0xc15 sys/ufs/ufs/ufs_lookup.c:216 VOP_LOOKUP(fffffd80686d6298,ffff800027fb7588,ffff800027fb7528) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 unveil_find_cover(fffffd80686d6298,ffff8000216f8e08) at unveil_find_cover+0x130 sys/kern/kern_unveil.c:277 unveil_start_relative(ffff8000216f8e08,ffff800027fb77a0,fffffd80686d6298) at unveil_start_relative+0xf6 sys/kern/kern_unveil.c:606 namei(ffff800027fb77a0) at namei+0x453 sys/kern/vfs_lookup.c:237 dosymlinkat(ffff8000216f8e08,20000040,3,20000100) at dosymlinkat+0xb8 sys/kern/vfs_syscalls.c:1788 syscall(ffff800027fb7980) at syscall+0x4a8 sys/arch/amd64/amd64/trap.c:632 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x6d9f67ecc00, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800027fb7210 rbx 0 rdx 0xffff800000ce9d40 rcx 0 rax 0xffff8000216f8e08 r8 0x101010101010101 r9 0x8080808080808080 r10 0x8c0f84ac075b6cf3 r11 0xe7d860b3e5ff91e5 r12 0 r13 0xffff800000d7a980 r14 0 r15 0x1 rip 0xffffffff82235dcc db_enter+0x1c cs 0x8 rflags 0x246 rsp 0xffff800027fb7200 ss 0x10 db_enter+0x1c: addq $0x8,%rsp ddb> show proc PROC (syz-executor.6) pid=78393 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=84, nice=20 forw=0xffffffffffffffff, list=0xffff8000216f9ba0,0xffff8000216f98f8 process=0xffff8000216fb7b0 user=0xffff800027fb2000, vmspace=0xfffffd8069d83718 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 54115 172479 28622 0 2 0 syz-executor.6 *54115 78393 28622 0 7 0x4000000 syz-executor.6 56399 259467 62019 0 3 0x80 nanoslp syz-executor.4 56399 520269 62019 0 3 0x4000080 fsleep syz-executor.4 47365 205043 36612 0 3 0x80 nanoslp syz-executor.7 47365 95486 36612 0 3 0x4000080 netio syz-executor.7 77988 176330 56205 0 2 0x2 syz-executor.5 54296 377395 1 0 3 0x100083 ttyin getty 17671 292650 56205 0 2 0x2 syz-executor.1 62019 412416 56205 0 3 0x82 nanoslp syz-executor.4 57896 317989 56205 0 3 0x82 nanoslp syz-executor.2 88071 230002 0 0 3 0x14200 acct acct 21862 174755 56205 0 3 0x82 nanoslp syz-executor.0 36612 438680 56205 0 3 0x82 nanoslp syz-executor.7 36726 298508 0 0 3 0x14200 bored sosplice 85738 196651 56205 0 3 0x82 nanoslp syz-executor.3 28622 426608 56205 0 3 0x82 nanoslp syz-executor.6 56205 177683 66952 0 3 0x82 wait syz-fuzzer 56205 280565 66952 0 3 0x4000082 nanoslp syz-fuzzer 56205 298095 66952 0 3 0x4000082 wait syz-fuzzer 56205 396442 66952 0 3 0x4000082 thrsleep syz-fuzzer 56205 245429 66952 0 3 0x4000082 wait syz-fuzzer 56205 150265 66952 0 3 0x4000082 wait syz-fuzzer 56205 143516 66952 0 3 0x4000082 thrsleep syz-fuzzer 56205 432670 66952 0 3 0x4000082 wait syz-fuzzer 56205 243655 66952 0 3 0x4000082 kqread syz-fuzzer 56205 18335 66952 0 3 0x4000082 thrsleep syz-fuzzer 56205 150322 66952 0 3 0x4000082 thrsleep syz-fuzzer 56205 465989 66952 0 3 0x4000082 wait syz-fuzzer 56205 156785 66952 0 3 0x4000082 wait syz-fuzzer 56205 148889 66952 0 3 0x4000082 wait syz-fuzzer 66952 34718 43459 0 3 0x10008a sigsusp ksh 43459 69581 86065 0 3 0x9a kqread sshd 86065 312425 1 0 3 0x88 kqread sshd 20170 163269 91888 73 3 0x1100090 kqread syslogd 91888 68981 1 0 3 0x100082 netio syslogd 85592 318199 1 0 3 0x100080 kqread resolvd 94523 198120 0 0 3 0x14200 bored smr 52736 424229 0 0 2 0x14200 zerothread 78043 262518 0 0 3 0x14200 aiodoned aiodoned 54825 429672 0 0 3 0x14200 syncer update 7427 509136 0 0 3 0x14200 cleaner cleaner 40159 85047 0 0 3 0x14200 reaper reaper 34206 390797 0 0 3 0x14200 pgdaemon pagedaemon 54515 57197 0 0 3 0x14200 bored viomb 40975 223721 0 0 3 0x40014200 acpi0 acpi0 6585 83484 0 0 3 0x14200 bored softnet 462 249389 0 0 3 0x14200 bored softnet 59113 193264 0 0 3 0x14200 bored softnet 6609 230983 0 0 3 0x14200 bored softnet 49262 421917 0 0 3 0x14200 bored systqmp 58130 242645 0 0 3 0x14200 bored systq 5793 372682 0 0 3 0x40014200 bored softclock 3378 348089 0 0 3 0x40014200 idle0 1 217682 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 10185 6435K 8093K 78643K 13739 0 pcb 13 12K 13K 78643K 417 0 rtable 179 14K 16K 78643K 1001 0 ifaddr 75 21K 21K 78643K 426 0 sysctl 3 1K 1K 78643K 7 0 counters 28 17K 17K 78643K 147 0 ioctlops 0 0K 4K 78643K 535 0 iov 0 0K 24K 78643K 310 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 4 0 vnodes 1421 89K 89K 78643K 7165 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 13K 78643K 316 0 VM map 2 1K 1K 78643K 2 0 sem 22 2K 3K 78643K 168 0 dirhash 93 16K 18K 78643K 16809 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 13 45K 73K 78643K 13843 0 sigio 0 0K 0K 78643K 80 0 proc 60 59K 75K 78643K 2526 0 subproc 104 6K 6K 78643K 225 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 465 0 in_multi 68 4K 6K 78643K 432 0 ether_multi 1 0K 0K 78643K 75 0 mrt 0 0K 0K 78643K 25 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 169 758K 758K 78643K 169 0 exec 0 0K 1K 78643K 1742 0 pfkey data 0 0K 0K 78643K 5 0 tdb 3 0K 0K 78643K 3 0 pagedep 1 8K 8K 78643K 1 0 inodedep 1 32K 32K 78643K 1 0 newblk 1 0K 0K 78643K 1 0 VM swap 8 62K 64K 78643K 10 0 UVM amap 315 89K 95K 78643K 128668 0 UVM aobj 131 4K 4K 78643K 132 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 282 0 NDP 13 0K 2K 78643K 143 0 temp 133 5850K 71514K 78643K 65603 0 kqueue 6 10K 26K 78643K 408 0 SYN cache 2 8K 16K 78643K 3 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle rtpcb 120 298 0 297 1 0 1 1 0 8 0 rtentry 112 273 0 197 4 1 3 4 0 8 0 unpcb 144 4953 0 4947 47 44 3 10 0 8 2 syncache 296 71 0 71 9 9 0 1 0 8 0 tcpqe 32 150 0 150 8 8 0 1 0 8 0 tcpcb 776 2593 0 2589 51 46 5 14 0 8 4 arp 88 39 0 24 1 0 1 1 0 8 0 ipq 40 6 0 6 2 2 0 1 0 8 0 ipqe 40 12 0 12 2 2 0 1 0 8 0 inpcb 336 5605 0 5600 66 62 4 12 0 8 3 nd6 104 57 0 39 1 0 1 1 0 8 0 pkpcb 40 6 0 6 2 2 0 1 0 8 0 kcovpl 48 17 0 9 1 0 1 1 0 8 0 mppekey 1024 11 0 11 4 4 0 1 0 8 0 ppxss 1160 66 0 66 10 10 0 1 0 8 0 pppxif 1360 11 0 11 4 4 0 1 0 8 0 pfstscr 40 4 0 0 1 0 1 1 0 8 0 pfosfp 40 4 0 3 1 0 1 1 0 8 0 pfosfpen 112 4 0 3 1 0 1 1 0 8 0 pfanchor 1288 664 0 355 37 7 30 32 0 8 0 pftag 88 1 0 0 1 0 1 1 0 8 0 pfqueue 264 37 0 30 3 2 1 1 0 8 0 pfstitem 24 8 0 6 1 0 1 1 0 8 0 pfstkey 128 8 0 3 1 0 1 1 0 8 0 pfstate 352 4 0 0 1 0 1 1 0 8 0 rttmr 136 5 0 5 2 2 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 1257 0 949 36 16 20 29 0 8 0 art_table 32 1258 0 949 4 1 3 4 0 8 0 art_node 16 261 0 196 1 0 1 1 0 8 0 sysvmsgpl 40 10 0 5 1 0 1 1 0 8 0 semapl 112 162 0 142 1 0 1 1 0 8 0 shmpl 112 129 0 1 4 0 4 4 0 8 0 dirhash 1024 5616 0 5572 7 1 6 6 0 8 0 dino2pl 256 26782 0 25210 99 0 99 99 0 8 0 ffsino 240 26782 0 25210 93 0 93 93 0 8 0 nchpl 144 43004 0 42463 63 40 23 63 0 8 0 uvmvnodes 80 5926 0 0 121 0 121 121 0 8 0 vnodes 216 5926 0 0 330 0 330 330 0 8 0 namei 1024 157902 0 157898 16 14 2 3 0 8 1 kstatmem 264 206 0 180 2 0 2 2 0 8 0 scsiplug 72 1 0 1 1 1 0 1 0 8 0 scxspl 216 145479 0 145479 14 13 1 8 0 8 1 plimitpl 152 695 0 681 1 0 1 1 0 8 0 sigapl 424 14127 0 14085 6 0 6 6 0 8 0 futexpl 64 103082 0 103081 3 2 1 1 0 8 0 knotepl 120 113968 0 113904 53 48 5 18 0 8 0 kqueuepl 184 772 0 767 6 5 1 4 0 8 0 pipepl 288 839 0 811 17 14 3 7 0 8 0 fdescpl 432 14109 0 14088 4 0 4 4 0 8 0 filepl 120 48086 0 47869 51 40 11 14 0 8 3 lockfpl 104 797 0 796 1 0 1 1 0 8 0 lockfspl 48 294 0 293 1 0 1 1 0 8 0 sessionpl 144 35 0 20 1 0 1 1 0 8 0 pgrppl 48 96 0 81 1 0 1 1 0 8 0 ucredpl 104 4024 0 4016 1 0 1 1 0 8 0 zombiepl 144 14088 0 14085 1 0 1 1 0 8 0 processpl 1008 14127 0 14085 7 1 6 6 0 8 0 procpl 696 34363 0 34305 17 10 7 8 0 8 0 sosppl 168 87 0 87 11 11 0 1 0 8 0 sockpl 456 10870 0 10858 190 180 10 32 0 8 8 mcl64k 65536 168 0 168 25 24 1 1 0 8 1 mcl16k 16384 108 0 108 17 16 1 1 0 8 1 mcl12k 12288 141 0 141 20 20 0 1 0 8 0 mcl9k 9216 48 0 48 18 17 1 1 0 8 1 mcl8k 8192 430 0 430 20 19 1 1 0 8 1 mcl4k 4096 1619 0 1619 14 13 1 1 0 8 1 mcl2k2 2112 93 0 93 20 19 1 1 0 8 1 mcl2k 2048 60619 0 60576 70 60 10 24 0 8 3 mtagpl 96 133 0 90 4 1 3 3 0 8 0 mbufpl 256 206471 0 206316 277 261 16 112 0 8 0 bufpl 288 23051 0 16663 457 0 457 457 0 8 0 anonpl 24 1193881 0 1183688 166 102 64 127 0 188 0 amapchunkpl 152 403594 0 402959 94 63 31 56 0 158 1 amappl16 200 18754 0 18444 43 26 17 24 0 8 0 amappl15 192 27 0 27 2 2 0 1 0 8 0 amappl14 184 182 0 174 2 1 1 2 0 8 0 amappl13 176 16 0 15 1 0 1 1 0 8 0 amappl12 168 14884 0 14861 2 0 2 2 0 8 0 amappl11 160 56 0 52 1 0 1 1 0 8 0 amappl10 152 59 0 48 2 1 1 1 0 8 0 amappl9 144 177 0 176 4 3 1 2 0 8 0 amappl8 136 403 0 290 4 0 4 4 0 8 0 amappl7 128 68 0 50 1 0 1 1 0 8 0 amappl6 120 375 0 353 2 1 1 2 0 8 0 amappl5 112 598 0 594 1 0 1 1 0 8 0 amappl4 104 887 0 853 2 0 2 2 0 8 0 amappl3 96 80433 0 80371 5 2 3 3 0 8 0 amappl2 88 15616 0 15570 4 2 2 3 0 8 0 amappl1 80 58375 0 57979 22 12 10 22 0 8 0 amappl 88 127181 0 127010 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 131 0 1 3 0 3 3 0 8 0 uaddrrnd 24 14109 0 14088 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 14109 0 14088 1 0 1 1 0 8 0 vmmpekpl 168 87031 0 86979 3 0 3 3 0 8 0 vmmpepl 168 806478 0 804726 164 74 90 110 0 357 2 vmsppl 360 14108 0 14088 3 0 3 3 0 8 0 rwobjpl 24 182942 0 175723 44 0 44 44 0 8 0 pdppl 4096 28224 0 28176 535 477 58 68 0 8 10 pvpl 32 3705213 0 3690307 527 399 128 359 0 265 0 pmappl 216 14108 0 14088 2 0 2 2 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 1761 0 987 25 2 23 25 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(ffffffff8282eb42) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd806b3b0970,ffffffff8280bf16,2,fffffd806b3b0a1c,ffff800027fb73e8,0) at ufsdirhash_lookup+0x8b8 sys/ufs/ufs/ufs_dirhash.c:343 ufs_lookup() at ufs_lookup+0xc15 sys/ufs/ufs/ufs_lookup.c:216 VOP_LOOKUP(fffffd80686d6298,ffff800027fb7588,ffff800027fb7528) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 unveil_find_cover(fffffd80686d6298,ffff8000216f8e08) at unveil_find_cover+0x130 sys/kern/kern_unveil.c:277 unveil_start_relative(ffff8000216f8e08,ffff800027fb77a0,fffffd80686d6298) at unveil_start_relative+0xf6 sys/kern/kern_unveil.c:606 namei(ffff800027fb77a0) at namei+0x453 sys/kern/vfs_lookup.c:237 dosymlinkat(ffff8000216f8e08,20000040,3,20000100) at dosymlinkat+0xb8 sys/kern/vfs_syscalls.c:1788 syscall(ffff800027fb7980) at syscall+0x4a8 sys/arch/amd64/amd64/trap.c:632 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x6d9f67ecc00, 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(ffffffff8282eb42) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd806b3b0970,ffffffff8280bf16,2,fffffd806b3b0a1c,ffff800027fb73e8,0) at ufsdirhash_lookup+0x8b8 sys/ufs/ufs/ufs_dirhash.c:343 ufs_lookup() at ufs_lookup+0xc15 sys/ufs/ufs/ufs_lookup.c:216 VOP_LOOKUP(fffffd80686d6298,ffff800027fb7588,ffff800027fb7528) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 unveil_find_cover(fffffd80686d6298,ffff8000216f8e08) at unveil_find_cover+0x130 sys/kern/kern_unveil.c:277 unveil_start_relative(ffff8000216f8e08,ffff800027fb77a0,fffffd80686d6298) at unveil_start_relative+0xf6 sys/kern/kern_unveil.c:606 namei(ffff800027fb77a0) at namei+0x453 sys/kern/vfs_lookup.c:237 dosymlinkat(ffff8000216f8e08,20000040,3,20000100) at dosymlinkat+0xb8 sys/kern/vfs_syscalls.c:1788 syscall(ffff800027fb7980) at syscall+0x4a8 sys/arch/amd64/amd64/trap.c:632 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x6d9f67ecc00, count: -11