panic: ufsdirhash_lookup: bad offset in hash array Stopped at db_enter+0x1c: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *360822 49436 0 0 0x4000000 0 syz-executor.3 db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82953117) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd8069984a58,ffff80002a5e6c00,1,fffffd8069984b04,ffff80002a6c39f8,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(fffffd8062ebe438,ffff80002a6c3ca8,ffff80002a6c3cd8) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 vfs_lookup(ffff80002a6c3c78) at vfs_lookup+0x6dc sys/kern/vfs_lookup.c:566 namei(ffff80002a6c3c78) at namei+0x55a sys/kern/vfs_lookup.c:250 dofaccessat(ffff80002a6b77e8,3,200000c0,4,0) at dofaccessat+0x15c sys/kern/vfs_syscalls.c:1994 syscall(ffff80002a6c3e80) at syscall+0x751 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xf664388e250, 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+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82953117) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd8069984a58,ffff80002a5e6c00,1,fffffd8069984b04,ffff80002a6c39f8,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(fffffd8062ebe438,ffff80002a6c3ca8,ffff80002a6c3cd8) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 vfs_lookup(ffff80002a6c3c78) at vfs_lookup+0x6dc sys/kern/vfs_lookup.c:566 namei(ffff80002a6c3c78) at namei+0x55a sys/kern/vfs_lookup.c:250 dofaccessat(ffff80002a6b77e8,3,200000c0,4,0) at dofaccessat+0x15c sys/kern/vfs_syscalls.c:1994 syscall(ffff80002a6c3e80) at syscall+0x751 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xf664388e250, count: -10 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002a6c3820 rbx 0 rdx 0xffff800000dd88c0 rcx 0 rax 0xffff80002a6b77e8 r8 0x101010101010101 r9 0x8080808080808080 r10 0x731e79583b71b994 r11 0x6dcf2cdd82ea5c14 r12 0 r13 0xffff800000e20790 r14 0 r15 0x1 rip 0xffffffff826ca47c db_enter+0x1c cs 0x8 rflags 0x246 rsp 0xffff80002a6c3810 ss 0x10 db_enter+0x1c: addq $0x8,%rsp ddb> show proc PROC (syz-executor.3) tid=360822 pid=49436 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=0xffff80002a6b6000,0xffff80002a6b62b8 process=0xffff800031570ca8 user=0xffff80002a6be000, vmspace=0xfffffd8059c741c8 estcpu=34, cpticks=1, pctcpu=0.1, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 36272 247316 74008 0 2 0 syz-executor.0 36272 23219 74008 0 2 0x4000000 syz-executor.0 21669 97270 44858 0 2 0 syz-executor.4 21669 487127 44858 0 3 0x4000080 fsleep syz-executor.4 94905 93669 49590 0 2 0 syz-executor.7 94905 4496 49590 0 3 0x4000080 fsleep syz-executor.7 94905 85557 49590 0 2 0x4000000 syz-executor.7 28834 28712 62691 0 3 0x80 nanoslp syz-executor.1 28834 333325 62691 0 3 0x4000080 netio syz-executor.1 24577 351754 64154 0 2 0 syz-executor.2 24577 426726 64154 0 3 0x4000080 fsleep syz-executor.2 49436 282598 99736 0 2 0 syz-executor.3 *49436 360822 99736 0 7 0x4000000 syz-executor.3 62691 450322 1920 0 3 0x82 nanoslp syz-executor.1 76155 89013 1920 0 2 0x2 syz-executor.6 49590 345993 1920 0 3 0x82 nanoslp syz-executor.7 74008 375735 1920 0 3 0x82 nanoslp syz-executor.0 64644 115071 1920 0 2 0x2 syz-executor.5 99736 385228 1920 0 3 0x82 nanoslp syz-executor.3 64154 367538 1920 0 3 0x82 nanoslp syz-executor.2 44858 3695 1920 0 3 0x82 nanoslp syz-executor.4 41474 76405 1 0 3 0x100083 ttyin getty 80800 179919 0 0 3 0x14200 bored sosplice 1920 205205 70494 0 3 0x2000082 wait syz-fuzzer 1920 98676 70494 0 3 0x6000082 nanoslp syz-fuzzer 1920 34793 70494 0 3 0x6000082 wait syz-fuzzer 1920 254593 70494 0 3 0x6000082 thrsleep syz-fuzzer 1920 154293 70494 0 3 0x6000082 thrsleep syz-fuzzer 1920 87369 70494 0 3 0x6000082 wait syz-fuzzer 1920 413422 70494 0 3 0x6000082 wait syz-fuzzer 1920 51566 70494 0 3 0x6000082 thrsleep syz-fuzzer 1920 363130 70494 0 3 0x6000082 kqread syz-fuzzer 1920 376726 70494 0 3 0x6000082 wait syz-fuzzer 1920 100383 70494 0 3 0x6000082 thrsleep syz-fuzzer 1920 26782 70494 0 3 0x6000082 wait syz-fuzzer 1920 153523 70494 0 3 0x6000082 wait syz-fuzzer 1920 445752 70494 0 3 0x6000082 wait syz-fuzzer 1920 434455 70494 0 3 0x6000082 thrsleep syz-fuzzer 70494 477836 36417 0 3 0x10008a sigsusp ksh 36417 49436 75634 0 3 0x9a kqread sshd 75634 318453 1 0 3 0x88 kqread sshd 45441 168668 86626 73 3 0x1100090 kqread syslogd 86626 137306 1 0 3 0x100082 netio syslogd 75844 467446 1 0 3 0x100080 kqread resolvd 485 514568 0 0 3 0x14200 bored smr 6215 70904 0 0 2 0x14200 zerothread 47714 11608 0 0 3 0x14200 aiodoned aiodoned 98313 417464 0 0 3 0x14200 syncer update 55857 180836 0 0 3 0x14200 cleaner cleaner 5697 390714 0 0 3 0x14200 reaper reaper 32777 478534 0 0 3 0x14200 pgdaemon pagedaemon 25577 150874 0 0 3 0x14200 bored viomb 41042 115354 0 0 3 0x40014200 acpi0 acpi0 23504 478810 0 0 3 0x14200 bored softnet3 42234 84459 0 0 3 0x14200 bored softnet2 15389 76960 0 0 3 0x14200 bored softnet1 92478 393912 0 0 3 0x14200 bored softnet0 10346 471993 0 0 3 0x14200 bored systqmp 71863 147021 0 0 3 0x14200 bored systq 54215 401243 0 0 3 0x40014200 tmoslp softclock 45637 214008 0 0 3 0x40014200 idle0 1 446641 0 0 3 0x80082 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 10189 6422K 6867K 166960K 17321 0 pcb 15 26K 28K 166960K 839 0 rtable 199 14K 15K 166960K 2726 0 pf 33 9K 9K 166960K 385 0 ifaddr 41 12K 14K 166960K 389 0 ifgroup 58 2K 2K 166960K 634 0 sysctl 4 1K 1K 166960K 4 0 counters 32 17K 17K 166960K 181 0 ioctlops 0 0K 2K 166960K 433 0 iov 0 0K 28K 166960K 1350 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1410 88K 89K 166960K 5484 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 93 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 1509 0 dirhash 87 15K 17K 166960K 4809 0 ACPI 1697 195K 286K 166960K 12548 0 file desc 16 57K 77K 166960K 8808 0 sigio 0 0K 0K 166960K 197 0 proc 52 42K 91K 166960K 2420 0 subproc 104 6K 6K 166960K 877 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 970 0 in_multi 77 5K 7K 166960K 825 0 ether_multi 1 0K 0K 166960K 4 0 mrt 0 0K 0K 166960K 4 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 175 784K 784K 166960K 175 0 exec 0 0K 1K 166960K 1973 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 432 442K 443K 166960K 80617 0 UVM aobj 131 6K 7K 166960K 137 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 319 0 NDP 13 0K 1K 166960K 294 0 temp 74 6764K 6892K 166960K 156395 0 kqueue 6 10K 26K 166960K 645 0 SYN cache 2 104K 112K 166960K 3 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle rtpcb 120 587 0 585 5 4 1 4 0 8 0 rtentry 112 858 0 770 4 0 4 4 0 8 0 unpcb 144 7700 0 7684 26 23 3 12 0 8 2 syncache 320 57 0 57 4 3 1 1 0 8 1 sackhl 24 1 0 1 1 1 0 1 0 8 0 tcpqe 32 264 0 264 4 3 1 1 0 8 1 tcpcb 808 2052 0 2035 26 22 4 14 0 8 0 arp 88 167 0 153 1 0 1 1 0 8 0 ipq 40 12 0 10 3 2 1 1 0 8 0 ipqe 40 72 0 67 3 2 1 1 0 8 0 inpcb 344 7845 0 7827 61 52 9 19 0 8 6 nd6 104 201 0 183 1 0 1 1 0 8 0 pkpcb 40 96 0 96 3 3 0 1 0 8 0 kcovpl 48 67 0 59 1 0 1 1 0 8 0 ppxss 1072 37 0 37 3 3 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 3264 0 2891 68 39 29 30 0 8 1 art_table 32 3265 0 2891 4 0 4 4 0 8 0 art_node 16 854 0 774 1 0 1 1 0 8 0 sysvmsgpl 40 5 0 2 1 0 1 1 0 8 0 semupl 112 3 0 3 1 1 0 1 0 8 0 semapl 112 1504 0 1494 1 0 1 1 0 8 0 shmpl 112 134 0 6 4 0 4 4 0 8 0 dirhash 1024 1627 0 1585 9 3 6 6 0 8 0 dino2pl 256 13287 0 11770 95 0 95 95 0 8 0 ffsino 240 13287 0 11770 90 0 90 90 0 8 0 nchpl 144 24619 0 22976 63 0 63 63 0 8 0 uvmvnodes 80 6810 0 0 139 0 139 139 0 8 0 vnodes 216 6810 0 0 379 0 379 379 0 8 0 namei 1024 89080 0 89078 5 4 1 3 0 8 0 vcpupl 2048 125 0 0 16 0 16 16 0 8 0 vmpool 664 127 0 2 11 0 11 11 0 8 0 kstatmem 264 324 0 298 2 0 2 2 0 8 0 scxspl 216 85454 0 85454 15 11 4 8 1 8 4 plimitpl 152 1362 0 1348 1 0 1 1 0 8 0 sigapl 424 9001 0 8960 8 2 6 8 0 8 0 futexpl 64 78784 0 78781 1 0 1 1 0 8 0 knotepl 120 74562 0 74496 44 33 11 18 0 8 8 kqueuepl 184 1645 0 1638 9 7 2 4 0 8 1 pipepl 288 1664 0 1634 13 10 3 7 0 8 0 fdescpl 432 8963 0 8939 4 0 4 4 0 8 1 filepl 120 57304 0 57064 41 30 11 19 0 8 3 lockfpl 104 2697 0 2695 4 2 2 2 0 8 1 lockfspl 48 766 0 764 1 0 1 1 0 8 0 sessionpl 144 84 0 69 1 0 1 1 0 8 0 pgrppl 48 254 0 239 1 0 1 1 0 8 0 ucredpl 104 8807 0 8799 1 0 1 1 0 8 0 zombiepl 144 8960 0 8960 2 1 1 1 0 8 1 processpl 1072 9001 0 8960 5 1 4 5 0 8 0 procpl 680 21336 0 21274 10 3 7 9 0 8 0 sosppl 168 131 0 131 4 3 1 1 0 8 1 sockpl 488 16285 0 16249 321 308 13 50 0 8 8 mcl64k 65536 326 0 326 5 4 1 1 0 8 1 mcl16k 16384 178 0 178 4 3 1 1 0 8 1 mcl12k 12288 315 0 315 5 4 1 1 0 8 1 mcl9k 9216 120 0 120 4 3 1 1 0 8 1 mcl8k 8192 585 0 585 5 4 1 1 0 8 1 mcl4k 4096 950 0 950 6 5 1 3 0 8 1 mcl2k2 2112 82 0 82 4 3 1 1 0 8 1 mcl2k 2048 86856 0 86812 34 26 8 26 0 8 2 mtagpl 96 493 0 493 6 5 1 4 0 8 1 mbufpl 256 231491 0 231379 721 709 12 401 0 8 1 bufpl 280 20602 0 13790 487 0 487 487 0 8 0 anonpl 24 985296 0 972344 232 123 109 152 0 188 9 amapchunkpl 152 257364 0 256523 94 57 37 64 0 158 0 amappl16 200 19045 0 18583 84 49 35 37 0 8 8 amappl15 192 13 0 13 1 1 0 1 0 8 0 amappl14 184 329 0 321 2 1 1 2 0 8 0 amappl13 176 26 0 25 1 0 1 1 0 8 0 amappl12 168 10525 0 10499 2 0 2 2 0 8 0 amappl11 160 49 0 44 1 0 1 1 0 8 0 amappl10 152 86 0 77 1 0 1 1 0 8 0 amappl9 144 177 0 177 2 1 1 1 0 8 1 amappl8 136 508 0 418 4 0 4 4 0 8 0 amappl7 128 328 0 304 2 0 2 2 0 8 0 amappl6 120 1123 0 1109 1 0 1 1 0 8 0 amappl5 112 263 0 256 1 0 1 1 0 8 0 amappl4 104 896 0 870 2 1 1 2 0 8 0 amappl3 96 50093 0 50014 3 0 3 3 0 8 0 amappl2 88 9966 0 9907 3 1 2 3 0 8 0 amappl1 80 44220 0 43804 22 10 12 22 0 8 0 amappl 88 79396 0 79154 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 136 0 6 3 0 3 3 0 8 0 uaddrrnd 24 9090 0 8941 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 9090 0 8941 1 0 1 1 0 8 0 vmmpekpl 168 63790 0 63713 4 0 4 4 0 8 0 vmmpepl 168 561671 0 559498 182 57 125 134 0 357 5 vmsppl 352 9089 0 8941 14 0 14 14 0 8 0 rwobjpl 24 136135 0 127813 51 0 51 51 0 8 0 pdppl 4096 18186 0 18007 729 548 181 183 0 8 2 pvpl 32 2645251 0 2627140 484 291 193 336 0 265 17 pmappl 216 9089 0 8941 9 0 9 9 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 1840 0 1382 22 7 15 21 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(ffffffff82953117) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd8069984a58,ffff80002a5e6c00,1,fffffd8069984b04,ffff80002a6c39f8,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(fffffd8062ebe438,ffff80002a6c3ca8,ffff80002a6c3cd8) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 vfs_lookup(ffff80002a6c3c78) at vfs_lookup+0x6dc sys/kern/vfs_lookup.c:566 namei(ffff80002a6c3c78) at namei+0x55a sys/kern/vfs_lookup.c:250 dofaccessat(ffff80002a6b77e8,3,200000c0,4,0) at dofaccessat+0x15c sys/kern/vfs_syscalls.c:1994 syscall(ffff80002a6c3e80) at syscall+0x751 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xf664388e250, count: -10 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82953117) at panic+0x165 sys/kern/subr_prf.c:198 ufsdirhash_lookup(fffffd8069984a58,ffff80002a5e6c00,1,fffffd8069984b04,ffff80002a6c39f8,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(fffffd8062ebe438,ffff80002a6c3ca8,ffff80002a6c3cd8) at VOP_LOOKUP+0x5c sys/kern/vfs_vops.c:85 vfs_lookup(ffff80002a6c3c78) at vfs_lookup+0x6dc sys/kern/vfs_lookup.c:566 namei(ffff80002a6c3c78) at namei+0x55a sys/kern/vfs_lookup.c:250 dofaccessat(ffff80002a6b77e8,3,200000c0,4,0) at dofaccessat+0x15c sys/kern/vfs_syscalls.c:1994 syscall(ffff80002a6c3e80) at syscall+0x751 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xf664388e250, count: -10