panic: ufsdirhash_lookup: bad offset in hash array Stopped at db_enter+0x1c: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *360360 50078 0 0 0x4000000 0 syz-executor.2 db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff828e4c86) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd806f91b0f0,ffffffff8282d2f4,2,fffffd806f91b19c,ffff8000378730a0,0) 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(fffffd8076e6e538,ffff800037873248,ffff8000378731e8) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 unveil_find_cover(fffffd8076e6e538,ffff80002a678818) at unveil_find_cover+0x132 sys/kern/kern_unveil.c:277 unveil_start_relative(ffff80002a678818,ffff800037873588,fffffd8076e6e538) at unveil_start_relative+0xdb sys/kern/kern_unveil.c:606 namei(ffff800037873588) at namei+0x45c sys/kern/vfs_lookup.c:237 vn_open(ffff800037873588,201,0) at vn_open+0x180 sys/kern/vfs_vnops.c:107 doopenat(ffff80002a678818,4,20000240,200,0,ffff800037873720) at doopenat+0x269 sys/kern/vfs_syscalls.c:1126 syscall(ffff8000378737d0) at syscall+0x538 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc9102e9d050, count: 3 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(ffffffff828e4c86) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd806f91b0f0,ffffffff8282d2f4,2,fffffd806f91b19c,ffff8000378730a0,0) 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(fffffd8076e6e538,ffff800037873248,ffff8000378731e8) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 unveil_find_cover(fffffd8076e6e538,ffff80002a678818) at unveil_find_cover+0x132 sys/kern/kern_unveil.c:277 unveil_start_relative(ffff80002a678818,ffff800037873588,fffffd8076e6e538) at unveil_start_relative+0xdb sys/kern/kern_unveil.c:606 namei(ffff800037873588) at namei+0x45c sys/kern/vfs_lookup.c:237 vn_open(ffff800037873588,201,0) at vn_open+0x180 sys/kern/vfs_vnops.c:107 doopenat(ffff80002a678818,4,20000240,200,0,ffff800037873720) at doopenat+0x269 sys/kern/vfs_syscalls.c:1126 syscall(ffff8000378737d0) at syscall+0x538 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc9102e9d050, count: -12 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800037872ec0 rbx 0xffff800000e926c0 rdx 0xffff800000e66680 rcx 0 rax 0xffff80002a678818 r8 0x101010101010101 r9 0x8080808080808080 r10 0x68b67484269b3e77 r11 0x99d99973b75fe804 r12 0 r13 0xffff800000e9bc00 r14 0 r15 0x1 rip 0xffffffff825cb28c db_enter+0x1c cs 0x8 rflags 0x246 rsp 0xffff800037872eb0 ss 0x10 db_enter+0x1c: addq $0x8,%rsp ddb> show proc PROC (syz-executor.2) tid=360360 pid=50078 tcnt=2 stat=onproc flags process=0 proc=4000000 runpri=32, usrpri=86, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 forw=0xffffffffffffffff, list=0xffff80002a679ab0,0xffff80002a6bdaa0 process=0xffff80003796d510 user=0xffff80003786e000, vmspace=0xfffffd806063cb10 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 35206 181803 30660 0 2 0 syz-executor.6 35206 56525 30660 0 3 0x4000080 fsleep syz-executor.6 67226 469924 5043 0 2 0 syz-executor.7 67226 323603 5043 0 3 0x4000080 fsleep syz-executor.7 67226 406330 5043 0 3 0x4000080 fsleep syz-executor.7 50078 426215 68477 0 2 0 syz-executor.2 *50078 360360 68477 0 7 0x4000000 syz-executor.2 40451 218351 96205 0 3 0x80 nanoslp syz-executor.3 40451 233983 96205 0 3 0x4000080 netcon syz-executor.3 40451 364084 96205 0 3 0x4000080 fsleep syz-executor.3 40451 126677 96205 0 3 0x4000080 fsleep syz-executor.3 69134 179868 83190 0 3 0x80 nanoslp syz-executor.1 69134 205033 83190 0 3 0x4000080 kqread syz-executor.1 96641 432742 23359 0 3 0x82 piperd syz-executor.4 30660 127006 23359 0 3 0x82 nanoslp syz-executor.6 5043 492801 23359 0 3 0x82 nanoslp syz-executor.7 82280 505894 23359 0 3 0x82 piperd syz-executor.0 1407 462280 0 0 3 0x14280 nfsidl nfsio 22881 303561 0 0 3 0x14280 nfsidl nfsio 88064 451956 0 0 3 0x14280 nfsidl nfsio 40909 139658 0 0 3 0x14280 nfsidl nfsio 83531 448801 0 0 3 0x14280 nfsidl nfsio 65111 347288 0 0 3 0x14280 nfsidl nfsio 34743 248270 0 0 3 0x14280 nfsidl nfsio 18377 124291 0 0 3 0x14280 nfsidl nfsio 70436 482424 0 0 3 0x14280 nfsidl nfsio 52004 181513 0 0 3 0x14280 nfsidl nfsio 22755 29961 0 0 3 0x14280 nfsidl nfsio 15793 256796 0 0 3 0x14280 nfsidl nfsio 78725 45128 0 0 3 0x14280 nfsidl nfsio 95004 376483 0 0 3 0x14280 nfsidl nfsio 71791 415770 0 0 3 0x14280 nfsidl nfsio 88719 252421 0 0 3 0x14280 nfsidl nfsio 99869 280302 0 0 3 0x14280 nfsidl nfsio 88255 105755 0 0 3 0x14280 nfsidl nfsio 66396 161802 0 0 3 0x14280 nfsidl nfsio 7901 356019 0 0 3 0x14280 nfsidl nfsio 96205 49058 23359 0 3 0x82 nanoslp syz-executor.3 83190 390987 23359 0 3 0x82 nanoslp syz-executor.1 44794 244126 1 0 3 0x18100083 ttyin getty 92462 399425 0 0 3 0x14200 acct acct 80844 493865 23359 0 2 0x2 syz-executor.5 68477 167057 23359 0 3 0x82 nanoslp syz-executor.2 9729 349943 0 0 3 0x14200 bored sosplice 23359 462788 71783 0 3 0x1a000082 wait syz-fuzzer 23359 373660 71783 0 3 0x1e000082 thrsleep syz-fuzzer 23359 124074 71783 0 3 0x1e000082 wait syz-fuzzer 23359 431574 71783 0 3 0x1e000082 wait syz-fuzzer 23359 360648 71783 0 3 0x1e000082 thrsleep syz-fuzzer 23359 102202 71783 0 3 0x1e000082 wait syz-fuzzer 23359 238041 71783 0 3 0x1e000082 wait syz-fuzzer 23359 170505 71783 0 3 0x1e000082 wait syz-fuzzer 23359 349761 71783 0 3 0x1e000082 thrsleep syz-fuzzer 23359 224345 71783 0 3 0x1e000082 thrsleep syz-fuzzer 23359 16387 71783 0 3 0x1e000082 thrsleep syz-fuzzer 23359 252743 71783 0 3 0x1e000082 wait syz-fuzzer 23359 130267 71783 0 3 0x1e000082 wait syz-fuzzer 23359 13511 71783 0 3 0x1e000082 thrsleep syz-fuzzer 23359 478609 71783 0 3 0x1e000082 kqread syz-fuzzer 71783 6595 71931 0 3 0x810008a sigsusp ksh 71931 48152 66682 0 3 0x1800009a kqread sshd 66682 52733 1 0 3 0x18000088 kqread sshd 14202 237955 21977 73 3 0x19100090 kqread syslogd 21977 180011 1 0 3 0x18100082 netio syslogd 99426 260663 1 0 3 0x18100080 kqread resolvd 61011 309040 37876 77 3 0x18100092 kqread dhcpleased 25299 305824 37876 77 3 0x18100092 kqread dhcpleased 37876 214499 1 0 3 0x18000080 kqread dhcpleased 87061 362373 0 0 3 0x14200 bored smr 13780 223736 0 0 2 0x14200 zerothread 21919 373927 0 0 3 0x14200 aiodoned aiodoned 7796 291227 0 0 3 0x14200 syncer update 89866 337628 0 0 3 0x14200 cleaner cleaner 86652 499543 0 0 3 0x14200 reaper reaper 49297 329983 0 0 3 0x14200 pgdaemon pagedaemon 38672 267280 0 0 3 0x14200 bored viomb 15913 422056 0 0 3 0x40014200 acpi0 acpi0 57930 171889 0 0 3 0x14200 bored softnet3 80534 4610 0 0 3 0x14200 bored softnet2 24951 277327 0 0 3 0x14200 bored softnet1 30975 477412 0 0 3 0x14200 bored softnet0 45581 169358 0 0 3 0x14200 bored systqmp 16137 430622 0 0 3 0x14200 bored systq 59166 58893 0 0 3 0x40014200 tmoslp softclock 95432 177998 0 0 3 0x40014200 idle0 1 177749 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 10214 6439K 7635K 166960K 49521 0 pcb 15 22K 26K 166960K 1211 0 rtable 203 10K 12K 166960K 3358 0 pf 32 9K 10K 166960K 410 0 ifaddr 39 12K 13K 166960K 486 0 ifgroup 55 2K 2K 166960K 705 0 sysctl 4 1K 1K 166960K 8 0 counters 31 17K 17K 166960K 213 0 ioctlops 0 0K 2K 166960K 1109 0 iov 0 0K 28K 166960K 2438 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1630 102K 103K 166960K 13315 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 9K 166960K 197 0 VM map 2 1K 1K 166960K 2 0 sem 12 1K 1K 166960K 629 0 dirhash 93 16K 19K 166960K 19821 0 ACPI 1697 195K 286K 166960K 12548 0 file desc 15 53K 74K 166960K 18007 0 sigio 0 0K 0K 166960K 623 0 proc 61 67K 83K 166960K 4660 0 subproc 104 6K 7K 166960K 1170 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 1485 0 in_multi 77 5K 7K 166960K 1142 0 ether_multi 1 0K 0K 166960K 10 0 mrt 1 0K 0K 166960K 15 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 247 1102K 1102K 166960K 247 0 exec 0 0K 1K 166960K 3936 0 pfkey data 0 0K 0K 166960K 52 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 542 790K 791K 166960K 164634 0 UVM aobj 131 4K 4K 166960K 136 0 pinsyscall 22 44K 100K 166960K 3975 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 1K 166960K 382 0 NDP 12 0K 2K 166960K 374 0 temp 74 6804K 7440K 166960K 131731 0 kqueue 12 18K 26K 166960K 1046 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 910 0 907 8 5 3 5 0 8 2 rtentry 112 1097 0 1007 4 0 4 4 0 8 0 unpcb 144 12851 0 12836 17 11 6 11 0 8 5 syncache 336 342 0 342 3 2 1 1 0 8 1 tcpqe 32 669 0 669 4 3 1 2 0 8 1 tcpcb 808 5622 0 5361 60 25 35 35 0 8 7 arp 88 207 0 192 1 0 1 1 0 8 0 ipq 40 26 0 26 2 1 1 1 0 8 1 ipqe 40 70 0 70 2 1 1 1 0 8 1 inpcb 360 13944 0 13679 85 53 32 32 0 8 6 nd6 104 277 0 259 1 0 1 1 0 8 0 pkpcb 40 77 0 77 3 2 1 1 0 8 1 kcovpl 48 90 0 82 1 0 1 1 0 8 0 ppxss 1072 46 0 46 3 2 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 4219 0 3838 48 18 30 30 0 8 4 art_table 32 4220 0 3838 4 0 4 4 0 8 0 art_node 16 1081 0 1000 1 0 1 1 0 8 0 sysvmsgpl 40 89 0 53 1 0 1 1 0 8 0 semupl 112 5 0 5 1 1 0 1 0 8 0 semapl 112 624 0 614 1 0 1 1 0 8 0 shmpl 112 133 0 5 4 0 4 4 0 8 0 dirhash 1024 6620 0 6576 7 0 7 7 0 8 1 dino2pl 256 26375 0 24776 101 0 101 101 0 8 0 ffsino 240 26375 0 24776 95 0 95 95 0 8 0 nchpl 144 52934 0 51209 66 0 66 66 0 8 0 uvmvnodes 80 6190 0 0 127 0 127 127 0 8 0 vnodes 216 6190 0 0 344 0 344 344 0 8 0 namei 1024 182724 0 182723 7 5 2 3 0 8 1 vcpupl 2048 333 0 1 42 0 42 42 0 8 0 vmpool 664 363 0 31 28 0 28 28 0 8 0 kstatmem 264 388 0 364 2 0 2 2 0 8 0 scxspl 216 156992 0 156992 14 10 4 8 1 8 4 plimitpl 152 1661 0 1646 1 0 1 1 0 8 0 sigapl 424 18450 0 18386 8 0 8 8 0 8 0 futexpl 64 175258 0 175253 1 0 1 1 0 8 0 knotepl 120 174772 0 174689 26 15 11 11 0 8 8 kqueuepl 184 3240 0 3231 10 3 7 7 0 8 6 pipepl 288 2530 0 2501 13 6 7 7 0 8 4 fdescpl 432 18111 0 18085 4 0 4 4 0 8 0 filepl 120 105879 0 105628 28 13 15 19 0 8 6 lockfpl 104 4832 0 4830 3 1 2 2 0 8 1 lockfspl 48 1835 0 1833 1 0 1 1 0 8 0 sessionpl 144 107 0 91 1 0 1 1 0 8 0 pgrppl 48 196 0 180 1 0 1 1 0 8 0 ucredpl 104 18927 0 18912 1 0 1 1 0 8 0 zombiepl 144 18386 0 18386 1 0 1 1 0 8 1 processpl 1072 18450 0 18386 5 0 5 5 0 8 0 procpl 680 44473 0 44387 12 2 10 10 0 8 2 sosppl 168 178 0 175 2 1 1 1 0 8 0 sockpl 488 27886 0 27603 434 373 61 61 0 8 22 mcl64k 65536 664 0 664 3 2 1 1 0 8 1 mcl16k 16384 366 0 366 3 2 1 1 0 8 1 mcl12k 12288 1296 0 1296 3 2 1 1 0 8 1 mcl9k 9216 271 0 271 3 2 1 1 0 8 1 mcl8k 8192 1895 0 1895 3 2 1 1 0 8 1 mcl4k 4096 1671 0 1671 3 2 1 1 0 8 1 mcl2k2 2112 126 0 126 3 2 1 1 0 8 1 mcl2k 2048 109496 0 109406 54 40 14 30 0 8 1 mtagpl 96 4444 0 4212 22 9 13 16 0 8 5 mbufpl 256 342018 0 341166 404 345 59 93 0 8 3 bufpl 280 39000 0 32654 454 0 454 454 0 8 0 anonpl 24 1755793 0 1741884 148 34 114 117 0 188 7 amapchunkpl 152 539234 0 538367 71 20 51 51 0 158 14 amappl16 200 37407 0 36909 93 56 37 41 0 8 8 amappl15 192 136 0 135 1 0 1 1 0 8 0 amappl14 184 411 0 396 2 0 2 2 0 8 0 amappl13 176 19 0 19 2 1 1 1 0 8 1 amappl12 168 19966 0 19938 2 0 2 2 0 8 0 amappl11 160 52 0 42 1 0 1 1 0 8 0 amappl10 152 124 0 112 1 0 1 1 0 8 0 amappl9 144 263 0 263 2 1 1 1 0 8 1 amappl8 136 644 0 551 4 0 4 4 0 8 0 amappl7 128 127 0 112 1 0 1 1 0 8 0 amappl6 120 1426 0 1404 2 1 1 2 0 8 0 amappl5 112 807 0 794 1 0 1 1 0 8 0 amappl4 104 1421 0 1383 2 0 2 2 0 8 0 amappl3 96 102834 0 102741 3 0 3 3 0 8 0 amappl2 88 19949 0 19875 4 1 3 4 0 8 0 amappl1 80 77493 0 77002 22 10 12 22 0 8 0 amappl 88 163077 0 162792 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 135 0 5 3 0 3 3 0 8 0 uaddrrnd 24 18474 0 18116 3 0 3 3 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 18474 0 18116 3 0 3 3 0 8 0 vmmpekpl 168 122313 0 122209 5 0 5 5 0 8 0 vmmpepl 168 1099964 0 1097336 214 59 155 155 0 357 18 vmsppl 352 18473 0 18116 33 0 33 33 0 8 0 rwobjpl 24 254363 0 246433 50 0 50 50 0 8 0 pdppl 4096 36954 0 36564 1152 756 396 398 0 8 6 pvpl 32 5186739 0 5167191 452 249 203 358 0 265 15 pmappl 216 18473 0 18116 21 0 21 21 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 2014 0 1209 23 0 23 23 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(ffffffff828e4c86) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd806f91b0f0,ffffffff8282d2f4,2,fffffd806f91b19c,ffff8000378730a0,0) 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(fffffd8076e6e538,ffff800037873248,ffff8000378731e8) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 unveil_find_cover(fffffd8076e6e538,ffff80002a678818) at unveil_find_cover+0x132 sys/kern/kern_unveil.c:277 unveil_start_relative(ffff80002a678818,ffff800037873588,fffffd8076e6e538) at unveil_start_relative+0xdb sys/kern/kern_unveil.c:606 namei(ffff800037873588) at namei+0x45c sys/kern/vfs_lookup.c:237 vn_open(ffff800037873588,201,0) at vn_open+0x180 sys/kern/vfs_vnops.c:107 doopenat(ffff80002a678818,4,20000240,200,0,ffff800037873720) at doopenat+0x269 sys/kern/vfs_syscalls.c:1126 syscall(ffff8000378737d0) at syscall+0x538 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc9102e9d050, count: -12 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff828e4c86) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd806f91b0f0,ffffffff8282d2f4,2,fffffd806f91b19c,ffff8000378730a0,0) 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(fffffd8076e6e538,ffff800037873248,ffff8000378731e8) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 unveil_find_cover(fffffd8076e6e538,ffff80002a678818) at unveil_find_cover+0x132 sys/kern/kern_unveil.c:277 unveil_start_relative(ffff80002a678818,ffff800037873588,fffffd8076e6e538) at unveil_start_relative+0xdb sys/kern/kern_unveil.c:606 namei(ffff800037873588) at namei+0x45c sys/kern/vfs_lookup.c:237 vn_open(ffff800037873588,201,0) at vn_open+0x180 sys/kern/vfs_vnops.c:107 doopenat(ffff80002a678818,4,20000240,200,0,ffff800037873720) at doopenat+0x269 sys/kern/vfs_syscalls.c:1126 syscall(ffff8000378737d0) at syscall+0x538 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc9102e9d050, count: -12