panic: ufsdirhash_lookup: bad offset in hash array Stopped at db_enter+0x1c: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *258133 14564 0 0 0x4000000 0 syz-executor.5 db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff8295852c) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd80693d4e20,ffff80002db06000,1,fffffd80693d4ecc,ffff800030ee6ab8,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(fffffd805762e538,ffff800030ee6f38,ffff800030ee6f68) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 vfs_lookup(ffff800030ee6f08) at vfs_lookup+0x6dc sys/kern/vfs_lookup.c:566 namei(ffff800030ee6f08) at namei+0x55a sys/kern/vfs_lookup.c:250 vn_open(ffff800030ee6f08,10001,0) at vn_open+0xf8 sys/kern/vfs_vnops.c:140 doopenat(ffff80002a69e010,4,200003c0,10000,0,ffff800030ee70b0) at doopenat+0x26e sys/kern/vfs_syscalls.c:1126 syscall(ffff800030ee7160) at syscall+0x751 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa08de5f9cf0, 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(ffffffff8295852c) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd80693d4e20,ffff80002db06000,1,fffffd80693d4ecc,ffff800030ee6ab8,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(fffffd805762e538,ffff800030ee6f38,ffff800030ee6f68) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 vfs_lookup(ffff800030ee6f08) at vfs_lookup+0x6dc sys/kern/vfs_lookup.c:566 namei(ffff800030ee6f08) at namei+0x55a sys/kern/vfs_lookup.c:250 vn_open(ffff800030ee6f08,10001,0) at vn_open+0xf8 sys/kern/vfs_vnops.c:140 doopenat(ffff80002a69e010,4,200003c0,10000,0,ffff800030ee70b0) at doopenat+0x26e sys/kern/vfs_syscalls.c:1126 syscall(ffff800030ee7160) at syscall+0x751 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa08de5f9cf0, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800030ee68e0 rbx 0 rdx 0xffff800000e32080 rcx 0 rax 0xffff80002a69e010 r8 0x101010101010101 r9 0x8080808080808080 r10 0x5ef69202ecb52258 r11 0xcadec7ba3f263505 r12 0 r13 0xffff8000006bab70 r14 0 r15 0x1 rip 0xffffffff81843a6c db_enter+0x1c cs 0x8 rflags 0x246 rsp 0xffff800030ee68d0 ss 0x10 db_enter+0x1c: addq $0x8,%rsp ddb> show proc PROC (syz-executor.5) tid=258133 pid=14564 tcnt=2 stat=onproc flags process=0 proc=4000000 runpri=32, usrpri=84, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 forw=0xffffffffffffffff, list=0xffff80002a663a90,0xffff80002a663550 process=0xffff800030f19518 user=0xffff800030ee2000, vmspace=0xfffffd8078e3a2e0 estcpu=36, cpticks=0, pctcpu=0.0, user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 463 344134 56773 0 2 0 syz-executor.6 463 387673 56773 0 3 0x4000080 fsleep syz-executor.6 55569 17714 18586 60929 2 0x10 syz-executor.4 55569 312579 18586 60929 3 0x4000090 fsleep syz-executor.4 87338 429500 48525 0 3 0x80 nanoslp syz-executor.2 87338 32393 48525 0 3 0x4000080 fsleep syz-executor.2 14564 378386 86974 0 2 0 syz-executor.5 *14564 258133 86974 0 7 0x4000000 syz-executor.5 42821 176300 80897 0 3 0x80 nanoslp syz-executor.7 42821 378812 80897 0 3 0x4000080 fsleep syz-executor.7 45148 161942 10640 0 3 0x80 nanoslp syz-executor.0 45148 444551 10640 0 3 0x4000080 fsleep syz-executor.0 45148 247509 10640 0 3 0x4000080 lockf syz-executor.0 45148 263434 10640 0 3 0x4000080 fsleep syz-executor.0 14666 4372 8942 0 2 0x2 syz-executor.3 80897 478200 8942 0 3 0x82 nanoslp syz-executor.7 48525 14480 8942 0 3 0x82 nanoslp syz-executor.2 9945 9506 0 0 3 0x14280 nfsidl nfsio 1748 343508 0 0 3 0x14280 nfsidl nfsio 30348 457380 0 0 3 0x14280 nfsidl nfsio 78888 215739 0 0 3 0x14280 nfsidl nfsio 46813 57595 0 0 3 0x14280 nfsidl nfsio 81499 90131 0 0 3 0x14280 nfsidl nfsio 38949 273578 0 0 3 0x14280 nfsidl nfsio 86050 414096 0 0 3 0x14280 nfsidl nfsio 50986 396065 0 0 3 0x14280 nfsidl nfsio 96042 194349 0 0 3 0x14280 nfsidl nfsio 12237 62309 0 0 3 0x14280 nfsidl nfsio 91788 41674 0 0 3 0x14280 nfsidl nfsio 38423 215124 0 0 3 0x14280 nfsidl nfsio 71657 80956 0 0 3 0x14280 nfsidl nfsio 9754 307556 0 0 3 0x14280 nfsidl nfsio 77171 75357 0 0 3 0x14280 nfsidl nfsio 95576 108468 0 0 3 0x14280 nfsidl nfsio 22888 333841 0 0 3 0x14280 nfsidl nfsio 17257 393698 0 0 3 0x14280 nfsidl nfsio 56796 280143 0 0 3 0x14280 nfsidl nfsio 10640 219502 8942 0 3 0x82 nanoslp syz-executor.0 60049 411481 8942 0 2 0x2 syz-executor.1 86974 360563 8942 0 3 0x82 nanoslp syz-executor.5 56773 394384 8942 0 3 0x82 nanoslp syz-executor.6 23221 487155 0 0 3 0x14200 acct acct 18586 203281 8942 0 3 0x82 nanoslp syz-executor.4 21141 309098 1 0 3 0x100083 ttyin getty 32914 269332 1 0 3 0x80 fsleep syz-executor.4 32914 260631 1 0 3 0x4000080 pipewr syz-executor.4 82809 205095 1 0 3 0x80 fsleep syz-executor.7 82809 428551 1 0 3 0x4000080 kqread syz-executor.7 82809 386944 1 0 3 0x4000080 kqread syz-executor.7 93466 256466 0 0 3 0x14200 bored sosplice 8942 104738 9310 0 3 0x2000082 wait syz-fuzzer 8942 300812 9310 0 3 0x6000082 nanoslp syz-fuzzer 8942 226887 9310 0 3 0x6000082 wait syz-fuzzer 8942 210115 9310 0 3 0x6000082 wait syz-fuzzer 8942 107900 9310 0 3 0x6000082 wait syz-fuzzer 8942 451806 9310 0 3 0x6000082 wait syz-fuzzer 8942 329049 9310 0 3 0x6000082 thrsleep syz-fuzzer 8942 474822 9310 0 3 0x6000082 thrsleep syz-fuzzer 8942 359013 9310 0 3 0x6000082 wait syz-fuzzer 8942 103108 9310 0 3 0x6000082 wait syz-fuzzer 8942 283876 9310 0 3 0x6000082 thrsleep syz-fuzzer 8942 119232 9310 0 3 0x6000082 kqread syz-fuzzer 8942 337425 9310 0 3 0x6000082 wait syz-fuzzer 8942 473397 9310 0 3 0x6000082 thrsleep syz-fuzzer 9310 499084 41169 0 3 0x10008a sigsusp ksh 41169 469161 30767 0 3 0x9a kqread sshd 30767 311046 1 0 3 0x88 kqread sshd 82906 63238 23620 73 3 0x1100090 kqread syslogd 23620 255445 1 0 3 0x100082 netio syslogd 84132 76441 1 0 3 0x100080 kqread resolvd 79975 90999 90821 77 3 0x100092 kqread dhcpleased 81150 144900 90821 77 3 0x100092 kqread dhcpleased 90821 377286 1 0 3 0x80 kqread dhcpleased 45397 499171 0 0 3 0x14200 bored smr 57524 175576 0 0 2 0x14200 zerothread 71291 197623 0 0 3 0x14200 aiodoned aiodoned 61458 493641 0 0 3 0x14200 syncer update 70800 231063 0 0 3 0x14200 cleaner cleaner 69888 348725 0 0 3 0x14200 reaper reaper 58602 180834 0 0 3 0x14200 pgdaemon pagedaemon 15552 370606 0 0 3 0x14200 bored viomb 49495 287617 0 0 3 0x40014200 acpi0 acpi0 37126 184967 0 0 3 0x14200 bored softnet3 15548 442796 0 0 3 0x14200 bored softnet2 12084 5291 0 0 3 0x14200 bored softnet1 7693 169858 0 0 3 0x14200 bored softnet0 53362 317360 0 0 3 0x14200 bored systqmp 30664 379071 0 0 3 0x14200 bored systq 18642 399989 0 0 3 0x40014200 tmoslp softclock 69171 139014 0 0 3 0x40014200 idle0 1 113472 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 10244 6571K 10541K 166960K 66035 0 pcb 15 26K 31K 166960K 3323 0 rtable 253 16K 17K 166960K 5722 0 pf 44 11K 11K 166960K 751 0 ifaddr 54 16K 17K 166960K 775 0 ifgroup 79 3K 3K 166960K 1238 0 sysctl 4 1K 3K 166960K 78 0 counters 37 18K 18K 166960K 364 0 ioctlops 0 0K 2K 166960K 2639 0 iov 0 0K 32K 166960K 3741 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1865 117K 117K 166960K 21756 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 9K 166960K 413 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 5497 0 dirhash 90 16K 18K 166960K 28095 0 ACPI 1697 195K 286K 166960K 12548 0 file desc 18 65K 97K 166960K 31816 0 sigio 0 0K 0K 166960K 1382 0 proc 64 59K 116K 166960K 5090 0 subproc 130 8K 16K 166960K 1963 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 3218 0 in_multi 100 7K 8K 166960K 1690 0 ether_multi 1 0K 0K 166960K 25 0 mrt 1 0K 0K 166960K 7 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 7498 0 pfkey data 0 0K 0K 166960K 31 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 619 1101K 1131K 166960K 293453 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 996 0 NDP 18 0K 2K 166960K 607 0 temp 83 6764K 7060K 166960K 355425 0 kqueue 12 18K 30K 166960K 2611 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 1451 0 1448 12 11 1 5 0 8 0 rtentry 112 1777 0 1667 5 1 4 4 0 8 0 unpcb 144 25402 0 25383 55 49 6 10 0 8 5 syncache 320 337 0 337 8 7 1 1 0 8 1 tcpqe 32 367 0 367 8 7 1 1 0 8 1 tcpcb 808 10450 0 10439 81 71 10 16 0 8 8 arp 88 352 0 330 1 0 1 1 0 8 0 ipq 40 112 0 111 6 5 1 1 0 8 0 ipqe 40 454 0 453 6 5 1 1 0 8 0 inpcb 344 27182 0 27168 124 113 11 22 0 8 8 nd6 104 397 0 374 1 0 1 1 0 8 0 pkpcb 40 308 0 308 9 8 1 1 0 8 1 kcovpl 48 140 0 130 1 0 1 1 0 8 0 ppxss 1072 101 0 101 5 4 1 1 0 8 1 art_heap8 4096 10 0 8 4 1 3 4 0 8 1 art_heap4 256 6387 0 5893 67 35 32 32 0 8 0 art_table 32 6397 0 5901 6 1 5 5 0 8 0 art_node 16 1725 0 1629 1 0 1 1 0 8 0 sysvmsgpl 40 14 0 4 1 0 1 1 0 8 0 semupl 112 3 0 3 1 1 0 1 0 8 0 semapl 112 5492 0 5482 1 0 1 1 0 8 0 shmpl 112 131 0 3 4 0 4 4 0 8 0 dirhash 1024 9383 0 9340 8 1 7 7 0 8 1 dino2pl 256 43802 0 42187 102 0 102 102 0 8 0 ffsino 240 43802 0 42187 96 0 96 96 0 8 0 nchpl 144 86507 0 84872 63 0 63 63 0 8 0 uvmvnodes 80 7822 0 0 160 0 160 160 0 8 0 vnodes 216 7822 0 0 435 0 435 435 0 8 0 namei 1024 303080 0 303078 13 11 2 2 0 8 1 vcpupl 2048 516 0 4 65 0 65 65 0 8 0 vmpool 664 533 0 21 43 0 43 43 0 8 0 kstatmem 264 690 0 654 3 0 3 3 0 8 0 scxspl 216 250634 0 250634 20 16 4 8 1 8 4 plimitpl 152 3579 0 3561 1 0 1 1 0 8 0 sigapl 424 32320 0 32253 9 1 8 8 0 8 0 futexpl 64 292122 0 292114 1 0 1 1 0 8 0 knotepl 120 298104 0 298021 60 55 5 18 0 8 2 kqueuepl 184 6895 0 6886 22 18 4 4 0 8 3 pipepl 288 5638 0 5606 39 31 8 11 0 8 5 fdescpl 432 31816 0 31787 5 0 5 5 0 8 0 filepl 120 199402 0 199114 65 48 17 18 0 8 7 lockfpl 104 9450 0 9444 10 8 2 2 0 8 1 lockfspl 48 3418 0 3413 1 0 1 1 0 8 0 sessionpl 144 147 0 129 1 0 1 1 0 8 0 pgrppl 48 666 0 648 1 0 1 1 0 8 0 ucredpl 104 29441 0 29425 1 0 1 1 0 8 0 zombiepl 144 32253 0 32253 2 1 1 1 0 8 1 processpl 1072 32320 0 32253 6 1 5 5 0 8 0 procpl 680 80513 0 80422 13 4 9 10 0 8 0 sosppl 168 346 0 346 3 2 1 1 0 8 1 sockpl 488 54665 0 54629 727 714 13 35 0 8 8 mcl64k 65536 1358 0 1358 9 8 1 1 0 8 1 mcl16k 16384 621 0 621 9 8 1 1 0 8 1 mcl12k 12288 1613 0 1613 9 8 1 1 0 8 1 mcl9k 9216 682 0 682 9 8 1 1 0 8 1 mcl8k 8192 2685 0 2685 8 7 1 1 0 8 1 mcl4k 4096 3464 0 3464 10 9 1 2 0 8 1 mcl2k2 2112 203 0 203 8 7 1 1 0 8 1 mcl2k 2048 141539 0 141452 81 68 13 29 0 8 1 mtagpl 96 6382 0 6231 29 19 10 20 0 8 6 mbufpl 256 618978 0 618712 2238 2209 29 832 0 8 8 bufpl 280 59158 0 51334 559 0 559 559 0 8 0 anonpl 24 3009139 0 2992054 167 56 111 123 0 188 0 amapchunkpl 152 958566 0 957461 90 41 49 51 0 158 3 amappl16 200 61205 0 60724 201 166 35 49 0 8 0 amappl15 192 15 0 15 1 1 0 1 0 8 0 amappl14 184 540 0 524 2 1 1 2 0 8 0 amappl13 176 16 0 16 4 3 1 1 0 8 1 amappl12 168 34413 0 34370 5 2 3 3 0 8 1 amappl11 160 58 0 47 1 0 1 1 0 8 0 amappl10 152 223 0 205 1 0 1 1 0 8 0 amappl9 144 365 0 365 7 6 1 1 0 8 1 amappl8 136 1230 0 1085 7 0 7 7 0 8 0 amappl7 128 503 0 478 2 0 2 2 0 8 0 amappl6 120 2218 0 2201 2 1 1 2 0 8 0 amappl5 112 775 0 767 1 0 1 1 0 8 0 amappl4 104 1474 0 1434 3 1 2 2 0 8 0 amappl3 96 182263 0 182150 5 1 4 4 0 8 0 amappl2 88 33817 0 33736 3 1 2 3 0 8 0 amappl1 80 129276 0 128746 23 11 12 22 0 8 0 amappl 88 291253 0 290916 9 0 9 9 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 133 0 3 3 0 3 3 0 8 0 uaddrrnd 24 32349 0 31808 4 0 4 4 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 32349 0 31808 4 0 4 4 0 8 0 vmmpekpl 168 213691 0 213578 6 0 6 6 0 8 0 vmmpepl 168 1905374 0 1902353 301 132 169 169 0 357 10 vmsppl 352 32348 0 31808 50 0 50 50 0 8 0 rwobjpl 24 433407 0 423680 59 0 59 59 0 8 0 pdppl 4096 64704 0 64128 2198 1620 578 584 0 8 2 pvpl 32 8298643 0 8275614 518 332 186 332 0 265 0 pmappl 216 32348 0 31808 32 1 31 31 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 5044 0 4085 60 30 30 50 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(ffffffff8295852c) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd80693d4e20,ffff80002db06000,1,fffffd80693d4ecc,ffff800030ee6ab8,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(fffffd805762e538,ffff800030ee6f38,ffff800030ee6f68) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 vfs_lookup(ffff800030ee6f08) at vfs_lookup+0x6dc sys/kern/vfs_lookup.c:566 namei(ffff800030ee6f08) at namei+0x55a sys/kern/vfs_lookup.c:250 vn_open(ffff800030ee6f08,10001,0) at vn_open+0xf8 sys/kern/vfs_vnops.c:140 doopenat(ffff80002a69e010,4,200003c0,10000,0,ffff800030ee70b0) at doopenat+0x26e sys/kern/vfs_syscalls.c:1126 syscall(ffff800030ee7160) at syscall+0x751 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa08de5f9cf0, 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(ffffffff8295852c) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd80693d4e20,ffff80002db06000,1,fffffd80693d4ecc,ffff800030ee6ab8,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(fffffd805762e538,ffff800030ee6f38,ffff800030ee6f68) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 vfs_lookup(ffff800030ee6f08) at vfs_lookup+0x6dc sys/kern/vfs_lookup.c:566 namei(ffff800030ee6f08) at namei+0x55a sys/kern/vfs_lookup.c:250 vn_open(ffff800030ee6f08,10001,0) at vn_open+0xf8 sys/kern/vfs_vnops.c:140 doopenat(ffff80002a69e010,4,200003c0,10000,0,ffff800030ee70b0) at doopenat+0x26e sys/kern/vfs_syscalls.c:1126 syscall(ffff800030ee7160) at syscall+0x751 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa08de5f9cf0, count: -11