panic: ufsdirhash_lookup: bad offset in hash array Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *312562 93345 0 0 0x4000000 0 syz-executor.0 db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83361078) at panic+0x1cf sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd806bb95f00,ffff80002a81d000,1,fffffd806bb95fbc,ffff80002a858f70,ffff80002a858f7c) at ufsdirhash_lookup+0xb9a sys/ufs/ufs/ufs_dirhash.c:342 ufs_lookup() at ufs_lookup+0xf66 sys/ufs/ufs/ufs_lookup.c:214 VOP_LOOKUP(fffffd807bf598b8,ffff80002a8592c8,ffff80002a8592f8) at VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 vfs_lookup(ffff80002a859298) at vfs_lookup+0x921 sys/kern/vfs_lookup.c:566 namei(ffff80002a859298) at namei+0x7ca sys/kern/vfs_lookup.c:250 dorenameat(ffff80002a7fa020,4,200000c0,3,0) at dorenameat+0x91 sys/kern/vfs_syscalls.c:2990 syscall(ffff80002a859480) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a859480) at syscall+0x962 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x225b4e29020, 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+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83361078) at panic+0x1cf sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd806bb95f00,ffff80002a81d000,1,fffffd806bb95fbc,ffff80002a858f70,ffff80002a858f7c) at ufsdirhash_lookup+0xb9a sys/ufs/ufs/ufs_dirhash.c:342 ufs_lookup() at ufs_lookup+0xf66 sys/ufs/ufs/ufs_lookup.c:214 VOP_LOOKUP(fffffd807bf598b8,ffff80002a8592c8,ffff80002a8592f8) at VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 vfs_lookup(ffff80002a859298) at vfs_lookup+0x921 sys/kern/vfs_lookup.c:566 namei(ffff80002a859298) at namei+0x7ca sys/kern/vfs_lookup.c:250 dorenameat(ffff80002a7fa020,4,200000c0,3,0) at dorenameat+0x91 sys/kern/vfs_syscalls.c:2990 syscall(ffff80002a859480) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a859480) at syscall+0x962 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x225b4e29020, count: -10 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002a858da0 rbx 0xffff800000b49b10 rdx 0x3fd rcx 0 rax 0x33 r8 0x101010101010101 r9 0x8080808080808080 r10 0x609411c8b57b3748 r11 0x5315b5c361c4b1f8 r12 0 r13 0xffff800001423a00 r14 0 r15 0x1 rip 0xffffffff81dc58d5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002a858d90 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) tid=312562 pid=93345 tcnt=2 stat=onproc flags process=0 proc=4000000 runpri=32, usrpri=50, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a7fafb0,0xffffffff83858e90 process=0xffff80002a796d08 user=0xffff80002a854000, vmspace=0xfffffd8009427a10 estcpu=36, cpticks=0, pctcpu=0.0, user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 93345 390973 59584 0 2 0 syz-executor.0 *93345 312562 59584 0 7 0x4000000 syz-executor.0 59584 378042 9775 0 3 0x82 nanoslp syz-executor.0 9775 408122 1151 0 3 0x82 thrsleep syz-execprog 9775 106845 1151 0 3 0x4000082 thrsleep syz-execprog 9775 522057 1151 0 3 0x4000082 thrsleep syz-execprog 9775 310192 1151 0 3 0x4000082 thrsleep syz-execprog 9775 223386 1151 0 3 0x4000082 thrsleep syz-execprog 9775 411742 1151 0 3 0x4000082 wait syz-execprog 9775 340018 1151 0 3 0x4000082 kqread syz-execprog 9775 250864 1151 0 3 0x4000082 thrsleep syz-execprog 9775 146254 1151 0 3 0x4000082 thrsleep syz-execprog 9775 115394 1151 0 3 0x4000082 thrsleep syz-execprog 1151 44996 81144 0 3 0x10008a sigsusp ksh 81144 3417 50904 0 3 0x98 kqread sshd-session 50904 445251 79645 0 3 0x92 kqread sshd-session 81611 311917 1 0 3 0x100083 ttyin getty 79645 3056 1 0 3 0x88 kqread sshd 49776 126321 20790 73 3 0x1100090 kqread syslogd 20790 20696 1 0 3 0x100082 sbwait syslogd 25682 63951 1 0 3 0x100080 kqread resolvd 80716 216967 82563 77 3 0x100092 kqread dhcpleased 78167 284708 82563 77 3 0x100092 kqread dhcpleased 82563 211346 1 0 3 0x80 kqread dhcpleased 95229 259688 0 0 3 0x14200 bored smr 57714 204628 0 0 2 0x14200 zerothread 14187 431424 0 0 3 0x14200 aiodoned aiodoned 64838 223495 0 0 3 0x14200 syncer update 4016 216495 0 0 3 0x14200 cleaner cleaner 84954 135747 0 0 3 0x14200 reaper reaper 72265 366435 0 0 3 0x14200 pgdaemon pagedaemon 59567 385296 0 0 3 0x14200 bored viomb 54037 520302 0 0 3 0x40014200 acpi0 acpi0 3619 268520 0 0 3 0x14200 bored softnet7 57327 43164 0 0 3 0x14200 bored softnet6 43058 184096 0 0 3 0x14200 bored softnet5 56916 321477 0 0 3 0x14200 bored softnet4 62516 333506 0 0 3 0x14200 bored softnet3 53045 331809 0 0 3 0x14200 bored softnet2 83115 499569 0 0 3 0x14200 bored softnet1 27475 309449 0 0 3 0x14200 bored softnet0 63940 437845 0 0 3 0x14200 smrbar systqmp 89903 372726 0 0 3 0x14200 bored systq 68190 53061 0 0 3 0x40014200 tmoslp softclock 87396 162761 0 0 3 0x40014200 idle0 1 174652 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 10148 11024K 11053K 166960K 11228 0 pcb 17 12K 12K 166960K 17 0 rtable 79 2K 2K 166960K 151 0 pf 16 10K 10K 166960K 19 0 ifaddr 14 2K 2K 166960K 18 0 ifgroup 22 1K 1K 166960K 27 0 sysctl 1 1K 9K 166960K 5 0 counters 25 16K 16K 166960K 26 0 ioctlops 0 0K 2K 166960K 23 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1262 79K 80K 166960K 1278 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 21 3K 3K 166960K 21 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 3 8K 12K 166960K 35 0 proc 57 58K 67K 166960K 304 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 327 0 fusefs mount 1 32K 32K 166960K 1 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 156 93K 205K 166960K 3611 0 UVM aobj 3 2K 2K 166960K 3 0 pinsyscall 26 52K 104K 166960K 1209 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 8632K 8696K 166960K 3952 0 kqueue 13 20K 20K 166960K 45 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 136 41 0 10 2 0 2 2 0 8 0 unpcb 144 67 0 52 1 0 1 1 0 8 0 syncache 336 9 0 9 1 0 1 1 0 8 1 tcpcb 736 11 0 8 1 0 1 1 0 8 0 arp 88 4 0 1 1 0 1 1 0 8 0 inpcb 328 35 0 29 1 0 1 1 0 8 0 nd6 104 4 0 2 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 189 0 46 9 0 9 9 0 8 0 art_table 40 190 0 46 2 0 2 2 0 8 0 art_node 32 41 0 12 1 0 1 1 0 8 0 dirhash 1024 20 0 0 3 0 3 3 0 8 0 dino2pl 256 1564 0 73 94 0 94 94 0 8 0 ffsino 256 1564 0 73 94 0 94 94 0 8 0 nchpl 144 1828 0 100 65 0 65 65 0 8 0 uvmvnodes 80 1573 0 0 33 0 33 33 0 8 0 vnodes 216 1573 0 0 88 0 88 88 0 8 0 namei 1024 6704 0 6703 2 0 2 2 0 8 1 kstatmem 264 10 0 2 1 0 1 1 0 8 0 scxspl 216 9539 0 9539 8 0 8 8 1 8 8 plimitpl 152 51 0 42 1 0 1 1 0 8 0 sigapl 424 402 0 366 6 0 6 6 0 8 2 knotepl 120 7343 0 7306 2 0 2 2 0 8 0 kqueuepl 184 41 0 32 1 0 1 1 0 8 0 pipepl 304 147 0 140 2 0 2 2 0 8 1 fdescpl 448 382 0 366 4 0 4 4 0 8 2 filepl 120 1887 0 1816 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 27 0 18 1 0 1 1 0 8 0 pgrppl 48 27 0 18 1 0 1 1 0 8 0 ucredpl 104 148 0 137 1 0 1 1 0 8 0 zombiepl 144 366 0 366 1 0 1 1 0 8 1 processpl 1152 402 0 366 4 0 4 4 0 8 1 procpl 664 422 0 376 5 0 5 5 0 8 0 sockpl 552 127 0 103 2 0 2 2 0 8 0 mcl8k 8192 4 0 4 1 0 1 1 0 8 1 mcl4k 4096 9947 0 9891 19 4 15 19 0 8 7 mcl2k 2048 156 0 156 1 0 1 1 0 8 1 mtagpl 96 4 0 4 1 0 1 1 0 8 1 mbufpl 256 13106 0 13036 10 0 10 10 0 8 5 bufpl 280 5007 0 177 345 0 345 345 0 8 0 anonpl 24 196342 0 192889 50 0 50 50 0 187 23 amapchunkpl 152 11764 0 11427 25 0 25 25 0 158 9 amappl16 200 4030 0 3960 5 0 5 5 0 8 1 amappl15 192 52 0 52 1 0 1 1 0 8 1 amappl14 184 180 0 169 2 0 2 2 0 8 1 amappl13 176 16 0 15 1 0 1 1 0 8 0 amappl12 168 971 0 954 2 0 2 2 0 8 1 amappl11 160 52 0 42 1 0 1 1 0 8 0 amappl10 152 49 0 46 1 0 1 1 0 8 0 amappl9 144 1055 0 1054 1 0 1 1 0 8 0 amappl8 136 167 0 148 1 0 1 1 0 8 0 amappl7 128 228 0 214 2 0 2 2 0 8 0 amappl6 120 236 0 231 1 0 1 1 0 8 0 amappl5 112 141 0 135 1 0 1 1 0 8 0 amappl4 104 454 0 435 2 0 2 2 0 8 1 amappl3 96 1206 0 1162 2 0 2 2 0 8 0 amappl2 88 1026 0 964 4 0 4 4 0 8 2 amappl1 80 14561 0 14056 29 7 22 23 0 8 10 amappl 88 2622 0 2539 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 382 0 366 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 382 0 366 1 0 1 1 0 8 0 vmmpekpl 168 11160 0 11139 2 0 2 2 0 8 0 vmmpepl 168 54310 0 52940 118 0 118 118 0 357 56 vmsppl 368 381 0 366 3 0 3 3 0 8 1 rwobjpl 40 23253 0 20907 33 0 33 33 0 8 2 pdppl 4096 771 0 732 105 42 63 63 0 8 24 pvpl 32 516758 0 508450 373 69 304 366 0 265 228 pmappl 216 381 0 366 2 0 2 2 0 8 1 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 351 0 46 9 0 9 9 0 8 0 ddb> machine ddbcpu 0 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83361078) at panic+0x1cf sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd806bb95f00,ffff80002a81d000,1,fffffd806bb95fbc,ffff80002a858f70,ffff80002a858f7c) at ufsdirhash_lookup+0xb9a sys/ufs/ufs/ufs_dirhash.c:342 ufs_lookup() at ufs_lookup+0xf66 sys/ufs/ufs/ufs_lookup.c:214 VOP_LOOKUP(fffffd807bf598b8,ffff80002a8592c8,ffff80002a8592f8) at VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 vfs_lookup(ffff80002a859298) at vfs_lookup+0x921 sys/kern/vfs_lookup.c:566 namei(ffff80002a859298) at namei+0x7ca sys/kern/vfs_lookup.c:250 dorenameat(ffff80002a7fa020,4,200000c0,3,0) at dorenameat+0x91 sys/kern/vfs_syscalls.c:2990 syscall(ffff80002a859480) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a859480) at syscall+0x962 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x225b4e29020, count: -10 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83361078) at panic+0x1cf sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd806bb95f00,ffff80002a81d000,1,fffffd806bb95fbc,ffff80002a858f70,ffff80002a858f7c) at ufsdirhash_lookup+0xb9a sys/ufs/ufs/ufs_dirhash.c:342 ufs_lookup() at ufs_lookup+0xf66 sys/ufs/ufs/ufs_lookup.c:214 VOP_LOOKUP(fffffd807bf598b8,ffff80002a8592c8,ffff80002a8592f8) at VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 vfs_lookup(ffff80002a859298) at vfs_lookup+0x921 sys/kern/vfs_lookup.c:566 namei(ffff80002a859298) at namei+0x7ca sys/kern/vfs_lookup.c:250 dorenameat(ffff80002a7fa020,4,200000c0,3,0) at dorenameat+0x91 sys/kern/vfs_syscalls.c:2990 syscall(ffff80002a859480) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a859480) at syscall+0x962 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x225b4e29020, count: -10