panic: ufsdirhash_lookup: bad offset in hash array Stopped at db_enter+0x1c: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 18323 88072 0 0 0x4000000 0 syz-executor.7 db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff828deddd) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd807e2e15b0,ffff80002a5f7000,1,fffffd807e2e165c,ffff80002d9734a0,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(fffffd80611fc7d8,ffff80002d973918,ffff80002d973948) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 vfs_lookup(ffff80002d9738e8) at vfs_lookup+0x6df sys/kern/vfs_lookup.c:566 namei(ffff80002d9738e8) at namei+0x56a sys/kern/vfs_lookup.c:250 vn_open(ffff80002d9738e8,201,1ac) at vn_open+0x180 sys/kern/vfs_vnops.c:107 doopenat(ffff80002a6e7548,4,200001c0,200,1be,ffff80002d973a80) at doopenat+0x269 sys/kern/vfs_syscalls.c:1126 syscall(ffff80002d973b30) at syscall+0x538 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xfea8320ea80, 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(ffffffff828deddd) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd807e2e15b0,ffff80002a5f7000,1,fffffd807e2e165c,ffff80002d9734a0,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(fffffd80611fc7d8,ffff80002d973918,ffff80002d973948) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 vfs_lookup(ffff80002d9738e8) at vfs_lookup+0x6df sys/kern/vfs_lookup.c:566 namei(ffff80002d9738e8) at namei+0x56a sys/kern/vfs_lookup.c:250 vn_open(ffff80002d9738e8,201,1ac) at vn_open+0x180 sys/kern/vfs_vnops.c:107 doopenat(ffff80002a6e7548,4,200001c0,200,1be,ffff80002d973a80) at doopenat+0x269 sys/kern/vfs_syscalls.c:1126 syscall(ffff80002d973b30) at syscall+0x538 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xfea8320ea80, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002d9732c0 rbx 0xffff8000006baaf0 rdx 0xffff800000e53a80 rcx 0 rax 0xffff80002a6e7548 r8 0x101010101010101 r9 0x8080808080808080 r10 0xb02c66ad2e6f3bae r11 0xc77730eb8f1d7276 r12 0 r13 0xffff800000e46200 r14 0 r15 0x1 rip 0xffffffff8275e6bc db_enter+0x1c cs 0x8 rflags 0x246 rsp 0xffff80002d9732b0 ss 0x10 db_enter+0x1c: addq $0x8,%rsp ddb> show proc PROC (syz-executor.7) tid=18323 pid=88072 tcnt=3 stat=onproc flags process=0 proc=4000000 runpri=32, usrpri=86, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 forw=0xffffffffffffffff, list=0xffff80002a6e6aa8,0xffff80002a6e7800 process=0xffff80002a63a198 user=0xffff80002d96e000, vmspace=0xfffffd8059f84058 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 13245 233094 49385 0 2 0 syz-executor.2 13245 455245 49385 0 2 0x4000000 syz-executor.2 88142 482502 46295 0 2 0 syz-executor.3 88142 200763 46295 0 3 0x4000080 fsleep syz-executor.3 24127 276044 30199 0 2 0 syz-executor.0 24127 189911 30199 0 3 0x4000080 fsleep syz-executor.0 24127 412807 30199 0 3 0x4000080 fsleep syz-executor.0 24127 205364 30199 0 3 0x4000080 fsleep syz-executor.0 94442 338651 48888 0 2 0 syz-executor.1 94442 131927 48888 0 3 0x4000080 lockf syz-executor.1 23077 476715 87102 0 2 0 syz-executor.6 23077 438566 87102 0 3 0x4000080 kqread syz-executor.6 88072 314835 70217 0 2 0 syz-executor.7 88072 2593 70217 0 2 0x4000000 syz-executor.7 *88072 18323 70217 0 7 0x4000000 syz-executor.7 70217 258762 14025 0 3 0x82 nanoslp syz-executor.7 87102 25788 14025 0 3 0x82 nanoslp syz-executor.6 49385 390099 14025 0 3 0x82 nanoslp syz-executor.2 48888 320590 14025 0 3 0x82 nanoslp syz-executor.1 48474 518909 14025 0 2 0x2 syz-executor.4 64164 290081 1 0 3 0x18100083 ttyin getty 33615 75131 14025 0 2 0x2 syz-executor.5 65241 232309 0 0 3 0x14280 nfsidl nfsio 53264 474659 0 0 3 0x14280 nfsidl nfsio 86941 221521 0 0 3 0x14280 nfsidl nfsio 38610 227019 0 0 3 0x14280 nfsidl nfsio 24789 394354 0 0 3 0x14280 nfsidl nfsio 12381 422673 0 0 3 0x14280 nfsidl nfsio 97908 287445 0 0 3 0x14280 nfsidl nfsio 53423 12316 0 0 3 0x14280 nfsidl nfsio 15077 402320 0 0 3 0x14280 nfsidl nfsio 74777 6503 0 0 3 0x14280 nfsidl nfsio 46239 306262 0 0 3 0x14280 nfsidl nfsio 3585 15055 0 0 3 0x14280 nfsidl nfsio 44996 169122 0 0 3 0x14280 nfsidl nfsio 12715 501363 0 0 3 0x14280 nfsidl nfsio 1671 184687 0 0 3 0x14280 nfsidl nfsio 26209 465832 0 0 3 0x14280 nfsidl nfsio 93407 347718 0 0 3 0x14280 nfsidl nfsio 62874 196999 0 0 3 0x14280 nfsidl nfsio 18043 406098 0 0 3 0x14280 nfsidl nfsio 38995 10735 0 0 3 0x14280 nfsidl nfsio 46295 261851 14025 0 3 0x82 nanoslp syz-executor.3 30199 94828 14025 0 3 0x82 nanoslp syz-executor.0 20398 279655 0 0 3 0x14200 acct acct 69872 38430 0 0 3 0x14200 bored sosplice 14025 483326 94189 0 3 0x1a000082 wait syz-fuzzer 14025 74386 94189 0 3 0x1e000082 nanoslp syz-fuzzer 14025 72802 94189 0 3 0x1e000082 wait syz-fuzzer 14025 326801 94189 0 3 0x1e000082 kqread syz-fuzzer 14025 423423 94189 0 3 0x1e000082 thrsleep syz-fuzzer 14025 58421 94189 0 3 0x1e000082 thrsleep syz-fuzzer 14025 289094 94189 0 3 0x1e000082 thrsleep syz-fuzzer 14025 260662 94189 0 3 0x1e000082 wait syz-fuzzer 14025 214504 94189 0 3 0x1e000082 wait syz-fuzzer 14025 222857 94189 0 3 0x1e000082 wait syz-fuzzer 14025 207929 94189 0 3 0x1e000082 thrsleep syz-fuzzer 14025 387577 94189 0 3 0x1e000082 wait syz-fuzzer 14025 298812 94189 0 3 0x1e000082 wait syz-fuzzer 14025 23610 94189 0 3 0x1e000082 wait syz-fuzzer 94189 334779 68107 0 3 0x810008a sigsusp ksh 68107 245925 90122 0 3 0x1800009a kqread sshd 90122 86670 1 0 3 0x18000088 kqread sshd 66578 521472 10932 73 3 0x19100090 kqread syslogd 10932 107177 1 0 3 0x18100082 netio syslogd 62911 130569 1 0 3 0x18100080 kqread resolvd 37310 512352 43156 77 3 0x18100092 kqread dhcpleased 25134 72319 43156 77 3 0x18100092 kqread dhcpleased 43156 389756 1 0 3 0x18000080 kqread dhcpleased 78567 462775 0 0 3 0x14200 bored smr 63984 154505 0 0 2 0x14200 zerothread 16585 48440 0 0 3 0x14200 aiodoned aiodoned 42036 293536 0 0 3 0x14200 syncer update 73332 518700 0 0 3 0x14200 cleaner cleaner 66798 384785 0 0 3 0x14200 reaper reaper 79021 120045 0 0 3 0x14200 pgdaemon pagedaemon 69238 204563 0 0 3 0x14200 bored viomb 73835 9522 0 0 3 0x40014200 acpi0 acpi0 96040 52891 0 0 3 0x14200 bored softnet3 72583 420988 0 0 3 0x14200 bored softnet2 16326 334756 0 0 3 0x14200 bored softnet1 29444 141313 0 0 3 0x14200 bored softnet0 85228 24862 0 0 3 0x14200 bored systqmp 39076 250315 0 0 3 0x14200 bored systq 85381 261957 0 0 3 0x40014200 tmoslp softclock 87750 139900 0 0 3 0x40014200 idle0 1 9334 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 6489K 7753K 166960K 43674 0 pcb 15 20K 22K 166960K 1077 0 rtable 156 9K 11K 166960K 3283 0 pf 30 9K 10K 166960K 515 0 ifaddr 67 19K 22K 166960K 537 0 ifgroup 51 2K 2K 166960K 864 0 sysctl 3 0K 0K 166960K 9 0 counters 30 17K 18K 166960K 242 0 ioctlops 0 0K 2K 166960K 845 0 iov 0 0K 32K 166960K 1492 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1563 98K 99K 166960K 10913 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 9K 166960K 120 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 1K 166960K 2430 0 dirhash 93 16K 17K 166960K 6696 0 ACPI 1697 195K 286K 166960K 12548 0 file desc 16 57K 77K 166960K 13725 0 sigio 0 0K 0K 166960K 675 0 proc 58 59K 91K 166960K 2883 0 subproc 104 6K 7K 166960K 1027 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 488 0 in_multi 56 4K 7K 166960K 1046 0 ether_multi 1 0K 0K 166960K 10 0 mrt 1 0K 0K 166960K 4 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 241 1076K 1076K 166960K 241 0 exec 0 0K 1K 166960K 3232 0 pfkey data 0 0K 0K 166960K 13 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 467 628K 645K 166960K 124521 0 UVM aobj 131 4K 4K 166960K 135 0 pinsyscall 22 44K 100K 166960K 3601 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 408 0 NDP 11 0K 2K 166960K 391 0 temp 74 6804K 7440K 166960K 122427 0 kqueue 14 18K 29K 166960K 892 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 783 0 780 4 3 1 3 0 8 0 rtentry 112 1037 0 969 5 1 4 4 0 8 0 unpcb 144 12075 0 12029 22 16 6 10 0 8 4 syncache 336 144 0 144 3 2 1 1 0 8 1 sackhl 24 2 0 2 2 1 1 1 0 8 1 tcpqe 32 382 0 382 3 2 1 1 0 8 1 tcpcb 808 4199 0 4184 26 20 6 17 0 8 3 arp 88 186 0 176 1 0 1 1 0 8 0 ipq 40 50 0 50 3 2 1 1 0 8 1 ipqe 40 113 0 113 3 2 1 1 0 8 1 inpcb 360 10839 0 10820 48 39 9 17 0 8 7 nd6 104 250 0 238 1 0 1 1 0 8 0 pkpcb 40 36 0 36 2 1 1 1 0 8 1 kcovpl 48 79 0 71 1 0 1 1 0 8 0 ppxss 1072 48 0 48 3 2 1 1 0 8 1 art_heap8 4096 4 0 2 3 0 3 3 0 8 1 art_heap4 256 4070 0 3781 47 15 32 32 0 8 8 art_table 32 4074 0 3783 5 0 5 5 0 8 1 art_node 16 1023 0 961 1 0 1 1 0 8 0 sysvmsgpl 40 2 0 2 1 1 0 1 0 8 0 semupl 112 3 0 3 1 1 0 1 0 8 0 semapl 112 2425 0 2415 1 0 1 1 0 8 0 shmpl 112 132 0 4 4 0 4 4 0 8 0 dirhash 1024 2259 0 2215 6 0 6 6 0 8 0 dino2pl 256 19417 0 17820 101 0 101 101 0 8 0 ffsino 240 19417 0 17820 95 0 95 95 0 8 0 nchpl 144 37534 0 35811 66 0 66 66 0 8 0 uvmvnodes 80 6244 0 0 128 0 128 128 0 8 0 vnodes 216 6244 0 0 347 0 347 347 0 8 0 namei 1024 137958 0 137957 4 3 1 2 0 8 0 vcpupl 2048 93 0 0 12 0 12 12 0 8 0 vmpool 664 107 0 14 8 0 8 8 0 8 0 kstatmem 264 446 0 424 3 1 2 3 0 8 0 scxspl 216 112398 0 112398 13 10 3 8 1 8 3 plimitpl 152 2371 0 2355 1 0 1 1 0 8 0 sigapl 424 13994 0 13929 8 0 8 8 0 8 0 futexpl 64 126598 0 126594 1 0 1 1 0 8 0 knotepl 120 120188 0 120105 42 31 11 18 0 8 7 kqueuepl 184 2410 0 2400 10 6 4 7 0 8 3 pipepl 288 2704 0 2676 19 12 7 11 0 8 4 fdescpl 432 13855 0 13828 4 0 4 4 0 8 0 filepl 120 89200 0 88915 29 14 15 17 0 8 6 lockfpl 104 4183 0 4178 4 2 2 2 0 8 1 lockfspl 48 1216 0 1213 1 0 1 1 0 8 0 sessionpl 144 96 0 80 1 0 1 1 0 8 0 pgrppl 48 341 0 325 1 0 1 1 0 8 0 ucredpl 104 13779 0 13769 1 0 1 1 0 8 0 zombiepl 144 13929 0 13929 2 1 1 1 0 8 1 processpl 1072 13994 0 13929 5 0 5 5 0 8 0 procpl 680 33180 0 33093 10 1 9 9 0 8 1 sosppl 168 148 0 146 1 0 1 1 0 8 0 sockpl 488 23754 0 23686 363 349 14 40 0 8 5 mcl64k 65536 519 0 519 3 2 1 1 0 8 1 mcl16k 16384 273 0 273 3 2 1 1 0 8 1 mcl12k 12288 579 0 579 3 2 1 1 0 8 1 mcl9k 9216 213 0 213 3 2 1 1 0 8 1 mcl8k 8192 938 0 937 2 1 1 1 0 8 0 mcl4k 4096 1448 0 1448 4 3 1 2 0 8 1 mcl2k2 2112 95 0 95 3 2 1 1 0 8 1 mcl2k 2048 98869 0 98823 56 42 14 33 0 8 7 mtagpl 96 3813 0 3541 21 9 12 16 0 8 0 mbufpl 256 271768 0 271417 270 221 49 107 0 8 8 bufpl 280 26818 0 20463 455 0 455 455 0 8 0 anonpl 24 1376783 0 1362852 172 70 102 156 0 188 1 amapchunkpl 152 393269 0 392394 82 33 49 66 0 158 11 amappl16 200 27620 0 27148 94 62 32 49 0 8 6 amappl15 192 101 0 100 1 0 1 1 0 8 0 amappl14 184 367 0 356 2 1 1 2 0 8 0 amappl13 176 27 0 27 3 2 1 1 0 8 1 amappl12 168 15592 0 15557 2 0 2 2 0 8 0 amappl11 160 58 0 48 1 0 1 1 0 8 0 amappl10 152 120 0 112 1 0 1 1 0 8 0 amappl9 144 226 0 224 1 0 1 1 0 8 0 amappl8 136 563 0 470 4 0 4 4 0 8 0 amappl7 128 97 0 83 1 0 1 1 0 8 0 amappl6 120 1268 0 1252 2 1 1 2 0 8 0 amappl5 112 676 0 663 1 0 1 1 0 8 0 amappl4 104 1178 0 1144 3 2 1 2 0 8 0 amappl3 96 77325 0 77244 3 0 3 3 0 8 0 amappl2 88 14968 0 14892 4 2 2 4 0 8 0 amappl1 80 62373 0 61870 23 10 13 22 0 8 0 amappl 88 123073 0 122806 7 0 7 7 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 134 0 4 3 0 3 3 0 8 0 uaddrrnd 24 13962 0 13842 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 13962 0 13842 1 0 1 1 0 8 0 vmmpekpl 168 97639 0 97564 4 0 4 4 0 8 0 vmmpepl 168 843814 0 841381 177 41 136 137 0 357 9 vmsppl 352 13961 0 13842 12 0 12 12 0 8 0 rwobjpl 24 196302 0 188372 50 1 49 49 0 8 0 pdppl 4096 27930 0 27777 813 656 157 157 0 8 4 pvpl 32 3859545 0 3839906 515 329 186 388 0 265 1 pmappl 216 13961 0 13842 7 0 7 7 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 1480 0 982 15 0 15 15 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(ffffffff828deddd) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd807e2e15b0,ffff80002a5f7000,1,fffffd807e2e165c,ffff80002d9734a0,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(fffffd80611fc7d8,ffff80002d973918,ffff80002d973948) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 vfs_lookup(ffff80002d9738e8) at vfs_lookup+0x6df sys/kern/vfs_lookup.c:566 namei(ffff80002d9738e8) at namei+0x56a sys/kern/vfs_lookup.c:250 vn_open(ffff80002d9738e8,201,1ac) at vn_open+0x180 sys/kern/vfs_vnops.c:107 doopenat(ffff80002a6e7548,4,200001c0,200,1be,ffff80002d973a80) at doopenat+0x269 sys/kern/vfs_syscalls.c:1126 syscall(ffff80002d973b30) at syscall+0x538 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xfea8320ea80, 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(ffffffff828deddd) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd807e2e15b0,ffff80002a5f7000,1,fffffd807e2e165c,ffff80002d9734a0,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(fffffd80611fc7d8,ffff80002d973918,ffff80002d973948) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 vfs_lookup(ffff80002d9738e8) at vfs_lookup+0x6df sys/kern/vfs_lookup.c:566 namei(ffff80002d9738e8) at namei+0x56a sys/kern/vfs_lookup.c:250 vn_open(ffff80002d9738e8,201,1ac) at vn_open+0x180 sys/kern/vfs_vnops.c:107 doopenat(ffff80002a6e7548,4,200001c0,200,1be,ffff80002d973a80) at doopenat+0x269 sys/kern/vfs_syscalls.c:1126 syscall(ffff80002d973b30) at syscall+0x538 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xfea8320ea80, count: -11