panic: ufsdirhash_lookup: bad offset in hash array Stopped at db_enter+0x1c: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *485000 12819 0 0x8000000 0x4000000 0 syz-executor.0 db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff828ec595) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd80688f3690,ffffffff8282f53d,2,fffffd80688f373c,ffff80002a6857d0,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(fffffd8069821558,ffff80002a685978,ffff80002a685918) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 unveil_find_cover(fffffd8069821558,ffff80002a62a018) at unveil_find_cover+0x132 sys/kern/kern_unveil.c:277 unveil_start_relative(ffff80002a62a018,ffff80002a685cb8,fffffd8069821558) at unveil_start_relative+0xdb sys/kern/kern_unveil.c:606 namei(ffff80002a685cb8) at namei+0x45c sys/kern/vfs_lookup.c:237 vn_open(ffff80002a685cb8,201,0) at vn_open+0x180 sys/kern/vfs_vnops.c:107 doopenat(ffff80002a62a018,4,20000240,200,0,ffff80002a685e60) at doopenat+0x269 sys/kern/vfs_syscalls.c:1126 syscall(ffff80002a685f10) at syscall+0x72a sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x5cf6cc0d710, 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(ffffffff828ec595) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd80688f3690,ffffffff8282f53d,2,fffffd80688f373c,ffff80002a6857d0,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(fffffd8069821558,ffff80002a685978,ffff80002a685918) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 unveil_find_cover(fffffd8069821558,ffff80002a62a018) at unveil_find_cover+0x132 sys/kern/kern_unveil.c:277 unveil_start_relative(ffff80002a62a018,ffff80002a685cb8,fffffd8069821558) at unveil_start_relative+0xdb sys/kern/kern_unveil.c:606 namei(ffff80002a685cb8) at namei+0x45c sys/kern/vfs_lookup.c:237 vn_open(ffff80002a685cb8,201,0) at vn_open+0x180 sys/kern/vfs_vnops.c:107 doopenat(ffff80002a62a018,4,20000240,200,0,ffff80002a685e60) at doopenat+0x269 sys/kern/vfs_syscalls.c:1126 syscall(ffff80002a685f10) at syscall+0x72a sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x5cf6cc0d710, count: -12 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002a6855f0 rbx 0xffff8000006bae20 rdx 0 rcx 0 rax 0xffff80002a62a018 r8 0x101010101010101 r9 0x8080808080808080 r10 0x705bd130116e173f r11 0xa9efb5b1d88e7f73 r12 0 r13 0xffff800000dcb000 r14 0 r15 0x1 rip 0xffffffff8174242c db_enter+0x1c cs 0x8 rflags 0x246 rsp 0xffff80002a6855e0 ss 0x10 db_enter+0x1c: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) tid=485000 pid=12819 tcnt=2 stat=onproc flags process=8000000 proc=4000000 runpri=32, usrpri=50, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 forw=0xffffffffffffffff, list=0xffff80002a62b208,0xffffffff82dfae90 process=0xffff8000ffff5500 user=0xffff80002a680000, vmspace=0xfffffd807b2276c0 estcpu=36, cpticks=0, pctcpu=0.0, user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 12819 238314 32836 0 2 0x8000000 syz-executor.0 *12819 485000 32836 0 7 0xc000000 syz-executor.0 32836 81821 61836 0 2 0x8000482 syz-executor.0 61836 13671 61462 0 3 0x1a000082 thrsleep syz-execprog 61836 446476 61462 0 3 0x1e000082 thrsleep syz-execprog 61836 502896 61462 0 3 0x1e000082 thrsleep syz-execprog 61836 325292 61462 0 3 0x1e000082 thrsleep syz-execprog 61836 38799 61462 0 3 0x1e000082 kqread syz-execprog 61836 425749 61462 0 3 0x1e000082 wait syz-execprog 61836 364012 61462 0 3 0x1e000082 thrsleep syz-execprog 61836 458419 61462 0 3 0x1e000082 thrsleep syz-execprog 61836 310433 61462 0 3 0x1e000082 thrsleep syz-execprog 61462 346027 8441 0 3 0x810008a sigsusp ksh 8441 247360 13517 0 3 0x1800009a kqread sshd 38991 178027 1 0 3 0x18100083 ttyin getty 13517 504312 1 0 3 0x18000088 kqread sshd 34726 171712 56855 73 3 0x19100090 kqread syslogd 56855 155656 1 0 3 0x18100082 sbwait syslogd 53726 420104 1 0 3 0x18100080 kqread resolvd 44809 116398 35102 77 3 0x18100092 kqread dhcpleased 12566 148332 35102 77 3 0x18100092 kqread dhcpleased 35102 357892 1 0 3 0x18000080 kqread dhcpleased 48426 223246 0 0 3 0x14200 bored smr 58310 120358 0 0 2 0x14200 zerothread 61276 154907 0 0 3 0x14200 aiodoned aiodoned 57596 105825 0 0 3 0x14200 syncer update 34692 211732 0 0 3 0x14200 cleaner cleaner 81511 312362 0 0 3 0x14200 reaper reaper 62119 231354 0 0 3 0x14200 pgdaemon pagedaemon 88829 140259 0 0 3 0x14200 bored viomb 49552 394880 0 0 3 0x40014200 acpi0 acpi0 88439 355222 0 0 3 0x14200 bored softnet3 12779 215995 0 0 3 0x14200 bored softnet2 94956 84803 0 0 3 0x14200 bored softnet1 75230 137580 0 0 3 0x14200 bored softnet0 5067 307592 0 0 3 0x14200 bored systqmp 47016 512821 0 0 3 0x14200 bored systq 95788 378294 0 0 3 0x40014200 tmoslp softclock 658 476652 0 0 3 0x40014200 idle0 1 228836 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 10134 6384K 6412K 166960K 11215 0 pcb 17 12K 12K 166960K 17 0 rtable 80 2K 2K 166960K 170 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 1272 80K 80K 166960K 1288 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 3 8K 12K 166960K 35 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 313 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 159 14K 14K 166960K 3558 0 UVM aobj 3 2K 2K 166960K 3 0 pinsyscall 24 48K 100K 166960K 1143 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 6796K 6860K 166960K 3719 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 24 0 21 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 tcpcb 808 12 0 9 1 0 1 1 0 8 0 arp 88 6 0 2 1 0 1 1 0 8 0 inpcb 352 38 0 32 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 1558 0 73 93 0 93 93 0 8 0 ffsino 240 1558 0 73 88 0 88 88 0 8 0 nchpl 144 1821 0 101 64 0 64 64 0 8 0 uvmvnodes 80 1580 0 0 33 0 33 33 0 8 0 vnodes 216 1580 0 0 88 0 88 88 0 8 0 namei 1024 6557 0 6556 3 0 3 3 0 8 2 kstatmem 264 10 0 2 1 0 1 1 0 8 0 scxspl 216 7902 0 7902 8 0 8 8 1 8 8 plimitpl 152 42 0 34 1 0 1 1 0 8 0 sigapl 424 383 0 352 5 0 5 5 0 8 1 futexpl 64 13 0 13 1 0 1 1 0 8 1 knotepl 120 6082 0 6046 2 0 2 2 0 8 0 kqueuepl 184 30 0 22 1 0 1 1 0 8 0 pipepl 288 154 0 147 1 0 1 1 0 8 0 fdescpl 432 367 0 352 3 0 3 3 0 8 1 filepl 120 1858 0 1790 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 352 0 352 1 0 1 1 0 8 1 processpl 1072 383 0 352 3 0 3 3 0 8 0 procpl 656 403 0 363 5 0 5 5 0 8 1 sockpl 504 107 0 85 3 0 3 3 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 21648 0 21546 77 55 22 55 0 8 8 mtagpl 96 4 0 4 1 0 1 1 0 8 1 mbufpl 256 34427 0 34311 35 18 17 28 0 8 8 bufpl 280 4900 0 182 337 0 337 337 0 8 0 anonpl 24 337492 0 334078 49 0 49 49 0 188 18 amapchunkpl 152 14551 0 14211 26 0 26 26 0 158 10 amappl16 200 10139 0 10078 5 0 5 5 0 8 1 amappl15 192 27 0 27 1 0 1 1 0 8 1 amappl14 184 202 0 190 2 0 2 2 0 8 0 amappl13 176 33 0 32 1 0 1 1 0 8 0 amappl12 168 944 0 929 2 0 2 2 0 8 1 amappl11 160 81 0 71 1 0 1 1 0 8 0 amappl10 152 77 0 74 1 0 1 1 0 8 0 amappl9 144 282 0 282 1 0 1 1 0 8 1 amappl8 136 122 0 105 1 0 1 1 0 8 0 amappl7 128 84 0 80 1 0 1 1 0 8 0 amappl6 120 325 0 312 2 0 2 2 0 8 0 amappl5 112 182 0 169 1 0 1 1 0 8 0 amappl4 104 651 0 620 2 0 2 2 0 8 0 amappl3 96 3742 0 3703 2 0 2 2 0 8 0 amappl2 88 939 0 880 4 0 4 4 0 8 1 amappl1 80 13700 0 13261 25 7 18 22 0 8 7 amappl 88 2896 0 2804 4 0 4 4 0 92 1 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 367 0 352 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 367 0 352 1 0 1 1 0 8 0 vmmpekpl 168 11699 0 11678 2 0 2 2 0 8 0 vmmpepl 168 61300 0 60121 110 0 110 110 0 357 53 vmsppl 344 366 0 352 3 0 3 3 0 8 1 rwobjpl 24 31212 0 28852 20 0 20 20 0 8 2 pdppl 4096 740 0 704 92 40 52 60 0 8 16 pvpl 32 649574 0 642117 356 58 298 356 0 265 222 pmappl 216 366 0 352 2 0 2 2 0 8 1 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 413 0 113 10 0 10 10 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(ffffffff828ec595) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd80688f3690,ffffffff8282f53d,2,fffffd80688f373c,ffff80002a6857d0,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(fffffd8069821558,ffff80002a685978,ffff80002a685918) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 unveil_find_cover(fffffd8069821558,ffff80002a62a018) at unveil_find_cover+0x132 sys/kern/kern_unveil.c:277 unveil_start_relative(ffff80002a62a018,ffff80002a685cb8,fffffd8069821558) at unveil_start_relative+0xdb sys/kern/kern_unveil.c:606 namei(ffff80002a685cb8) at namei+0x45c sys/kern/vfs_lookup.c:237 vn_open(ffff80002a685cb8,201,0) at vn_open+0x180 sys/kern/vfs_vnops.c:107 doopenat(ffff80002a62a018,4,20000240,200,0,ffff80002a685e60) at doopenat+0x269 sys/kern/vfs_syscalls.c:1126 syscall(ffff80002a685f10) at syscall+0x72a sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x5cf6cc0d710, 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(ffffffff828ec595) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd80688f3690,ffffffff8282f53d,2,fffffd80688f373c,ffff80002a6857d0,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(fffffd8069821558,ffff80002a685978,ffff80002a685918) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 unveil_find_cover(fffffd8069821558,ffff80002a62a018) at unveil_find_cover+0x132 sys/kern/kern_unveil.c:277 unveil_start_relative(ffff80002a62a018,ffff80002a685cb8,fffffd8069821558) at unveil_start_relative+0xdb sys/kern/kern_unveil.c:606 namei(ffff80002a685cb8) at namei+0x45c sys/kern/vfs_lookup.c:237 vn_open(ffff80002a685cb8,201,0) at vn_open+0x180 sys/kern/vfs_vnops.c:107 doopenat(ffff80002a62a018,4,20000240,200,0,ffff80002a685e60) at doopenat+0x269 sys/kern/vfs_syscalls.c:1126 syscall(ffff80002a685f10) at syscall+0x72a sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x5cf6cc0d710, count: -12