panic: bad dir Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 19719 16695 0 0 0x4000000 0 syz-executor.1 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:212 ufs_dirbadentry(ffff800014a061c8,ffff800014a061c8,f2e92d6a0dd2f684) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda898,ffff800014a067d8,ffff800014a06828) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 vfs_lookup(ffff800014a067a8) at vfs_lookup+0x55d sys/kern/vfs_lookup.c:523 namei(ffff800014a067a8) at namei+0x45f sys/kern/vfs_lookup.c:224 sys_unveil(ffff8000ffff8968,ffff800014a068e8,ffff800014a06950) at sys_unveil+0x222 sys/kern/vfs_syscalls.c:914 syscall(ffff800014a069c0) at syscall+0x511 Xsyscall(6,0,8,0,2,6f51f691010) at Xsyscall+0x128 end of kernel end trace frame: 0x3ae, count: 6 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 bad dir ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:212 ufs_dirbadentry(ffff800014a061c8,ffff800014a061c8,f2e92d6a0dd2f684) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda898,ffff800014a067d8,ffff800014a06828) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 vfs_lookup(ffff800014a067a8) at vfs_lookup+0x55d sys/kern/vfs_lookup.c:523 namei(ffff800014a067a8) at namei+0x45f sys/kern/vfs_lookup.c:224 sys_unveil(ffff8000ffff8968,ffff800014a068e8,ffff800014a06950) at sys_unveil+0x222 sys/kern/vfs_syscalls.c:914 syscall(ffff800014a069c0) at syscall+0x511 Xsyscall(6,0,8,0,2,6f51f691010) at Xsyscall+0x128 end of kernel end trace frame: 0x3ae, count: -9 ddb> show registers rdi 0xffffffff81a73677 db_enter+0x17 rsi 0x20e4 __ALIGN_SIZE+0x10e4 rbp 0xffff800014a05fe0 rbx 0xffff800014a06090 rdx 0x20e5 __ALIGN_SIZE+0x10e5 rcx 0xffff800001794000 rax 0xffff800001794000 r8 0xffff800014a05fa0 r9 0x1 r10 0xffff800004396440 r11 0x2912ba42ec7452d1 r12 0x3000000008 r13 0xffff800014a05ff0 r14 0x100 r15 0x1 rip 0xffffffff81a73678 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014a05fd0 ss 0 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=19719 stat=onproc flags process=0 proc=4000000 pri=17, usrpri=77, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff9070,0xffffffff822b78f0 process=0xffff8000ffff7708 user=0xffff800014a01000, vmspace=0xfffffd803f014c60 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 16695 47448 95085 0 2 0 syz-executor.1 *16695 19719 95085 0 7 0x4000000 syz-executor.1 10103 273248 13570 0 2 0x2 syz-executor.0 78153 228817 0 0 3 0x14200 bored sosplice 95085 184932 13570 0 3 0x82 nanosleep syz-executor.1 13570 403135 26865 0 3 0x82 thrsleep syz-fuzzer 13570 4464 26865 0 3 0x4000082 thrsleep syz-fuzzer 13570 375654 26865 0 3 0x4000082 thrsleep syz-fuzzer 13570 492863 26865 0 3 0x4000082 thrsleep syz-fuzzer 13570 421191 26865 0 3 0x4000082 thrsleep syz-fuzzer 13570 266222 26865 0 3 0x4000082 thrsleep syz-fuzzer 13570 206507 26865 0 3 0x4000082 thrsleep syz-fuzzer 13570 245244 26865 0 3 0x4000082 kqread syz-fuzzer 26865 444435 53079 0 3 0x10008a pause ksh 53079 251648 59051 0 3 0x92 select sshd 19297 374235 1 0 3 0x100083 ttyin getty 59051 420124 1 0 3 0x80 select sshd 76171 262490 16875 73 2 0x100090 syslogd 16875 469092 1 0 3 0x100082 netio syslogd 97383 162590 1 77 3 0x100090 poll dhclient 66400 319538 1 0 3 0x80 poll dhclient 74262 98273 0 0 2 0x14200 zerothread 14443 157659 0 0 3 0x14200 aiodoned aiodoned 7846 65944 0 0 3 0x14200 syncer update 13825 107669 0 0 3 0x14200 cleaner cleaner 44123 295285 0 0 3 0x14200 reaper reaper 97773 295357 0 0 3 0x14200 pgdaemon pagedaemon 35975 243279 0 0 3 0x14200 bored crynlk 55387 480105 0 0 3 0x14200 bored crypto 71383 433075 0 0 3 0x40014200 acpi0 acpi0 19489 223484 0 0 3 0x14200 bored softnet 36728 204746 0 0 3 0x14200 bored systqmp 29170 80349 0 0 3 0x14200 bored systq 8772 151511 0 0 3 0x40014200 bored softclock 83891 507180 0 0 3 0x40014200 idle0 52127 372207 0 0 3 0x14200 bored smr 1 45427 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 Kern Lim devbuf 9495 6464K 6843K 78643K 13150 0 0 pcb 23 9K 10K 78643K 558 0 0 rtable 108 3K 4K 78643K 467 0 0 ifaddr 52 12K 13K 78643K 139 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 51 0 0 iov 0 0K 32K 78643K 113 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1199 75K 76K 78643K 2133 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 5K 78643K 16 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 156 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 5 13K 25K 78643K 956 0 0 sigio 0 0K 0K 78643K 10 0 0 proc 42 38K 62K 78643K 461 0 0 subproc 64 65538K 69634K 78643K 175 0 0 NFS srvsock 1 0K 0K 78643K 1 0 0 NFS daemon 1 16K 16K 78643K 1 0 0 ip_moptions 0 0K 0K 78643K 102 0 0 in_multi 33 2K 2K 78643K 104 0 0 ether_multi 1 0K 0K 78643K 5 0 0 mrt 0 0K 0K 78643K 1 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 54 238K 238K 78643K 54 0 0 exec 0 0K 1K 78643K 270 0 0 pagedep 1 8K 8K 78643K 1 0 0 inodedep 1 32K 32K 78643K 1 0 0 newblk 1 0K 0K 78643K 1 0 0 VM swap 7 26K 26K 78643K 7 0 0 UVM amap 78 20K 29K 78643K 3091 0 0 UVM aobj 56 2K 2K 78643K 56 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 0K 78643K 57 0 0 NDP 10 0K 0K 78643K 40 0 0 temp 156 2711K 2839K 78643K 8539 0 0 kqueue 0 0K 0K 78643K 5 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 12 0 6 1 0 1 1 0 8 0 inpcbpl 280 480 0 473 1 0 1 1 0 8 0 plimitpl 152 51 0 44 1 0 1 1 0 8 0 rtentry 112 78 0 34 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 31 0 31 1 1 0 1 0 8 0 tcpcb 544 165 0 161 1 0 1 1 0 8 0 nd6 48 15 0 9 1 0 1 1 0 8 0 ppxss 1128 17 0 17 3 2 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 320 0 132 12 0 12 12 0 8 0 art_table 32 321 0 132 2 0 2 2 0 8 0 art_node 16 77 0 37 1 0 1 1 0 8 0 sysvmsgpl 40 8 0 1 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 152 0 142 1 0 1 1 0 8 0 shmpl 112 54 0 0 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2860 0 1445 47 0 47 47 0 8 0 ffsino 240 2860 0 1445 85 0 85 85 0 8 0 nchpl 144 4335 0 2694 63 1 62 62 0 8 0 uvmvnodes 72 3567 0 0 65 0 65 65 0 8 0 vnodes 200 3567 0 0 188 0 188 188 0 8 0 namei 1024 12937 0 12935 2 1 1 1 0 8 0 scsiplug 64 3 0 3 2 1 1 1 0 8 1 scxspl 192 24730 0 24730 9 8 1 6 0 8 1 sigapl 432 1117 0 1104 2 0 2 2 0 8 0 futexpl 56 16164 0 16164 1 0 1 1 0 8 1 knotepl 112 257 0 238 1 0 1 1 0 8 0 kqueuepl 104 215 0 213 1 0 1 1 0 8 0 pipepl 112 694 0 675 3 2 1 2 0 8 0 fdescpl 424 1118 0 1104 2 0 2 2 0 8 0 filepl 120 6488 0 6393 5 1 4 5 0 8 1 lockfpl 104 312 0 312 2 1 1 1 0 8 1 lockfspl 48 115 0 115 2 1 1 1 0 8 1 sessionpl 112 20 0 10 1 0 1 1 0 8 0 pgrppl 48 32 0 22 1 0 1 1 0 8 0 ucredpl 96 1072 0 1065 1 0 1 1 0 8 0 zombiepl 144 1104 0 1104 2 1 1 1 0 8 1 processpl 840 1133 0 1104 4 0 4 4 0 8 0 procpl 600 2299 0 2262 4 0 4 4 0 8 1 sosppl 128 11 0 11 3 2 1 1 0 8 1 sockpl 384 948 0 931 3 0 3 3 0 8 1 mcl64k 65536 257 0 257 29 28 1 29 0 8 1 mcl16k 16384 3 0 3 3 2 1 1 0 8 1 mcl12k 12288 18 0 18 4 3 1 1 0 8 1 mcl9k 9216 14 0 14 4 3 1 1 0 8 1 mcl8k 8192 13 0 13 3 2 1 1 0 8 1 mcl4k 4096 60 0 60 2 1 1 1 0 8 1 mcl2k2 2112 11 0 11 4 3 1 1 0 8 1 mcl2k 2048 58820 0 58779 13 7 6 11 0 8 0 mtagpl 80 4 0 4 2 2 0 1 0 8 0 mbufpl 256 101171 0 101105 23 16 7 19 0 8 0 bufpl 256 25476 0 22369 198 0 198 198 0 8 0 anonpl 16 119372 0 108552 85 32 53 62 0 62 7 amapchunkpl 152 5034 0 4924 13 6 7 9 0 158 2 amappl16 192 5670 0 5059 64 32 32 43 0 8 1 amappl15 184 807 0 805 1 0 1 1 0 8 0 amappl14 176 125 0 124 2 1 1 1 0 8 0 amappl13 168 6 0 6 1 1 0 1 0 8 0 amappl12 160 13 0 12 1 0 1 1 0 8 0 amappl11 152 61 0 47 1 0 1 1 0 8 0 amappl10 144 79 0 77 2 1 1 1 0 8 0 amappl9 136 600 0 596 1 0 1 1 0 8 0 amappl8 128 154 0 137 1 0 1 1 0 8 0 amappl7 120 46 0 41 1 0 1 1 0 8 0 amappl6 112 63 0 55 1 0 1 1 0 8 0 amappl5 104 150 0 140 1 0 1 1 0 8 0 amappl4 96 1236 0 1210 2 1 1 2 0 8 0 amappl3 88 310 0 305 1 0 1 1 0 8 0 amappl2 80 9391 0 9336 3 1 2 2 0 8 0 amappl1 72 29326 0 28918 23 13 10 19 0 8 0 amappl 72 2595 0 2559 1 0 1 1 0 75 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma256 256 6 0 6 1 1 0 1 0 8 0 dma64 64 259 0 259 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 17 0 17 1 1 0 1 0 8 0 aobjpl 64 55 0 0 1 0 1 1 0 8 0 uaddrrnd 24 1118 0 1104 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1118 0 1104 1 0 1 1 0 8 0 vmmpekpl 168 11901 0 11881 2 0 2 2 0 8 0 vmmpepl 168 119963 0 118435 115 42 73 86 0 357 3 vmsppl 264 1117 0 1104 2 1 1 2 0 8 0 pdppl 4096 2242 0 2208 6 1 5 6 0 8 0 pvpl 32 335876 0 322085 184 41 143 152 0 265 28 pmappl 200 1117 0 1104 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 383 0 60 11 0 11 11 0 8 0