panic: ufsdirhash_lookup: bad offset in hash array Stopped at db_enter+0x1c: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *286820 8644 0 0 0x4000000 0 syz-executor.7 db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff828e6e73) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd80756b53d0,ffffffff8282c0b6,2,fffffd80756b547c,ffff8000378272d0,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(fffffd807a8f9af8,ffff800037827478,ffff800037827418) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 unveil_find_cover(fffffd807a8f9af8,ffff80002f519d58) at unveil_find_cover+0x132 sys/kern/kern_unveil.c:277 unveil_start_relative(ffff80002f519d58,ffff8000378277b8,fffffd807a8f9af8) at unveil_start_relative+0xdb sys/kern/kern_unveil.c:606 namei(ffff8000378277b8) at namei+0x45c sys/kern/vfs_lookup.c:237 vn_open(ffff8000378277b8,201,0) at vn_open+0x180 sys/kern/vfs_vnops.c:107 doopenat(ffff80002f519d58,4,20000240,200,0,ffff800037827950) at doopenat+0x269 sys/kern/vfs_syscalls.c:1126 syscall(ffff800037827a00) at syscall+0x538 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x91c964e9ca0, 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(ffffffff828e6e73) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd80756b53d0,ffffffff8282c0b6,2,fffffd80756b547c,ffff8000378272d0,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(fffffd807a8f9af8,ffff800037827478,ffff800037827418) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 unveil_find_cover(fffffd807a8f9af8,ffff80002f519d58) at unveil_find_cover+0x132 sys/kern/kern_unveil.c:277 unveil_start_relative(ffff80002f519d58,ffff8000378277b8,fffffd807a8f9af8) at unveil_start_relative+0xdb sys/kern/kern_unveil.c:606 namei(ffff8000378277b8) at namei+0x45c sys/kern/vfs_lookup.c:237 vn_open(ffff8000378277b8,201,0) at vn_open+0x180 sys/kern/vfs_vnops.c:107 doopenat(ffff80002f519d58,4,20000240,200,0,ffff800037827950) at doopenat+0x269 sys/kern/vfs_syscalls.c:1126 syscall(ffff800037827a00) at syscall+0x538 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x91c964e9ca0, count: -12 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000378270f0 rbx 0xffff800000e36740 rdx 0xffff800000dffb40 rcx 0 rax 0xffff80002f519d58 r8 0x101010101010101 r9 0x8080808080808080 r10 0x301f9a398e12df35 r11 0x7efc8b4062682b9a r12 0 r13 0xffff800000e6a000 r14 0 r15 0x1 rip 0xffffffff8239b6ec db_enter+0x1c cs 0x8 rflags 0x246 rsp 0xffff8000378270e0 ss 0x10 db_enter+0x1c: addq $0x8,%rsp ddb> show proc PROC (syz-executor.7) tid=286820 pid=8644 tcnt=2 stat=onproc flags process=0 proc=4000000 runpri=75, usrpri=75, slppri=17, nice=20 wchan=0x0, wmesg=, ps_single=0x0 forw=0xffffffffffffffff, list=0xffff80002f518818,0xffff80002a6a2560 process=0xffff8000ffff2e30 user=0xffff800037822000, vmspace=0xfffffd80709b5b50 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 45865 470575 46234 0 2 0 syz-executor.5 43241 93467 41975 0 3 0x80 nanoslp syz-executor.6 43241 431788 41975 0 3 0x4000080 fsleep syz-executor.6 43241 275853 41975 0 3 0x4000080 fsleep syz-executor.6 43241 46766 41975 0 3 0x4000080 fsleep syz-executor.6 92948 405395 60757 0 3 0x80 fsleep syz-executor.3 92948 480049 60757 0 3 0x4000080 fsleep syz-executor.3 92948 72555 60757 0 3 0x4000000 inode syz-executor.3 92948 507238 60757 0 2 0x4000000 syz-executor.3 8644 46544 4965 0 3 0x80 fsleep syz-executor.7 * 8644 286820 4965 0 7 0x4000000 syz-executor.7 63324 85484 16890 0 3 0x80 fsleep syz-executor.0 63324 77623 16890 0 3 0x4000080 netio syz-executor.0 90744 486213 78082 0 3 0x80 fsleep syz-executor.1 90744 454701 78082 0 3 0x4000080 netio syz-executor.1 78843 508569 0 0 3 0x14280 nfsidl nfsio 66658 247235 0 0 3 0x14280 nfsidl nfsio 28753 360697 0 0 3 0x14280 nfsidl nfsio 1679 189605 0 0 3 0x14280 nfsidl nfsio 26345 151727 0 0 3 0x14280 nfsidl nfsio 37542 125484 0 0 3 0x14280 nfsidl nfsio 76384 40937 0 0 3 0x14280 nfsidl nfsio 54568 503039 0 0 3 0x14280 nfsidl nfsio 28845 169732 0 0 3 0x14280 nfsidl nfsio 87652 5840 0 0 3 0x14280 nfsidl nfsio 84419 436899 0 0 3 0x14280 nfsidl nfsio 78456 180607 0 0 3 0x14280 nfsidl nfsio 79081 102153 0 0 3 0x14280 nfsidl nfsio 68928 37200 0 0 3 0x14280 nfsidl nfsio 42616 414281 0 0 3 0x14280 nfsidl nfsio 42933 414104 0 0 3 0x14280 nfsidl nfsio 19091 273849 0 0 3 0x14280 nfsidl nfsio 17701 509405 0 0 3 0x14280 nfsidl nfsio 39880 36063 0 0 3 0x14280 nfsidl nfsio 79835 253903 0 0 3 0x14280 nfsidl nfsio 41975 456014 70675 0 3 0x82 nanoslp syz-executor.6 46234 394670 70675 0 3 0x82 nanoslp syz-executor.5 78082 435277 70675 0 3 0x82 nanoslp syz-executor.1 60757 419783 70675 0 3 0x82 nanoslp syz-executor.3 79642 330356 0 0 3 0x14200 bored sosplice 4965 503421 70675 0 3 0x82 nanoslp syz-executor.7 89329 393794 70675 0 2 0x2 syz-executor.4 17340 336708 70675 0 2 0x2 syz-executor.2 16890 428143 70675 0 3 0x82 nanoslp syz-executor.0 70675 291155 34955 0 3 0x1a000082 thrsleep syz-fuzzer 70675 399371 34955 0 3 0x1e000082 nanoslp syz-fuzzer 70675 21922 34955 0 3 0x1e000082 wait syz-fuzzer 70675 317687 34955 0 3 0x1e000082 wait syz-fuzzer 70675 184320 34955 0 3 0x1e000082 wait syz-fuzzer 70675 392178 34955 0 3 0x1e000082 wait syz-fuzzer 70675 520664 34955 0 3 0x1e000082 thrsleep syz-fuzzer 70675 393823 34955 0 3 0x1e000082 thrsleep syz-fuzzer 70675 191396 34955 0 3 0x1e000082 wait syz-fuzzer 70675 305937 34955 0 3 0x1e000082 kqread syz-fuzzer 70675 482305 34955 0 3 0x1e000082 thrsleep syz-fuzzer 70675 228748 34955 0 3 0x1e000082 wait syz-fuzzer 70675 366362 34955 0 3 0x1e000082 wait syz-fuzzer 70675 501812 34955 0 3 0x1e000082 wait syz-fuzzer 34955 417964 49339 0 3 0x810008a sigsusp ksh 49339 263528 30388 0 3 0x1800009a kqread sshd 26051 105695 1 0 3 0x18100083 ttyin getty 30388 211396 1 0 3 0x18000088 kqread sshd 3024 221801 91795 73 3 0x19100090 kqread syslogd 91795 304639 1 0 3 0x18100082 netio syslogd 37768 28611 1 0 3 0x18100080 kqread resolvd 44666 63154 56554 77 3 0x18100092 kqread dhcpleased 97671 266530 56554 77 3 0x18100092 kqread dhcpleased 56554 59890 1 0 3 0x18000080 kqread dhcpleased 96568 54837 0 0 3 0x14200 bored smr 86956 63328 0 0 2 0x14200 zerothread 11518 86417 0 0 3 0x14200 aiodoned aiodoned 71558 72533 0 0 3 0x14200 syncer update 40458 375117 0 0 3 0x14200 cleaner cleaner 20849 241408 0 0 3 0x14200 reaper reaper 99683 3120 0 0 3 0x14200 pgdaemon pagedaemon 14819 249435 0 0 3 0x14200 bored viomb 42847 294117 0 0 3 0x40014200 acpi0 acpi0 27237 119793 0 0 3 0x14200 bored softnet3 27890 477852 0 0 3 0x14200 bored softnet2 33139 293556 0 0 3 0x14200 bored softnet1 74617 395548 0 0 3 0x14200 bored softnet0 20949 135413 0 0 3 0x14200 bored systqmp 36250 43084 0 0 3 0x14200 bored systq 19040 498796 0 0 3 0x40014200 tmoslp softclock 90877 24222 0 0 3 0x40014200 idle0 1 30476 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 10200 6418K 7099K 166960K 16389 0 pcb 15 16K 18K 166960K 328 0 rtable 219 6K 7K 166960K 1087 0 pf 29 8K 9K 166960K 132 0 ifaddr 40 11K 11K 166960K 135 0 ifgroup 50 2K 2K 166960K 207 0 sysctl 3 1K 1K 166960K 3 0 counters 30 17K 17K 166960K 74 0 ioctlops 0 0K 2K 166960K 368 0 iov 1 2K 26K 166960K 656 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1533 96K 96K 166960K 4296 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 9K 166960K 49 0 VM map 2 1K 1K 166960K 2 0 sem 12 1K 1K 166960K 111 0 dirhash 81 14K 15K 166960K 1581 0 ACPI 1697 195K 286K 166960K 12548 0 file desc 16 57K 69K 166960K 3715 0 sigio 0 0K 0K 166960K 78 0 proc 61 67K 75K 166960K 1013 0 subproc 104 6K 6K 166960K 260 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 116 0 in_multi 93 6K 7K 166960K 288 0 ether_multi 1 0K 0K 166960K 3 0 mrt 1 0K 0K 166960K 4 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 805 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 392 184K 1072K 166960K 36513 0 UVM aobj 131 4K 4K 166960K 131 0 pinsyscall 22 44K 100K 166960K 1587 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 1 0K 0K 166960K 118 0 NDP 11 0K 1K 166960K 96 0 temp 75 6804K 7076K 166960K 51293 0 kqueue 12 18K 24K 166960K 340 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 166 0 163 1 0 1 1 0 8 0 rtentry 112 350 0 249 4 0 4 4 0 8 0 unpcb 144 3022 0 3005 10 1 9 10 0 8 8 syncache 336 66 0 66 2 1 1 1 0 8 1 tcpqe 32 191 0 191 2 1 1 1 0 8 1 tcpcb 808 1823 0 1806 14 3 11 12 0 8 9 arp 88 49 0 35 1 0 1 1 0 8 0 ipq 40 10 0 10 1 0 1 1 0 8 1 ipqe 40 153 0 153 1 0 1 1 0 8 1 inpcb 360 3549 0 3525 25 14 11 17 0 8 8 nd6 104 64 0 40 1 0 1 1 0 8 0 pkpcb 40 73 0 73 1 0 1 1 0 8 1 kcovpl 48 20 0 12 1 0 1 1 0 8 0 ppxss 1072 17 0 17 1 0 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 1256 0 820 29 0 29 29 0 8 0 art_table 32 1257 0 820 4 0 4 4 0 8 0 art_node 16 338 0 246 1 0 1 1 0 8 0 sysvmsgpl 40 12 0 6 1 0 1 1 0 8 0 semupl 112 3 0 3 1 1 0 1 0 8 0 semapl 112 105 0 95 1 0 1 1 0 8 0 shmpl 112 128 0 0 4 0 4 4 0 8 0 dirhash 1024 549 0 509 6 0 6 6 0 8 0 dino2pl 256 7032 0 5487 97 0 97 97 0 8 0 ffsino 240 7032 0 5487 91 0 91 91 0 8 0 nchpl 144 12091 0 10361 66 0 66 66 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 44318 0 44314 4 3 1 3 0 8 0 vcpupl 2048 88 0 0 11 0 11 11 0 8 0 vmpool 664 157 0 69 8 0 8 8 0 8 0 kstatmem 264 110 0 88 2 0 2 2 0 8 0 scxspl 216 36491 0 36491 9 1 8 8 1 8 8 plimitpl 152 679 0 664 1 0 1 1 0 8 0 sigapl 424 4169 0 4105 8 0 8 8 0 8 0 futexpl 64 35862 0 35854 1 0 1 1 0 8 0 knotepl 120 34767 0 34685 11 0 11 11 0 8 7 kqueuepl 184 697 0 689 7 0 7 7 0 8 6 pipepl 288 769 0 741 16 9 7 11 0 8 5 fdescpl 432 3972 0 3945 4 0 4 4 0 8 0 filepl 120 27449 0 27205 21 5 16 16 0 8 6 lockfpl 104 1635 0 1633 2 0 2 2 0 8 1 lockfspl 48 462 0 460 1 0 1 1 0 8 0 sessionpl 144 35 0 19 1 0 1 1 0 8 0 pgrppl 48 48 0 32 1 0 1 1 0 8 0 ucredpl 104 5184 0 5173 1 0 1 1 0 8 0 zombiepl 144 4105 0 4105 2 1 1 1 0 8 1 processpl 1072 4169 0 4105 5 0 5 5 0 8 0 procpl 680 9715 0 9629 10 1 9 9 0 8 1 sosppl 168 57 0 54 1 0 1 1 0 8 0 sockpl 488 6813 0 6769 110 95 15 40 0 8 8 mcl64k 65536 136 0 136 2 1 1 1 0 8 1 mcl16k 16384 176 0 176 2 1 1 1 0 8 1 mcl12k 12288 152 0 152 2 1 1 1 0 8 1 mcl9k 9216 96 0 96 2 1 1 1 0 8 1 mcl8k 8192 354 0 353 2 1 1 1 0 8 0 mcl4k 4096 480 0 480 3 1 2 2 0 8 2 mcl2k2 2112 21 0 21 1 0 1 1 0 8 1 mcl2k 2048 78758 0 78709 35 22 13 29 0 8 6 mtagpl 96 694 0 413 11 0 11 11 0 8 2 mbufpl 256 157550 0 157132 103 61 42 70 0 8 8 bufpl 280 10978 0 4642 453 0 453 453 0 8 0 anonpl 24 485948 0 471979 106 0 106 106 0 188 17 amapchunkpl 152 357643 0 356773 4424 4231 193 4422 0 158 158 amappl16 200 10473 0 10037 36 3 33 36 0 8 8 amappl15 192 43 0 41 1 0 1 1 0 8 0 amappl14 184 194 0 182 2 0 2 2 0 8 0 amappl13 176 22 0 22 2 1 1 1 0 8 1 amappl12 168 4774 0 4746 2 0 2 2 0 8 0 amappl11 160 61 0 50 1 0 1 1 0 8 0 amappl10 152 50 0 42 1 0 1 1 0 8 0 amappl9 144 157 0 156 2 1 1 1 0 8 0 amappl8 136 235 0 169 3 0 3 3 0 8 0 amappl7 128 92 0 80 1 0 1 1 0 8 0 amappl6 120 471 0 455 2 1 1 2 0 8 0 amappl5 112 254 0 241 1 0 1 1 0 8 0 amappl4 104 666 0 635 2 0 2 2 0 8 0 amappl3 96 23259 0 23178 3 0 3 3 0 8 0 amappl2 88 4622 0 4547 4 1 3 4 0 8 0 amappl1 80 23028 0 22543 21 10 11 21 0 8 0 amappl 88 35741 0 35495 7 0 7 7 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 130 0 0 3 0 3 3 0 8 0 uaddrrnd 24 4129 0 4014 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 4129 0 4014 1 0 1 1 0 8 0 vmmpekpl 168 32003 0 31937 4 0 4 4 0 8 0 vmmpepl 168 256069 0 253759 165 36 129 131 0 357 21 vmsppl 352 4128 0 4014 11 0 11 11 0 8 0 rwobjpl 24 70743 0 63246 46 0 46 46 0 8 0 pdppl 4096 8264 0 8116 305 155 150 152 0 8 2 pvpl 32 1261035 0 1241439 391 204 187 358 0 265 24 pmappl 216 4128 0 4014 7 0 7 7 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 736 0 261 16 1 15 15 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(ffffffff828e6e73) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd80756b53d0,ffffffff8282c0b6,2,fffffd80756b547c,ffff8000378272d0,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(fffffd807a8f9af8,ffff800037827478,ffff800037827418) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 unveil_find_cover(fffffd807a8f9af8,ffff80002f519d58) at unveil_find_cover+0x132 sys/kern/kern_unveil.c:277 unveil_start_relative(ffff80002f519d58,ffff8000378277b8,fffffd807a8f9af8) at unveil_start_relative+0xdb sys/kern/kern_unveil.c:606 namei(ffff8000378277b8) at namei+0x45c sys/kern/vfs_lookup.c:237 vn_open(ffff8000378277b8,201,0) at vn_open+0x180 sys/kern/vfs_vnops.c:107 doopenat(ffff80002f519d58,4,20000240,200,0,ffff800037827950) at doopenat+0x269 sys/kern/vfs_syscalls.c:1126 syscall(ffff800037827a00) at syscall+0x538 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x91c964e9ca0, 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(ffffffff828e6e73) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd80756b53d0,ffffffff8282c0b6,2,fffffd80756b547c,ffff8000378272d0,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(fffffd807a8f9af8,ffff800037827478,ffff800037827418) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 unveil_find_cover(fffffd807a8f9af8,ffff80002f519d58) at unveil_find_cover+0x132 sys/kern/kern_unveil.c:277 unveil_start_relative(ffff80002f519d58,ffff8000378277b8,fffffd807a8f9af8) at unveil_start_relative+0xdb sys/kern/kern_unveil.c:606 namei(ffff8000378277b8) at namei+0x45c sys/kern/vfs_lookup.c:237 vn_open(ffff8000378277b8,201,0) at vn_open+0x180 sys/kern/vfs_vnops.c:107 doopenat(ffff80002f519d58,4,20000240,200,0,ffff800037827950) at doopenat+0x269 sys/kern/vfs_syscalls.c:1126 syscall(ffff800037827a00) at syscall+0x538 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x91c964e9ca0, count: -12