panic: ufsdirhash_lookup: bad offset in hash array Stopped at db_enter+0x1c: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 96638 58265 0 0 0x4000000 0 syz-executor.1 db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff828e005a) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd806edb3c38,ffff80002a5f6400,1,fffffd806edb3ce4,ffff80002da2d1d0,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(fffffd8062ded610,ffff80002da2d648,ffff80002da2d678) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 vfs_lookup(ffff80002da2d618) at vfs_lookup+0x6df sys/kern/vfs_lookup.c:566 namei(ffff80002da2d618) at namei+0x56a sys/kern/vfs_lookup.c:250 vn_open(ffff80002da2d618,201,a0) at vn_open+0x180 sys/kern/vfs_vnops.c:107 doopenat(ffff80002a680000,4,20000240,200,a0,ffff80002da2d7b0) at doopenat+0x269 sys/kern/vfs_syscalls.c:1126 syscall(ffff80002da2d860) at syscall+0x538 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x14ecdb8e7d0, 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(ffffffff828e005a) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd806edb3c38,ffff80002a5f6400,1,fffffd806edb3ce4,ffff80002da2d1d0,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(fffffd8062ded610,ffff80002da2d648,ffff80002da2d678) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 vfs_lookup(ffff80002da2d618) at vfs_lookup+0x6df sys/kern/vfs_lookup.c:566 namei(ffff80002da2d618) at namei+0x56a sys/kern/vfs_lookup.c:250 vn_open(ffff80002da2d618,201,a0) at vn_open+0x180 sys/kern/vfs_vnops.c:107 doopenat(ffff80002a680000,4,20000240,200,a0,ffff80002da2d7b0) at doopenat+0x269 sys/kern/vfs_syscalls.c:1126 syscall(ffff80002da2d860) at syscall+0x538 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x14ecdb8e7d0, count: -11 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002da2cff0 rbx 0xffff800000e4ae20 rdx 0xffff800000e494c0 rcx 0 rax 0xffff80002a680000 r8 0 r9 0x8080808080808080 r10 0xfcc1c15cd88ea259 r11 0x621f237bd52e6b4b r12 0 r13 0xffff800000e5d600 r14 0 r15 0x1 rip 0xffffffff822c0e2c db_enter+0x1c cs 0x8 rflags 0x246 rsp 0xffff80002da2cfe0 ss 0x10 db_enter+0x1c: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) tid=96638 pid=58265 tcnt=2 stat=onproc flags process=0 proc=4000000 runpri=32, usrpri=86, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 forw=0xffffffffffffffff, list=0xffff80002a6877f0,0xffffffff82d2f7e8 process=0xffff8000ffff3258 user=0xffff80002da28000, vmspace=0xfffffd805a8929d8 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 58265 120032 71753 0 2 0 syz-executor.1 *58265 96638 71753 0 7 0x4000000 syz-executor.1 2345 95998 95435 0 2 0x82000 syz-executor.5 2345 501977 95435 0 2 0x4082000 syz-executor.5 2345 266220 95435 0 2 0x4082000 syz-executor.5 2345 87442 95435 0 3 0x4002000 suspend syz-executor.5 2345 285635 95435 0 2 0x4082000 syz-executor.5 2345 463840 95435 0 2 0x4082000 syz-executor.5 69134 477987 0 0 3 0x14280 nfsidl nfsio 3467 187373 0 0 3 0x14280 nfsidl nfsio 84722 34941 0 0 3 0x14280 nfsidl nfsio 97383 220656 0 0 3 0x14280 nfsidl nfsio 23154 173021 0 0 3 0x14280 nfsidl nfsio 47699 88569 0 0 3 0x14280 nfsidl nfsio 5973 460257 0 0 3 0x14280 nfsidl nfsio 42097 453729 0 0 3 0x14280 nfsidl nfsio 91057 341574 0 0 3 0x14280 nfsidl nfsio 78411 195594 0 0 3 0x14280 nfsidl nfsio 15372 305942 0 0 3 0x14280 nfsidl nfsio 26437 429326 0 0 3 0x14280 nfsidl nfsio 45041 128480 0 0 3 0x14280 nfsidl nfsio 8522 432393 0 0 3 0x14280 nfsidl nfsio 59823 100952 0 0 3 0x14280 nfsidl nfsio 76778 347471 0 0 3 0x14280 nfsidl nfsio 46213 33919 0 0 3 0x14280 nfsidl nfsio 41779 120693 0 0 3 0x14280 nfsidl nfsio 29628 438586 0 0 3 0x14280 nfsidl nfsio 20965 336367 0 0 3 0x14280 nfsidl nfsio 71753 192095 56846 0 2 0x482 syz-executor.1 95435 22729 56846 0 2 0x482 syz-executor.5 10997 83297 56846 0 2 0x482 syz-executor.7 81312 12882 56846 0 2 0x482 syz-executor.2 6563 155031 56846 0 2 0x482 syz-executor.6 53135 157983 56846 0 2 0x482 syz-executor.3 65474 391985 0 0 3 0x14200 acct acct 83723 346681 56846 0 2 0x482 syz-executor.4 79356 360638 1 0 3 0x18100083 ttyin getty 89699 71195 67515 0 3 0x18100082 netio arp 67515 159921 1 0 3 0x810008a sigsusp sh 37825 461371 0 0 3 0x14200 bored sosplice 56846 188874 70879 0 3 0x1a000082 wait syz-fuzzer 56846 471184 70879 0 2 0x1e000482 syz-fuzzer 56846 147036 70879 0 3 0x1e000082 thrsleep syz-fuzzer 56846 30085 70879 0 3 0x1e000082 wait syz-fuzzer 56846 334409 70879 0 3 0x1e000082 wait syz-fuzzer 56846 347543 70879 0 3 0x1e000082 kqread syz-fuzzer 56846 361921 70879 0 3 0x1e000082 thrsleep syz-fuzzer 56846 469629 70879 0 3 0x1e000082 wait syz-fuzzer 56846 4673 70879 0 3 0x1e000082 thrsleep syz-fuzzer 56846 441999 70879 0 3 0x1e000082 wait syz-fuzzer 56846 390675 70879 0 3 0x1e000082 thrsleep syz-fuzzer 56846 23555 70879 0 3 0x1e000082 thrsleep syz-fuzzer 56846 458271 70879 0 3 0x1e000082 wait syz-fuzzer 56846 432703 70879 0 3 0x1e000082 wait syz-fuzzer 70879 388071 449 0 3 0x810008a sigsusp ksh 449 447219 91218 0 3 0x1800009a kqread sshd 91218 278016 1 0 3 0x18000088 kqread sshd 29954 456171 83174 73 3 0x19100090 kqread syslogd 83174 432894 1 0 3 0x18100082 netio syslogd 15140 52226 1 0 3 0x18100080 kqread resolvd 6141 91900 93773 77 3 0x18100092 kqread dhcpleased 19756 251713 93773 77 3 0x18100092 kqread dhcpleased 93773 299032 1 0 3 0x18000080 kqread dhcpleased 53896 95023 0 0 3 0x14200 bored smr 10373 486267 0 0 2 0x14200 zerothread 72867 236151 0 0 3 0x14200 aiodoned aiodoned 84286 300197 0 0 3 0x14200 syncer update 12666 407798 0 0 3 0x14200 cleaner cleaner 29870 250483 0 0 3 0x14200 reaper reaper 93406 476736 0 0 3 0x14200 pgdaemon pagedaemon 53352 263616 0 0 3 0x14200 bored viomb 11354 456136 0 0 3 0x40014200 acpi0 acpi0 99529 35329 0 0 3 0x14200 bored softnet3 74175 209165 0 0 3 0x14200 bored softnet2 87724 224468 0 0 3 0x14200 bored softnet1 15519 132145 0 0 3 0x14200 bored softnet0 68188 357139 0 0 3 0x14200 bored systqmp 32559 50447 0 0 3 0x14200 bored systq 4338 191146 0 0 2 0x40014200 softclock 59399 155575 0 0 3 0x40014200 idle0 1 29944 0 0 3 0x8080082 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 10214 6436K 7210K 166960K 47175 0 pcb 15 18K 20K 166960K 1596 0 rtable 212 10K 11K 166960K 5622 0 pf 36 10K 10K 166960K 656 0 ifaddr 42 14K 15K 166960K 724 0 ifgroup 63 2K 2K 166960K 1069 0 sysctl 4 1K 1K 166960K 12 0 counters 33 17K 18K 166960K 325 0 ioctlops 0 0K 2K 166960K 1111 0 iov 0 0K 36K 166960K 2012 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1659 104K 105K 166960K 13365 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 9K 166960K 225 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 3673 0 dirhash 81 14K 17K 166960K 6144 0 ACPI 1697 195K 286K 166960K 12548 0 file desc 13 45K 77K 166960K 18369 0 sigio 0 0K 0K 166960K 905 0 proc 61 59K 83K 166960K 4433 0 subproc 104 6K 7K 166960K 1673 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 991 0 in_multi 87 6K 7K 166960K 1584 0 ether_multi 1 0K 0K 166960K 13 0 mrt 1 0K 0K 166960K 29 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 235 1049K 1049K 166960K 235 0 exec 0 0K 1K 166960K 4302 0 pfkey data 0 0K 0K 166960K 3 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 463 809K 819K 166960K 166538 0 UVM aobj 131 4K 4K 166960K 140 0 pinsyscall 25 50K 100K 166960K 5216 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 529 0 NDP 14 0K 2K 166960K 566 0 temp 70 6803K 7439K 166960K 146143 0 kqueue 12 18K 28K 166960K 1416 0 SYN cache 2 192K 200K 166960K 4 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle rtpcb 120 1074 0 1070 8 5 3 3 0 8 2 rtentry 112 1916 0 1820 5 1 4 4 0 8 0 unpcb 144 13659 0 13646 32 25 7 7 0 8 6 syncache 336 166 0 166 6 5 1 1 0 8 1 tcpqe 32 298 0 298 6 5 1 1 0 8 1 tcpcb 808 5409 0 5396 47 38 9 12 0 8 7 arp 88 363 0 349 1 0 1 1 0 8 0 ipq 40 81 0 81 4 3 1 1 0 8 1 ipqe 40 244 0 244 4 3 1 1 0 8 1 inpcb 360 14672 0 14658 66 57 9 14 0 8 6 nd6 104 397 0 375 1 0 1 1 0 8 0 pkpcb 40 172 0 172 5 4 1 1 0 8 1 kcovpl 48 128 0 120 1 0 1 1 0 8 0 ppxss 1072 99 0 99 5 4 1 1 0 8 1 rttmr 136 2 0 2 1 0 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 6362 0 5928 55 25 30 30 0 8 0 art_table 32 6363 0 5928 4 0 4 4 0 8 0 art_node 16 1791 0 1704 1 0 1 1 0 8 0 sysvmsgpl 40 55 0 53 1 0 1 1 0 8 0 semapl 112 3671 0 3661 1 0 1 1 0 8 0 shmpl 112 137 0 9 4 0 4 4 0 8 0 dirhash 1024 2075 0 2035 6 0 6 6 0 8 0 dino2pl 256 25330 0 23727 101 0 101 101 0 8 0 ffsino 240 25330 0 23727 95 0 95 95 0 8 0 nchpl 144 49312 0 48685 66 32 34 66 0 8 8 uvmvnodes 80 6885 0 0 141 0 141 141 0 8 0 vnodes 216 6885 0 0 383 0 383 383 0 8 0 namei 1024 181742 0 181741 8 6 2 3 0 8 1 vcpupl 2048 215 0 1 27 0 27 27 0 8 0 vmpool 664 299 0 85 18 0 18 18 0 8 0 kstatmem 264 612 0 584 4 1 3 3 0 8 0 scxspl 216 153457 0 153457 17 14 3 8 1 8 3 plimitpl 152 2146 0 2131 1 0 1 1 0 8 0 sigapl 424 18562 0 18495 8 0 8 8 0 8 0 futexpl 64 169393 0 169393 1 0 1 1 0 8 1 knotepl 120 157173 0 157097 33 22 11 15 0 8 8 kqueuepl 184 3563 0 3555 21 12 9 9 0 8 8 pipepl 288 3367 0 3339 21 12 9 9 0 8 6 fdescpl 432 18403 0 18379 4 0 4 4 0 8 0 filepl 120 114377 0 114141 38 22 16 16 0 8 6 lockfpl 104 6229 0 6227 6 4 2 2 0 8 1 lockfspl 48 2280 0 2278 1 0 1 1 0 8 0 sessionpl 144 148 0 132 1 0 1 1 0 8 0 pgrppl 48 366 0 350 1 0 1 1 0 8 0 ucredpl 104 15802 0 15784 1 0 1 1 0 8 0 zombiepl 144 18500 0 18495 2 1 1 1 0 8 0 processpl 1072 18562 0 18495 5 0 5 5 0 8 0 procpl 680 44244 0 44158 12 3 9 9 0 8 1 sosppl 168 223 0 221 2 1 1 1 0 8 0 sockpl 488 29665 0 29632 346 332 14 35 0 8 8 mcl64k 65536 816 0 816 6 5 1 1 0 8 1 mcl16k 16384 438 0 438 5 4 1 1 0 8 1 mcl12k 12288 664 0 664 6 5 1 1 0 8 1 mcl9k 9216 278 0 278 6 5 1 1 0 8 1 mcl8k 8192 1165 0 1165 5 4 1 1 0 8 1 mcl4k 4096 1952 0 1952 6 4 2 2 0 8 2 mcl2k2 2112 121 0 121 5 4 1 1 0 8 1 mcl2k 2048 109064 0 109016 58 48 10 34 0 8 2 mtagpl 96 3479 0 3479 24 16 8 14 0 8 8 mbufpl 256 341187 0 341107 782 756 26 448 0 8 8 bufpl 280 36422 0 29535 493 0 493 493 0 8 0 anonpl 24 1857926 0 1845373 191 77 114 159 0 188 6 amapchunkpl 152 529694 0 528908 91 47 44 66 0 158 5 amappl16 200 36747 0 36300 113 76 37 38 0 8 3 amappl15 192 155 0 154 1 0 1 1 0 8 0 amappl14 184 631 0 612 3 1 2 2 0 8 0 amappl13 176 33 0 33 5 4 1 1 0 8 1 amappl12 168 20879 0 20841 3 0 3 3 0 8 0 amappl11 160 55 0 45 1 0 1 1 0 8 0 amappl10 152 184 0 169 1 0 1 1 0 8 0 amappl9 144 350 0 349 1 0 1 1 0 8 0 amappl8 136 868 0 766 5 0 5 5 0 8 0 amappl7 128 137 0 120 1 0 1 1 0 8 0 amappl6 120 1911 0 1890 2 1 1 2 0 8 0 amappl5 112 953 0 940 1 0 1 1 0 8 0 amappl4 104 1647 0 1608 3 1 2 2 0 8 0 amappl3 96 102442 0 102377 3 0 3 3 0 8 0 amappl2 88 19753 0 19681 4 2 2 4 0 8 0 amappl1 80 81385 0 80881 23 11 12 21 0 8 0 amappl 88 164637 0 164375 8 0 8 8 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 139 0 9 3 0 3 3 0 8 0 uaddrrnd 24 18702 0 18464 2 0 2 2 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 18702 0 18464 2 0 2 2 0 8 0 vmmpekpl 168 125991 0 125895 5 0 5 5 0 8 0 vmmpepl 168 1134191 0 1131800 227 81 146 146 0 357 10 vmsppl 352 18701 0 18464 23 0 23 23 0 8 0 rwobjpl 24 260259 0 251664 54 1 53 53 0 8 0 pdppl 4096 37410 0 37142 1326 1050 276 282 0 8 8 pvpl 32 5313082 0 5295016 484 280 204 388 0 265 8 pmappl 216 18701 0 18464 14 0 14 14 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 2570 0 1962 29 10 19 27 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(ffffffff828e005a) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd806edb3c38,ffff80002a5f6400,1,fffffd806edb3ce4,ffff80002da2d1d0,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(fffffd8062ded610,ffff80002da2d648,ffff80002da2d678) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 vfs_lookup(ffff80002da2d618) at vfs_lookup+0x6df sys/kern/vfs_lookup.c:566 namei(ffff80002da2d618) at namei+0x56a sys/kern/vfs_lookup.c:250 vn_open(ffff80002da2d618,201,a0) at vn_open+0x180 sys/kern/vfs_vnops.c:107 doopenat(ffff80002a680000,4,20000240,200,a0,ffff80002da2d7b0) at doopenat+0x269 sys/kern/vfs_syscalls.c:1126 syscall(ffff80002da2d860) at syscall+0x538 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x14ecdb8e7d0, 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(ffffffff828e005a) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd806edb3c38,ffff80002a5f6400,1,fffffd806edb3ce4,ffff80002da2d1d0,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(fffffd8062ded610,ffff80002da2d648,ffff80002da2d678) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 vfs_lookup(ffff80002da2d618) at vfs_lookup+0x6df sys/kern/vfs_lookup.c:566 namei(ffff80002da2d618) at namei+0x56a sys/kern/vfs_lookup.c:250 vn_open(ffff80002da2d618,201,a0) at vn_open+0x180 sys/kern/vfs_vnops.c:107 doopenat(ffff80002a680000,4,20000240,200,a0,ffff80002da2d7b0) at doopenat+0x269 sys/kern/vfs_syscalls.c:1126 syscall(ffff80002da2d860) at syscall+0x538 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x14ecdb8e7d0, count: -11