panic: ufsdirhash_lookup: bad offset in hash array Stopped at db_enter+0x1c: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *416939 3094 0 0 0x4000000 0 syz-executor.7 db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82911433) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd8069462b40,ffff80002a62f800,10,fffffd8069462bec,ffff800037802908,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(fffffd806e0e00d8,ffff800037802d88,ffff800037802db8) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 vfs_lookup(ffff800037802d58) at vfs_lookup+0x6dc sys/kern/vfs_lookup.c:566 namei(ffff800037802d58) at namei+0x55a sys/kern/vfs_lookup.c:250 vn_open(ffff800037802d58,201,0) at vn_open+0x17b sys/kern/vfs_vnops.c:107 doopenat(ffff80002a687d58,4,200003c0,200,0,ffff800037802f00) at doopenat+0x26e sys/kern/vfs_syscalls.c:1126 syscall(ffff800037802fb0) at syscall+0x751 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xd6b2403a5b0, 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(ffffffff82911433) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd8069462b40,ffff80002a62f800,10,fffffd8069462bec,ffff800037802908,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(fffffd806e0e00d8,ffff800037802d88,ffff800037802db8) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 vfs_lookup(ffff800037802d58) at vfs_lookup+0x6dc sys/kern/vfs_lookup.c:566 namei(ffff800037802d58) at namei+0x55a sys/kern/vfs_lookup.c:250 vn_open(ffff800037802d58,201,0) at vn_open+0x17b sys/kern/vfs_vnops.c:107 doopenat(ffff80002a687d58,4,200003c0,200,0,ffff800037802f00) at doopenat+0x26e sys/kern/vfs_syscalls.c:1126 syscall(ffff800037802fb0) at syscall+0x751 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xd6b2403a5b0, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800037802730 rbx 0 rdx 0xffff800000e45340 rcx 0 rax 0xffff80002a687d58 r8 0x101010101010101 r9 0x8080808080808080 r10 0xe7cbc0131e7f0792 r11 0xf3f48c1492888294 r12 0 r13 0xffff8000006ba810 r14 0 r15 0x1 rip 0xffffffff81684d9c db_enter+0x1c cs 0x8 rflags 0x246 rsp 0xffff800037802720 ss 0x10 db_enter+0x1c: addq $0x8,%rsp ddb> show proc PROC (syz-executor.7) tid=416939 pid=3094 tcnt=3 stat=onproc flags process=0 proc=4000000 runpri=32, usrpri=85, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 forw=0xffffffffffffffff, list=0xffff80002a6872b8,0xffff80002a6d3800 process=0xffff8000ffff8008 user=0xffff8000377fe000, vmspace=0xfffffd80698f46f0 estcpu=35, cpticks=1, pctcpu=0.0, user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 90770 258785 71821 0 2 0 syz-executor.5 90770 3628 71821 0 2 0x4000000 syz-executor.5 42306 4027 34594 0 2 0 syz-executor.1 42306 378154 34594 0 2 0x4000000 syz-executor.1 3094 297687 92453 0 2 0 syz-executor.7 * 3094 416939 92453 0 7 0x4000000 syz-executor.7 3094 206064 92453 0 3 0x4000080 fsleep syz-executor.7 4864 111560 78445 0 2 0 syz-executor.6 4864 107287 78445 0 3 0x4000080 fsleep syz-executor.6 4864 402893 78445 0 3 0x4000080 fsleep syz-executor.6 92453 442674 97996 0 3 0x82 nanoslp syz-executor.7 71821 44525 97996 0 3 0x82 nanoslp syz-executor.5 75951 19123 97996 0 2 0x2 syz-executor.2 78445 70726 97996 0 3 0x82 nanoslp syz-executor.6 65639 291205 97996 0 2 0x2 syz-executor.3 34594 24989 97996 0 3 0x82 nanoslp syz-executor.1 36423 492817 97996 0 2 0x2 syz-executor.4 63187 518249 97996 0 2 0x2 syz-executor.0 86032 395973 0 0 3 0x14280 nfsidl nfsio 82494 388432 0 0 3 0x14280 nfsidl nfsio 26554 62108 0 0 3 0x14280 nfsidl nfsio 58307 126009 0 0 3 0x14280 nfsidl nfsio 63527 384238 0 0 3 0x14280 nfsidl nfsio 70091 95200 0 0 3 0x14280 nfsidl nfsio 61728 419168 0 0 3 0x14280 nfsidl nfsio 98581 520257 0 0 3 0x14280 nfsidl nfsio 78258 425138 0 0 3 0x14280 nfsidl nfsio 34748 194816 0 0 3 0x14280 nfsidl nfsio 38406 518343 0 0 3 0x14280 nfsidl nfsio 89041 281322 0 0 3 0x14280 nfsidl nfsio 5160 55066 0 0 3 0x14280 nfsidl nfsio 30917 203637 0 0 3 0x14280 nfsidl nfsio 37556 176363 0 0 3 0x14280 nfsidl nfsio 46981 12043 0 0 3 0x14280 nfsidl nfsio 8790 75301 0 0 3 0x14280 nfsidl nfsio 61685 141198 0 0 3 0x14280 nfsidl nfsio 86806 2979 0 0 3 0x14280 nfsidl nfsio 32980 330005 0 0 3 0x14280 nfsidl nfsio 42298 310763 0 0 3 0x14200 bored sosplice 97996 369318 81972 0 3 0x2000082 thrsleep syz-fuzzer 97996 249991 81972 0 3 0x6000082 nanoslp syz-fuzzer 97996 193387 81972 0 3 0x6000082 thrsleep syz-fuzzer 97996 99764 81972 0 3 0x6000082 wait syz-fuzzer 97996 6564 81972 0 3 0x6000082 kqread syz-fuzzer 97996 306914 81972 0 3 0x6000082 thrsleep syz-fuzzer 97996 472504 81972 0 3 0x6000082 wait syz-fuzzer 97996 522811 81972 0 3 0x6000082 wait syz-fuzzer 97996 292426 81972 0 3 0x6000082 wait syz-fuzzer 97996 468011 81972 0 3 0x6000082 wait syz-fuzzer 97996 460450 81972 0 3 0x6000082 thrsleep syz-fuzzer 97996 125997 81972 0 3 0x6000082 wait syz-fuzzer 97996 522013 81972 0 3 0x6000082 wait syz-fuzzer 97996 25869 81972 0 3 0x6000082 wait syz-fuzzer 81972 130349 11093 0 3 0x10008a sigsusp ksh 11093 317751 94796 0 3 0x9a kqread sshd 878 463727 1 0 3 0x100083 ttyin getty 94796 467657 1 0 3 0x88 kqread sshd 8212 96936 90975 73 3 0x1100090 kqread syslogd 90975 10088 1 0 3 0x100082 netio syslogd 54802 108678 1 0 3 0x100080 kqread resolvd 32311 156580 98858 77 3 0x100092 kqread dhcpleased 76900 236216 98858 77 3 0x100092 kqread dhcpleased 98858 108146 1 0 3 0x80 kqread dhcpleased 68414 264661 0 0 3 0x14200 bored smr 55284 420618 0 0 2 0x14200 zerothread 5120 11254 0 0 3 0x14200 aiodoned aiodoned 11085 166505 0 0 3 0x14200 syncer update 11437 224597 0 0 3 0x14200 cleaner cleaner 23602 251730 0 0 3 0x14200 reaper reaper 74509 427588 0 0 3 0x14200 pgdaemon pagedaemon 83267 512815 0 0 3 0x14200 bored viomb 2322 31917 0 0 3 0x40014200 acpi0 acpi0 43390 511181 0 0 3 0x14200 bored softnet3 10834 480821 0 0 3 0x14200 bored softnet2 78836 510843 0 0 3 0x14200 bored softnet1 90046 361484 0 0 3 0x14200 bored softnet0 54166 293327 0 0 3 0x14200 bored systqmp 19961 291251 0 0 3 0x14200 bored systq 29999 160841 0 0 3 0x40014200 tmoslp softclock 15916 12779 0 0 3 0x40014200 idle0 1 490830 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 10231 6632K 7465K 166960K 49214 0 pcb 15 16K 18K 166960K 595 0 rtable 204 14K 15K 166960K 1510 0 pf 35 9K 10K 166960K 208 0 ifaddr 108 28K 28K 166960K 259 0 ifgroup 62 2K 2K 166960K 345 0 sysctl 3 0K 0K 166960K 3 0 counters 33 17K 18K 166960K 110 0 ioctlops 0 0K 2K 166960K 462 0 iov 0 0K 16K 166960K 909 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1484 93K 93K 166960K 9476 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 47 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 626 0 dirhash 81 14K 14K 166960K 789 0 ACPI 1697 195K 286K 166960K 12548 0 file desc 14 49K 73K 166960K 7746 0 sigio 0 0K 0K 166960K 103 0 proc 58 59K 75K 166960K 1134 0 subproc 104 6K 7K 166960K 351 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 619 0 in_multi 77 5K 7K 166960K 352 0 ether_multi 1 0K 0K 166960K 11 0 mrt 0 0K 0K 166960K 6 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 223 996K 996K 166960K 223 0 exec 0 0K 1K 166960K 1230 0 pfkey data 0 0K 0K 166960K 4 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 408 393K 402K 166960K 71847 0 UVM aobj 131 4K 4K 166960K 134 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 132 0 NDP 14 0K 2K 166960K 144 0 temp 74 6704K 6976K 166960K 129090 0 kqueue 12 18K 24K 166960K 445 0 SYN cache 2 1236K 1244K 166960K 3 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle rtpcb 120 527 0 524 3 0 3 3 0 8 2 rtentry 112 380 0 291 4 0 4 4 0 8 1 unpcb 144 5324 0 5311 8 0 8 8 0 8 7 syncache 320 62 0 62 1 0 1 1 0 8 1 tcpqe 32 187 0 187 1 0 1 1 0 8 1 tcpcb 808 1952 0 1940 20 11 9 20 0 8 7 arp 88 69 0 54 1 0 1 1 0 8 0 ipq 40 8 0 7 1 0 1 1 0 8 0 ipqe 40 89 0 88 1 0 1 1 0 8 0 inpcb 344 4940 0 4925 19 10 9 19 0 8 7 nd6 104 84 0 66 1 0 1 1 0 8 0 pkpcb 40 5 0 5 1 0 1 1 0 8 1 kcovpl 48 27 0 19 1 0 1 1 0 8 0 ppxss 1072 22 0 22 1 0 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 1423 0 1039 30 3 27 29 0 8 2 art_table 32 1424 0 1039 4 0 4 4 0 8 0 art_node 16 370 0 289 1 0 1 1 0 8 0 sysvmsgpl 40 88 0 58 1 0 1 1 0 8 0 semupl 112 2 0 2 1 0 1 1 0 8 1 semapl 112 622 0 612 1 0 1 1 0 8 0 shmpl 112 131 0 3 4 0 4 4 0 8 0 dirhash 1024 279 0 239 5 0 5 5 0 8 0 dino2pl 256 11402 0 9918 93 0 93 93 0 8 0 ffsino 240 11402 0 9918 88 0 88 88 0 8 0 nchpl 144 21329 0 19682 63 0 63 63 0 8 0 uvmvnodes 80 5926 0 0 121 0 121 121 0 8 0 vnodes 216 5926 0 0 330 0 330 330 0 8 0 namei 1024 73065 0 73063 3 0 3 3 0 8 2 vcpupl 2048 37 0 0 5 0 5 5 0 8 0 vmpool 664 37 0 0 4 0 4 4 0 8 0 kstatmem 264 182 0 154 3 0 3 3 0 8 0 scxspl 216 63339 0 63339 8 0 8 8 1 8 8 plimitpl 152 628 0 613 1 0 1 1 0 8 0 sigapl 424 8088 0 8026 8 0 8 8 0 8 0 futexpl 64 69070 0 69067 1 0 1 1 0 8 0 knotepl 120 72009 0 71926 11 0 11 11 0 8 7 kqueuepl 184 1525 0 1517 6 0 6 6 0 8 5 pipepl 288 1545 0 1517 7 0 7 7 0 8 4 fdescpl 432 7991 0 7966 4 0 4 4 0 8 0 filepl 120 48612 0 48370 18 2 16 18 0 8 7 lockfpl 104 3997 0 3995 2 0 2 2 0 8 1 lockfspl 48 1664 0 1662 1 0 1 1 0 8 0 sessionpl 144 41 0 25 1 0 1 1 0 8 0 pgrppl 48 133 0 117 1 0 1 1 0 8 0 ucredpl 104 6835 0 6825 1 0 1 1 0 8 0 zombiepl 144 8026 0 8026 1 0 1 1 0 8 1 processpl 1072 8088 0 8026 5 0 5 5 0 8 0 procpl 680 18693 0 18612 9 0 9 9 0 8 1 sosppl 168 78 0 78 1 0 1 1 0 8 1 sockpl 488 10799 0 10768 168 147 21 44 0 8 16 mcl64k 65536 220 0 220 1 0 1 1 0 8 1 mcl16k 16384 141 0 141 1 0 1 1 0 8 1 mcl12k 12288 221 0 221 1 0 1 1 0 8 1 mcl9k 9216 120 0 120 1 0 1 1 0 8 1 mcl8k 8192 468 0 468 1 0 1 1 0 8 1 mcl4k 4096 737 0 737 1 0 1 1 0 8 1 mcl2k2 2112 22 0 22 1 0 1 1 0 8 1 mcl2k 2048 85171 0 85117 40 24 16 27 0 8 8 mtagpl 96 2700 0 2402 18 0 18 18 0 8 3 mbufpl 256 202372 0 201926 636 560 76 414 0 8 23 bufpl 280 17959 0 11568 457 0 457 457 0 8 0 anonpl 24 821254 0 807933 108 0 108 108 0 188 12 amapchunkpl 152 226775 0 225978 41 0 41 41 0 158 5 amappl16 200 17474 0 17031 50 18 32 37 0 8 7 amappl15 192 36 0 35 1 0 1 1 0 8 0 amappl14 184 207 0 195 2 0 2 2 0 8 1 amappl13 176 18 0 17 1 0 1 1 0 8 0 amappl12 168 8923 0 8894 2 0 2 2 0 8 0 amappl11 160 54 0 43 1 0 1 1 0 8 0 amappl10 152 54 0 44 1 0 1 1 0 8 0 amappl9 144 161 0 161 1 0 1 1 0 8 1 amappl8 136 378 0 288 4 0 4 4 0 8 0 amappl7 128 213 0 190 2 0 2 2 0 8 0 amappl6 120 543 0 531 1 0 1 1 0 8 0 amappl5 112 253 0 245 1 0 1 1 0 8 0 amappl4 104 616 0 592 2 0 2 2 0 8 1 amappl3 96 45526 0 45451 3 0 3 3 0 8 0 amappl2 88 8751 0 8679 3 0 3 3 0 8 1 amappl1 80 37748 0 37247 22 2 20 22 0 8 8 amappl 88 71013 0 70781 7 0 7 7 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 133 0 3 3 0 3 3 0 8 0 uaddrrnd 24 8028 0 7966 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 8028 0 7966 1 0 1 1 0 8 0 vmmpekpl 168 57402 0 57328 4 0 4 4 0 8 0 vmmpepl 168 475581 0 473369 135 0 135 135 0 357 18 vmsppl 352 8027 0 7966 7 0 7 7 0 8 1 rwobjpl 24 118343 0 110798 48 0 48 48 0 8 1 pdppl 4096 16062 0 15969 466 365 101 105 0 8 8 pvpl 32 2167337 0 2148547 332 0 332 332 0 265 155 pmappl 216 8027 0 7966 4 0 4 4 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 1410 0 963 21 0 21 21 0 8 7 ddb> machine ddbcpu 0 No such command ddb> trace db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82911433) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd8069462b40,ffff80002a62f800,10,fffffd8069462bec,ffff800037802908,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(fffffd806e0e00d8,ffff800037802d88,ffff800037802db8) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 vfs_lookup(ffff800037802d58) at vfs_lookup+0x6dc sys/kern/vfs_lookup.c:566 namei(ffff800037802d58) at namei+0x55a sys/kern/vfs_lookup.c:250 vn_open(ffff800037802d58,201,0) at vn_open+0x17b sys/kern/vfs_vnops.c:107 doopenat(ffff80002a687d58,4,200003c0,200,0,ffff800037802f00) at doopenat+0x26e sys/kern/vfs_syscalls.c:1126 syscall(ffff800037802fb0) at syscall+0x751 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xd6b2403a5b0, 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(ffffffff82911433) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd8069462b40,ffff80002a62f800,10,fffffd8069462bec,ffff800037802908,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(fffffd806e0e00d8,ffff800037802d88,ffff800037802db8) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 vfs_lookup(ffff800037802d58) at vfs_lookup+0x6dc sys/kern/vfs_lookup.c:566 namei(ffff800037802d58) at namei+0x55a sys/kern/vfs_lookup.c:250 vn_open(ffff800037802d58,201,0) at vn_open+0x17b sys/kern/vfs_vnops.c:107 doopenat(ffff80002a687d58,4,200003c0,200,0,ffff800037802f00) at doopenat+0x26e sys/kern/vfs_syscalls.c:1126 syscall(ffff800037802fb0) at syscall+0x751 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xd6b2403a5b0, count: -11