panic: ufsdirhash_lookup: bad offset in hash array Stopped at db_enter+0x1c: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 19251 37083 0 0 0x4000000 0 syz-executor.2 db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff828e1d05) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd80599f9788,ffff80002a677c00,1,fffffd80599f9834,ffff80003287af20,ffff80003287af38) at ufsdirhash_lookup+0x8a8 sys/ufs/ufs/ufs_dirhash.c:342 ufs_lookup() at ufs_lookup+0xba0 sys/ufs/ufs/ufs_lookup.c:214 VOP_LOOKUP(fffffd805651b440,ffff80003287b278,ffff80003287b2a8) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 vfs_lookup(ffff80003287b248) at vfs_lookup+0x6df sys/kern/vfs_lookup.c:566 namei(ffff80003287b248) at namei+0x56a sys/kern/vfs_lookup.c:250 dorenameat(ffff80002a6b0800,4,20000440,5,20000480) at dorenameat+0x7f sys/kern/vfs_syscalls.c:2946 syscall(ffff80003287b430) at syscall+0x538 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x5755e815e50, 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+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff828e1d05) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd80599f9788,ffff80002a677c00,1,fffffd80599f9834,ffff80003287af20,ffff80003287af38) at ufsdirhash_lookup+0x8a8 sys/ufs/ufs/ufs_dirhash.c:342 ufs_lookup() at ufs_lookup+0xba0 sys/ufs/ufs/ufs_lookup.c:214 VOP_LOOKUP(fffffd805651b440,ffff80003287b278,ffff80003287b2a8) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 vfs_lookup(ffff80003287b248) at vfs_lookup+0x6df sys/kern/vfs_lookup.c:566 namei(ffff80003287b248) at namei+0x56a sys/kern/vfs_lookup.c:250 dorenameat(ffff80002a6b0800,4,20000440,5,20000480) at dorenameat+0x7f sys/kern/vfs_syscalls.c:2946 syscall(ffff80003287b430) at syscall+0x538 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x5755e815e50, count: -10 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80003287ad40 rbx 0xffff800000e2ba60 rdx 0xffff800000e00e40 rcx 0 rax 0xffff80002a6b0800 r8 0x101010101010101 r9 0x8080808080808080 r10 0x6776ff34ad3ea1c4 r11 0x7c917264cc1bddf9 r12 0 r13 0xffff800000fa7200 r14 0 r15 0x1 rip 0xffffffff81443bbc db_enter+0x1c cs 0x8 rflags 0x246 rsp 0xffff80003287ad30 ss 0x10 db_enter+0x1c: addq $0x8,%rsp ddb> show proc PROC (syz-executor.2) tid=19251 pid=37083 tcnt=2 stat=onproc flags process=0 proc=4000000 runpri=86, usrpri=86, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 forw=0xffffffffffffffff, list=0xffff80002a6b1a98,0xffff80002a6b1d50 process=0xffff80002f52a1a0 user=0xffff800032876000, vmspace=0xfffffd807a39f9b8 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 13663 415835 64012 0 3 0x80 fsleep syz-executor.4 13663 418889 64012 0 2 0x4000000 syz-executor.4 57376 106371 27695 0 3 0x80 fsleep syz-executor.6 57376 58942 27695 0 3 0x4000080 kqread syz-executor.6 37083 521559 84197 0 3 0x80 fsleep syz-executor.2 *37083 19251 84197 0 7 0x4000000 syz-executor.2 62906 466073 89604 0 3 0x80 fsleep syz-executor.3 62906 24431 89604 0 3 0x4000080 wsevent_read syz-executor.3 65349 188619 85072 0 3 0x80 fsleep syz-executor.1 65349 315065 85072 0 3 0x4000080 fifow syz-executor.1 85072 492573 24647 0 3 0x82 nanoslp syz-executor.1 27695 219943 24647 0 3 0x82 nanoslp syz-executor.6 84910 490005 0 0 3 0x14200 acct acct 84197 35392 24647 0 3 0x82 nanoslp syz-executor.2 64012 336661 24647 0 3 0x82 nanoslp syz-executor.4 64069 327921 24647 0 3 0x82 nanoslp syz-executor.7 94595 464307 24647 0 2 0x2 syz-executor.0 89604 186046 24647 0 3 0x82 nanoslp syz-executor.3 23063 474037 24647 0 2 0x2 syz-executor.5 62564 150147 1 0 3 0x18100083 ttyin getty 27116 330586 0 0 3 0x14280 nfsidl nfsio 53500 445492 0 0 3 0x14280 nfsidl nfsio 20956 429634 0 0 3 0x14280 nfsidl nfsio 66262 399667 0 0 3 0x14280 nfsidl nfsio 98915 215885 0 0 3 0x14280 nfsidl nfsio 13275 462510 0 0 3 0x14280 nfsidl nfsio 13051 167923 0 0 3 0x14280 nfsidl nfsio 24812 332697 0 0 3 0x14280 nfsidl nfsio 60496 260527 0 0 3 0x14280 nfsidl nfsio 5576 439708 0 0 3 0x14280 nfsidl nfsio 75354 251699 0 0 3 0x14280 nfsidl nfsio 41109 441703 0 0 3 0x14280 nfsidl nfsio 16198 389795 0 0 3 0x14280 nfsidl nfsio 67853 245685 0 0 3 0x14280 nfsidl nfsio 32353 491088 0 0 3 0x14280 nfsidl nfsio 87808 510251 0 0 3 0x14280 nfsidl nfsio 7093 109238 0 0 3 0x14280 nfsidl nfsio 11924 148360 0 0 3 0x14280 nfsidl nfsio 36730 421728 0 0 3 0x14280 nfsidl nfsio 24050 69444 0 0 3 0x14280 nfsidl nfsio 1270 307029 1 0 3 0x80 fsleep syz-executor.2 1270 361479 1 0 3 0x4000080 fsleep syz-executor.2 1270 213439 1 0 3 0x4000080 lockf syz-executor.2 72917 37638 0 0 3 0x14200 bored sosplice 24647 329890 61149 0 3 0x1a000082 wait syz-fuzzer 24647 425381 61149 0 3 0x1e000082 nanoslp syz-fuzzer 24647 211713 61149 0 3 0x1e000082 wait syz-fuzzer 24647 471841 61149 0 3 0x1e000082 thrsleep syz-fuzzer 24647 478875 61149 0 3 0x1e000082 wait syz-fuzzer 24647 418281 61149 0 3 0x1e000082 wait syz-fuzzer 24647 142892 61149 0 3 0x1e000082 thrsleep syz-fuzzer 24647 43803 61149 0 3 0x1e000082 thrsleep syz-fuzzer 24647 481208 61149 0 3 0x1e000082 kqread syz-fuzzer 24647 268706 61149 0 3 0x1e000082 wait syz-fuzzer 24647 107370 61149 0 3 0x1e000082 thrsleep syz-fuzzer 24647 125958 61149 0 3 0x1e000082 wait syz-fuzzer 24647 201975 61149 0 3 0x1e000082 wait syz-fuzzer 24647 157704 61149 0 3 0x1e000082 wait syz-fuzzer 61149 427069 89036 0 3 0x810008a sigsusp ksh 89036 513819 22254 0 3 0x1800009a kqread sshd 22254 22424 1 0 3 0x18000088 kqread sshd 13613 159914 9733 73 3 0x19100090 kqread syslogd 9733 290661 1 0 3 0x18100082 netio syslogd 58860 408139 1 0 3 0x18100080 kqread resolvd 86565 448088 22197 77 3 0x18100092 kqread dhcpleased 72333 344240 22197 77 3 0x18100092 kqread dhcpleased 22197 442052 1 0 3 0x18000080 kqread dhcpleased 14412 334459 0 0 3 0x14200 bored smr 93716 263307 0 0 2 0x14200 zerothread 89917 140110 0 0 3 0x14200 aiodoned aiodoned 60125 341148 0 0 3 0x14200 syncer update 33488 336054 0 0 3 0x14200 cleaner cleaner 46413 250334 0 0 3 0x14200 reaper reaper 92065 57074 0 0 3 0x14200 pgdaemon pagedaemon 25244 196482 0 0 3 0x14200 bored viomb 26572 123068 0 0 3 0x40014200 acpi0 acpi0 30794 222163 0 0 3 0x14200 bored softnet3 49394 343372 0 0 3 0x14200 bored softnet2 60783 483085 0 0 3 0x14200 bored softnet1 36702 414063 0 0 3 0x14200 bored softnet0 98681 371250 0 0 3 0x14200 bored systqmp 92950 494659 0 0 3 0x14200 bored systq 6013 360550 0 0 3 0x40014200 tmoslp softclock 63220 47073 0 0 3 0x40014200 idle0 1 49213 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 10210 6430K 7340K 166960K 42514 0 pcb 15 18K 20K 166960K 1618 0 rtable 198 10K 11K 166960K 3867 0 pf 29 8K 10K 166960K 596 0 ifaddr 37 11K 13K 166960K 544 0 ifgroup 50 2K 2K 166960K 1031 0 sysctl 3 0K 0K 166960K 5 0 counters 30 17K 17K 166960K 256 0 ioctlops 0 0K 2K 166960K 1215 0 iov 0 0K 24K 166960K 1535 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1564 98K 98K 166960K 12949 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 9K 166960K 209 0 VM map 2 1K 1K 166960K 2 0 sem 12 1K 1K 166960K 1824 0 dirhash 93 16K 18K 166960K 9318 0 ACPI 1697 195K 286K 166960K 12548 0 file desc 16 57K 73K 166960K 18451 0 sigio 0 0K 0K 166960K 883 0 proc 58 59K 83K 166960K 3160 0 subproc 117 7K 7K 166960K 1278 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 1653 0 in_multi 77 5K 7K 166960K 1175 0 ether_multi 2 0K 0K 166960K 14 0 mrt 4 0K 0K 166960K 34 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 253 1129K 1129K 166960K 253 0 exec 0 0K 1K 166960K 3553 0 pfkey data 0 0K 0K 166960K 108 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 533 694K 712K 166960K 172190 0 UVM aobj 131 4K 4K 166960K 143 0 pinsyscall 22 44K 100K 166960K 3993 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 1 0K 1K 166960K 437 0 NDP 11 0K 2K 166960K 427 0 temp 79 6804K 7440K 166960K 112188 0 kqueue 13 20K 30K 166960K 1905 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 994 0 991 10 9 1 4 0 8 0 rtentry 112 1252 0 1163 5 2 3 4 0 8 0 unpcb 144 18748 0 18731 50 49 1 13 0 8 0 syncache 336 110 0 110 7 7 0 1 0 8 0 tcpqe 32 269 0 269 7 7 0 1 0 8 0 tcpcb 808 6519 0 6513 71 63 8 15 0 8 7 arp 88 223 0 210 1 0 1 1 0 8 0 ipq 40 16 0 15 3 2 1 1 0 8 0 ipqe 40 174 0 173 3 2 1 1 0 8 0 inpcb 360 14950 0 14940 92 84 8 17 0 8 7 nd6 104 291 0 271 1 0 1 1 0 8 0 pkpcb 40 78 0 78 5 5 0 1 0 8 0 kcovpl 48 98 0 89 1 0 1 1 0 8 0 ppxss 1072 19 0 19 3 3 0 1 0 8 0 art_heap8 4096 4 0 3 2 1 1 2 0 8 0 art_heap4 256 4877 0 4493 59 35 24 31 0 8 0 art_table 32 4881 0 4496 4 0 4 4 0 8 0 art_node 16 1208 0 1127 1 0 1 1 0 8 0 sysvmsgpl 40 7 0 4 1 0 1 1 0 8 0 semupl 112 5 0 5 1 1 0 1 0 8 0 semapl 112 1815 0 1805 1 0 1 1 0 8 0 shmpl 112 140 0 12 4 0 4 4 0 8 0 dirhash 1024 3130 0 3086 7 1 6 7 0 8 0 dino2pl 256 27332 0 25731 101 0 101 101 0 8 0 ffsino 240 27332 0 25731 95 0 95 95 0 8 0 nchpl 144 52978 0 51255 66 0 66 66 0 8 0 uvmvnodes 80 34664 0 0 708 0 708 708 0 8 0 vnodes 216 34664 0 0 1926 0 1926 1926 0 8 0 namei 1024 187130 0 187127 7 6 1 2 0 8 0 vcpupl 2048 190 0 1 24 0 24 24 0 8 0 vmpool 664 239 0 50 16 0 16 16 0 8 0 kstatmem 264 474 0 452 2 0 2 2 0 8 0 scxspl 216 159546 0 159546 21 19 2 8 1 8 2 plimitpl 152 2008 0 1992 1 0 1 1 0 8 0 sigapl 424 18910 0 18844 8 0 8 8 0 8 0 futexpl 64 178121 0 178114 1 0 1 1 0 8 0 knotepl 120 175597 0 175512 48 45 3 18 0 8 0 kqueuepl 184 6940 0 6931 28 27 1 7 0 8 0 pipepl 288 2647 0 2618 30 27 3 12 0 8 0 fdescpl 432 18551 0 18524 4 0 4 4 0 8 0 filepl 120 125172 0 124911 69 59 10 23 0 8 0 lockfpl 104 5330 0 5326 5 4 1 2 0 8 0 lockfspl 48 2214 0 2211 1 0 1 1 0 8 0 sessionpl 144 110 0 93 1 0 1 1 0 8 0 pgrppl 48 339 0 322 1 0 1 1 0 8 0 ucredpl 104 21914 0 21902 1 0 1 1 0 8 0 zombiepl 144 18845 0 18844 3 2 1 1 0 8 0 processpl 1072 18910 0 18844 5 0 5 5 0 8 0 procpl 680 47873 0 47787 12 3 9 10 0 8 0 sosppl 168 185 0 185 7 7 0 1 0 8 0 sockpl 488 34796 0 34766 589 578 11 56 0 8 7 mcl64k 65536 628 0 628 9 8 1 1 0 8 1 mcl16k 16384 382 0 382 8 7 1 1 0 8 1 mcl12k 12288 609 0 609 9 8 1 1 0 8 1 mcl9k 9216 257 0 257 9 8 1 1 0 8 1 mcl8k 8192 1232 0 1232 12 11 1 3 0 8 1 mcl4k 4096 2385 0 2385 9 8 1 1 0 8 1 mcl2k2 2112 193 0 193 8 7 1 1 0 8 1 mcl2k 2048 106646 0 106595 51 43 8 33 0 8 0 mtagpl 96 3247 0 2987 20 13 7 12 0 8 0 mbufpl 256 332509 0 332167 546 516 30 105 0 8 4 bufpl 280 36015 0 29357 476 0 476 476 0 8 0 anonpl 24 1722351 0 1709039 169 56 113 113 0 188 11 amapchunkpl 152 542365 0 541515 71 32 39 48 0 158 2 amappl16 200 29882 0 29388 72 37 35 40 0 8 8 amappl15 192 131 0 130 1 0 1 1 0 8 0 amappl14 184 476 0 462 2 1 1 2 0 8 0 amappl13 176 42 0 42 6 6 0 1 0 8 0 amappl12 168 20411 0 20383 2 0 2 2 0 8 0 amappl11 160 59 0 48 1 0 1 1 0 8 0 amappl10 152 154 0 143 1 0 1 1 0 8 0 amappl9 144 278 0 277 1 0 1 1 0 8 0 amappl8 136 662 0 561 5 1 4 4 0 8 0 amappl7 128 116 0 102 1 0 1 1 0 8 0 amappl6 120 1486 0 1460 2 1 1 2 0 8 0 amappl5 112 780 0 768 1 0 1 1 0 8 0 amappl4 104 1431 0 1391 2 0 2 2 0 8 0 amappl3 96 106550 0 106472 3 0 3 3 0 8 0 amappl2 88 19890 0 19815 4 1 3 4 0 8 0 amappl1 80 80251 0 79751 23 12 11 22 0 8 0 amappl 88 170575 0 170296 8 0 8 8 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 142 0 12 3 0 3 3 0 8 0 uaddrrnd 24 18790 0 18574 2 0 2 2 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 18790 0 18574 2 0 2 2 0 8 0 vmmpekpl 168 128774 0 128687 5 0 5 5 0 8 0 vmmpepl 168 1127907 0 1125424 229 90 139 139 0 357 11 vmsppl 352 18789 0 18574 20 0 20 20 0 8 0 rwobjpl 24 285836 0 249438 221 0 221 221 0 8 0 pdppl 4096 37586 0 37337 1372 1117 255 256 0 8 6 pvpl 32 5152360 0 5133334 533 330 203 358 0 265 25 pmappl 216 18789 0 18574 13 0 13 13 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 2425 0 1855 20 2 18 19 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(ffffffff828e1d05) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd80599f9788,ffff80002a677c00,1,fffffd80599f9834,ffff80003287af20,ffff80003287af38) at ufsdirhash_lookup+0x8a8 sys/ufs/ufs/ufs_dirhash.c:342 ufs_lookup() at ufs_lookup+0xba0 sys/ufs/ufs/ufs_lookup.c:214 VOP_LOOKUP(fffffd805651b440,ffff80003287b278,ffff80003287b2a8) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 vfs_lookup(ffff80003287b248) at vfs_lookup+0x6df sys/kern/vfs_lookup.c:566 namei(ffff80003287b248) at namei+0x56a sys/kern/vfs_lookup.c:250 dorenameat(ffff80002a6b0800,4,20000440,5,20000480) at dorenameat+0x7f sys/kern/vfs_syscalls.c:2946 syscall(ffff80003287b430) at syscall+0x538 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x5755e815e50, count: -10 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff828e1d05) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd80599f9788,ffff80002a677c00,1,fffffd80599f9834,ffff80003287af20,ffff80003287af38) at ufsdirhash_lookup+0x8a8 sys/ufs/ufs/ufs_dirhash.c:342 ufs_lookup() at ufs_lookup+0xba0 sys/ufs/ufs/ufs_lookup.c:214 VOP_LOOKUP(fffffd805651b440,ffff80003287b278,ffff80003287b2a8) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 vfs_lookup(ffff80003287b248) at vfs_lookup+0x6df sys/kern/vfs_lookup.c:566 namei(ffff80003287b248) at namei+0x56a sys/kern/vfs_lookup.c:250 dorenameat(ffff80002a6b0800,4,20000440,5,20000480) at dorenameat+0x7f sys/kern/vfs_syscalls.c:2946 syscall(ffff80003287b430) at syscall+0x538 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x5755e815e50, count: -10