panic: ufsdirhash_lookup: bad offset in hash array Stopped at db_enter+0x1c: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *277866 73913 0 0 0x4000000 0 syz-executor.0 db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff8295cacb) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd8069c44e18,ffffffff82933401,2,fffffd8069c44ec4,ffff80002a6dd4d8,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(fffffd806b466898,ffff80002a6dd678,ffff80002a6dd618) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 unveil_find_cover(fffffd806b466898,ffff80002a5f92b0) at unveil_find_cover+0x130 sys/kern/kern_unveil.c:277 unveil_start_relative(ffff80002a5f92b0,ffff80002a6dd9b8,fffffd806b466898) at unveil_start_relative+0xf6 sys/kern/kern_unveil.c:606 namei(ffff80002a6dd9b8) at namei+0x453 sys/kern/vfs_lookup.c:237 vn_open(ffff80002a6dd9b8,201,0) at vn_open+0x17b sys/kern/vfs_vnops.c:107 doopenat(ffff80002a5f92b0,4,20000240,200,0,ffff80002a6ddb60) at doopenat+0x26e sys/kern/vfs_syscalls.c:1126 syscall(ffff80002a6ddc10) at syscall+0x751 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x12fa6883220, 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(ffffffff8295cacb) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd8069c44e18,ffffffff82933401,2,fffffd8069c44ec4,ffff80002a6dd4d8,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(fffffd806b466898,ffff80002a6dd678,ffff80002a6dd618) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 unveil_find_cover(fffffd806b466898,ffff80002a5f92b0) at unveil_find_cover+0x130 sys/kern/kern_unveil.c:277 unveil_start_relative(ffff80002a5f92b0,ffff80002a6dd9b8,fffffd806b466898) at unveil_start_relative+0xf6 sys/kern/kern_unveil.c:606 namei(ffff80002a6dd9b8) at namei+0x453 sys/kern/vfs_lookup.c:237 vn_open(ffff80002a6dd9b8,201,0) at vn_open+0x17b sys/kern/vfs_vnops.c:107 doopenat(ffff80002a5f92b0,4,20000240,200,0,ffff80002a6ddb60) at doopenat+0x26e sys/kern/vfs_syscalls.c:1126 syscall(ffff80002a6ddc10) at syscall+0x751 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x12fa6883220, count: -12 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002a6dd300 rbx 0 rdx 0 rcx 0 rax 0xffff80002a5f92b0 r8 0x101010101010101 r9 0x8080808080808080 r10 0xed917b39b35d0046 r11 0x75787624c473032b r12 0 r13 0xffff8000006ba8e0 r14 0 r15 0x1 rip 0xffffffff81b5a3dc db_enter+0x1c cs 0x8 rflags 0x246 rsp 0xffff80002a6dd2f0 ss 0x10 db_enter+0x1c: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) tid=277866 pid=73913 tcnt=2 stat=onproc flags process=0 proc=4000000 runpri=32, usrpri=55, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 forw=0xffffffffffffffff, list=0xffff80002a5f8d60,0xffffffff82dda5b8 process=0xffff8000ffff65c0 user=0xffff80002a6d8000, vmspace=0xfffffd806f1af428 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 73913 165517 56781 0 2 0 syz-executor.0 *73913 277866 56781 0 7 0x4000000 syz-executor.0 56781 94045 84595 0 3 0x82 nanoslp syz-executor.0 84595 40426 23194 0 3 0x2000082 thrsleep syz-execprog 84595 256964 23194 0 2 0x6000482 syz-execprog 84595 347270 23194 0 3 0x6000082 thrsleep syz-execprog 84595 379684 23194 0 3 0x6000082 thrsleep syz-execprog 84595 10832 23194 0 3 0x6000082 thrsleep syz-execprog 84595 164803 23194 0 3 0x6000082 wait syz-execprog 84595 333381 23194 0 3 0x6000082 thrsleep syz-execprog 84595 78005 23194 0 3 0x6000082 kqread syz-execprog 84595 26141 23194 0 3 0x6000082 thrsleep syz-execprog 23194 447262 80986 0 3 0x10008a sigsusp ksh 80986 79107 23765 0 3 0x9a kqread sshd 896 139281 1 0 3 0x100083 ttyin getty 23765 447055 1 0 3 0x88 kqread sshd 59280 433122 4452 73 3 0x1100090 kqread syslogd 4452 416532 1 0 3 0x100082 netio syslogd 35871 294619 1 0 3 0x100080 kqread resolvd 24043 185282 12941 77 3 0x100092 kqread dhcpleased 67345 382888 12941 77 3 0x100092 kqread dhcpleased 12941 29508 1 0 3 0x80 kqread dhcpleased 93169 435613 0 0 3 0x14200 bored smr 42045 173186 0 0 2 0x14200 zerothread 98371 85310 0 0 3 0x14200 aiodoned aiodoned 40059 402279 0 0 3 0x14200 syncer update 69050 105446 0 0 3 0x14200 cleaner cleaner 97063 365593 0 0 3 0x14200 reaper reaper 97199 472458 0 0 3 0x14200 pgdaemon pagedaemon 25764 282577 0 0 3 0x14200 bored viomb 3164 493408 0 0 3 0x40014200 acpi0 acpi0 20214 218258 0 0 3 0x14200 bored softnet3 85176 356972 0 0 3 0x14200 bored softnet2 66035 301088 0 0 3 0x14200 bored softnet1 84348 189949 0 0 3 0x14200 bored softnet0 26513 494910 0 0 3 0x14200 bored systqmp 95703 324032 0 0 3 0x14200 bored systq 49908 87845 0 0 3 0x40014200 tmoslp softclock 7241 9610 0 0 3 0x40014200 idle0 1 107238 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 10140 6384K 6413K 166960K 11221 0 pcb 15 10K 10K 166960K 15 0 rtable 80 2K 2K 166960K 172 0 pf 15 6K 6K 166960K 18 0 ifaddr 15 6K 6K 166960K 19 0 ifgroup 22 1K 1K 166960K 27 0 counters 23 16K 16K 166960K 24 0 ioctlops 0 0K 2K 166960K 23 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1187 74K 74K 166960K 1200 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 1K 166960K 2 0 VM map 2 1K 1K 166960K 2 0 sem 2 0K 0K 166960K 2 0 dirhash 30 5K 5K 166960K 30 0 ACPI 1697 195K 286K 166960K 12548 0 file desc 4 9K 13K 166960K 37 0 proc 56 66K 67K 166960K 303 0 subproc 0 0K 0K 166960K 13 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 in_multi 22 1K 1K 166960K 33 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 25 122K 122K 166960K 25 0 exec 0 0K 1K 166960K 316 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 145 14K 17K 166960K 3564 0 UVM aobj 3 2K 2K 166960K 3 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 NDP 6 0K 0K 166960K 9 0 temp 1 6748K 6812K 166960K 3919 0 kqueue 12 18K 18K 166960K 34 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 25 0 22 1 0 1 1 0 8 0 rtentry 112 45 0 12 1 0 1 1 0 8 0 unpcb 144 45 0 32 1 0 1 1 0 8 0 syncache 336 8 0 8 1 0 1 1 0 8 1 tcpqe 32 218 0 218 1 0 1 1 0 8 1 tcpcb 808 12 0 8 1 0 1 1 0 8 0 arp 88 6 0 2 1 0 1 1 0 8 0 inpcb 360 38 0 31 1 0 1 1 0 8 0 nd6 104 6 0 3 1 0 1 1 0 8 0 kcovpl 48 1 0 1 1 0 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 193 0 48 10 0 10 10 0 8 0 art_table 32 194 0 48 2 0 2 2 0 8 0 art_node 16 44 0 14 1 0 1 1 0 8 0 dirhash 1024 23 0 0 3 0 3 3 0 8 0 dino2pl 256 1478 0 70 89 0 89 89 0 8 1 ffsino 240 1478 0 70 83 0 83 83 0 8 0 nchpl 144 1736 0 100 61 0 61 61 0 8 0 uvmvnodes 80 1500 0 0 31 0 31 31 0 8 0 vnodes 216 1500 0 0 84 0 84 84 0 8 0 namei 1024 6376 0 6375 3 0 3 3 0 8 2 kstatmem 264 10 0 2 1 0 1 1 0 8 0 scxspl 216 7562 0 7562 8 0 8 8 1 8 8 plimitpl 152 42 0 34 1 0 1 1 0 8 0 sigapl 424 386 0 355 5 0 5 5 0 8 1 futexpl 64 13 0 13 1 0 1 1 0 8 1 knotepl 120 7097 0 7061 2 0 2 2 0 8 0 kqueuepl 184 30 0 22 1 0 1 1 0 8 0 pipepl 288 155 0 148 1 0 1 1 0 8 0 fdescpl 432 370 0 355 3 0 3 3 0 8 1 filepl 120 1830 0 1762 3 0 3 3 0 8 0 lockfpl 104 6 0 4 1 0 1 1 0 8 0 lockfspl 48 4 0 2 1 0 1 1 0 8 0 sessionpl 144 25 0 16 1 0 1 1 0 8 0 pgrppl 48 25 0 16 1 0 1 1 0 8 0 ucredpl 104 93 0 83 1 0 1 1 0 8 0 zombiepl 144 355 0 355 1 0 1 1 0 8 1 processpl 1072 386 0 355 3 0 3 3 0 8 0 procpl 680 406 0 366 5 0 5 5 0 8 1 sockpl 488 108 0 85 4 0 4 4 0 8 0 mcl8k 8192 4 0 4 1 0 1 1 0 8 1 mcl4k 4096 16 0 16 1 0 1 1 0 8 1 mcl2k 2048 21083 0 21034 68 53 15 46 0 8 8 mtagpl 96 4 0 4 1 0 1 1 0 8 1 mbufpl 256 33892 0 33828 32 19 13 24 0 8 8 bufpl 280 4747 0 140 330 0 330 330 0 8 0 anonpl 24 315911 0 312513 55 0 55 55 0 188 22 amapchunkpl 152 14556 0 14222 27 0 27 27 0 158 13 amappl16 200 8644 0 8579 5 0 5 5 0 8 1 amappl15 192 24 0 23 1 0 1 1 0 8 0 amappl14 184 206 0 195 2 0 2 2 0 8 1 amappl13 176 18 0 18 1 0 1 1 0 8 1 amappl12 168 942 0 926 2 0 2 2 0 8 1 amappl11 160 63 0 51 1 0 1 1 0 8 0 amappl10 152 36 0 33 1 0 1 1 0 8 0 amappl9 144 327 0 327 1 0 1 1 0 8 1 amappl8 136 209 0 191 2 0 2 2 0 8 1 amappl7 128 219 0 203 2 0 2 2 0 8 0 amappl6 120 186 0 181 1 0 1 1 0 8 0 amappl5 112 171 0 163 1 0 1 1 0 8 0 amappl4 104 530 0 509 2 0 2 2 0 8 1 amappl3 96 3545 0 3504 2 0 2 2 0 8 0 amappl2 88 977 0 923 3 0 3 3 0 8 0 amappl1 80 13593 0 13140 25 7 18 22 0 8 7 amappl 88 2965 0 2878 4 0 4 4 0 92 0 dma4096 4096 1 0 1 1 0 1 1 0 8 1 dma1024 1024 1 0 0 1 0 1 1 0 8 0 dma256 256 6 0 6 1 0 1 1 0 8 1 dma128 128 253 0 253 1 0 1 1 0 8 1 dma64 64 6 0 6 1 0 1 1 0 8 1 dma32 32 7 0 7 1 0 1 1 0 8 1 dma16 16 18 0 17 1 0 1 1 0 8 0 aobjpl 72 2 0 0 1 0 1 1 0 8 0 uaddrrnd 24 370 0 355 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 370 0 355 1 0 1 1 0 8 0 vmmpekpl 168 13244 0 13220 2 0 2 2 0 8 0 vmmpepl 168 58693 0 57517 113 0 113 113 0 357 54 vmsppl 352 369 0 355 3 0 3 3 0 8 1 rwobjpl 24 29181 0 26894 20 0 20 20 0 8 1 pdppl 4096 746 0 710 90 38 52 60 0 8 16 pvpl 32 608993 0 601575 362 63 299 362 0 265 223 pmappl 216 369 0 355 2 0 2 2 0 8 1 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 392 0 110 9 0 9 9 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(ffffffff8295cacb) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd8069c44e18,ffffffff82933401,2,fffffd8069c44ec4,ffff80002a6dd4d8,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(fffffd806b466898,ffff80002a6dd678,ffff80002a6dd618) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 unveil_find_cover(fffffd806b466898,ffff80002a5f92b0) at unveil_find_cover+0x130 sys/kern/kern_unveil.c:277 unveil_start_relative(ffff80002a5f92b0,ffff80002a6dd9b8,fffffd806b466898) at unveil_start_relative+0xf6 sys/kern/kern_unveil.c:606 namei(ffff80002a6dd9b8) at namei+0x453 sys/kern/vfs_lookup.c:237 vn_open(ffff80002a6dd9b8,201,0) at vn_open+0x17b sys/kern/vfs_vnops.c:107 doopenat(ffff80002a5f92b0,4,20000240,200,0,ffff80002a6ddb60) at doopenat+0x26e sys/kern/vfs_syscalls.c:1126 syscall(ffff80002a6ddc10) at syscall+0x751 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x12fa6883220, 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(ffffffff8295cacb) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd8069c44e18,ffffffff82933401,2,fffffd8069c44ec4,ffff80002a6dd4d8,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(fffffd806b466898,ffff80002a6dd678,ffff80002a6dd618) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 unveil_find_cover(fffffd806b466898,ffff80002a5f92b0) at unveil_find_cover+0x130 sys/kern/kern_unveil.c:277 unveil_start_relative(ffff80002a5f92b0,ffff80002a6dd9b8,fffffd806b466898) at unveil_start_relative+0xf6 sys/kern/kern_unveil.c:606 namei(ffff80002a6dd9b8) at namei+0x453 sys/kern/vfs_lookup.c:237 vn_open(ffff80002a6dd9b8,201,0) at vn_open+0x17b sys/kern/vfs_vnops.c:107 doopenat(ffff80002a5f92b0,4,20000240,200,0,ffff80002a6ddb60) at doopenat+0x26e sys/kern/vfs_syscalls.c:1126 syscall(ffff80002a6ddc10) at syscall+0x751 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x12fa6883220, count: -12