panic: bad dir Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *200135 68745 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(ffff8000149e61e8,ffff8000149e61e8,e4e7e0761f461946) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda7d0,ffff8000149e6290,ffff8000149e6250) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda7d0,ffff8000ffff8968) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff7708,fffffd803efda7d0,c0) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000ffff9070,ffff8000149e6858,ffff8000149e6923) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000ffff9070,ffff8000149e6998,ffff8000149e6a00) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff8000149e6a70) at syscall+0x511 Xsyscall(6,0,8,0,2,447f3741010) at Xsyscall+0x128 end of kernel end trace frame: 0x3ae, 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 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(ffff8000149e61e8,ffff8000149e61e8,e4e7e0761f461946) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda7d0,ffff8000149e6290,ffff8000149e6250) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda7d0,ffff8000ffff8968) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff7708,fffffd803efda7d0,c0) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000ffff9070,ffff8000149e6858,ffff8000149e6923) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000ffff9070,ffff8000149e6998,ffff8000149e6a00) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff8000149e6a70) at syscall+0x511 Xsyscall(6,0,8,0,2,447f3741010) at Xsyscall+0x128 end of kernel end trace frame: 0x3ae, count: -10 ddb> show registers rdi 0xffffffff81a73677 db_enter+0x17 rsi 0x210b __ALIGN_SIZE+0x110b rbp 0xffff8000149e6000 rbx 0xffff8000149e60b0 rdx 0x210c __ALIGN_SIZE+0x110c rcx 0xffff800000993000 rax 0xffff800000993000 r8 0xffff8000149e5fc0 r9 0x1 r10 0xffff80000098e880 r11 0xfcef677a41c3274a r12 0x3000000008 r13 0xffff8000149e6010 r14 0x100 r15 0x1 rip 0xffffffff81a73678 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149e5ff0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=200135 stat=onproc flags process=0 proc=4000000 pri=17, usrpri=75, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff8968,0xffff8000ffff92d8 process=0xffff8000ffff7708 user=0xffff8000149e1000, 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 62510 208905 83412 0 2 0 syz-executor.0 62510 285239 83412 0 3 0x4000080 fsleep syz-executor.0 68745 479533 36402 0 2 0 syz-executor.1 *68745 200135 36402 0 7 0x4000000 syz-executor.1 64355 16325 0 0 3 0x14200 bored sosplice 36402 172520 57278 0 3 0x82 nanosleep syz-executor.1 83412 54284 57278 0 3 0x82 nanosleep syz-executor.0 57278 516929 72337 0 3 0x82 kqread syz-fuzzer 57278 20971 72337 0 3 0x4000082 thrsleep syz-fuzzer 57278 328726 72337 0 3 0x4000082 thrsleep syz-fuzzer 57278 336371 72337 0 3 0x4000082 thrsleep syz-fuzzer 57278 343048 72337 0 3 0x4000082 thrsleep syz-fuzzer 57278 122769 72337 0 3 0x4000082 thrsleep syz-fuzzer 57278 350576 72337 0 3 0x4000082 thrsleep syz-fuzzer 72337 23816 74196 0 3 0x10008a pause ksh 74196 81225 28995 0 3 0x92 select sshd 21792 47449 1 0 3 0x100083 ttyin getty 28995 136831 1 0 3 0x80 select sshd 35980 448554 32969 73 2 0x100090 syslogd 32969 519099 1 0 3 0x100082 netio syslogd 36006 297944 1 77 3 0x100090 poll dhclient 61919 73701 1 0 3 0x80 poll dhclient 97790 433149 0 0 2 0x14200 zerothread 11201 334215 0 0 3 0x14200 aiodoned aiodoned 45002 365770 0 0 3 0x14200 syncer update 70309 202624 0 0 3 0x14200 cleaner cleaner 90543 57012 0 0 3 0x14200 reaper reaper 3550 335620 0 0 3 0x14200 pgdaemon pagedaemon 65935 43567 0 0 3 0x14200 bored crynlk 63518 513728 0 0 3 0x14200 bored crypto 83583 476443 0 0 3 0x40014200 acpi0 acpi0 88993 433618 0 0 3 0x14200 bored softnet 83292 322017 0 0 3 0x14200 bored systqmp 59354 243213 0 0 3 0x14200 bored systq 26836 174606 0 0 3 0x40014200 bored softclock 18201 366113 0 0 3 0x40014200 idle0 96269 146959 0 0 3 0x14200 bored smr 1 67352 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 9486 6335K 6852K 78643K 11678 0 0 pcb 23 9K 10K 78643K 301 0 0 rtable 111 4K 4K 78643K 296 0 0 ifaddr 52 12K 13K 78643K 100 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 31 0 0 iov 0 0K 24K 78643K 60 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1198 75K 76K 78643K 1579 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 8 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 0K 78643K 52 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 6 17K 25K 78643K 466 0 0 sigio 0 0K 0K 78643K 8 0 0 proc 42 38K 62K 78643K 326 0 0 subproc 64 65538K 69634K 78643K 68 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 26 0 0 in_multi 33 2K 2K 78643K 47 0 0 ether_multi 1 0K 0K 78643K 2 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 60 265K 265K 78643K 60 0 0 exec 0 0K 1K 78643K 208 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 82 20K 21K 78643K 1892 0 0 UVM aobj 20 2K 2K 78643K 20 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 16 0 0 NDP 10 0K 0K 78643K 26 0 0 temp 154 2706K 2832K 78643K 6595 0 0 kqueue 0 0K 0K 78643K 6 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 6 0 0 1 0 1 1 0 8 0 inpcbpl 280 218 0 211 2 1 1 2 0 8 0 plimitpl 152 39 0 32 1 0 1 1 0 8 0 rtentry 112 45 0 1 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 68 0 64 1 0 1 1 0 8 0 nd6 48 6 0 0 1 0 1 1 0 8 0 ppxss 1128 10 0 10 2 1 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 188 0 0 12 0 12 12 0 8 0 art_table 32 189 0 0 2 0 2 2 0 8 0 art_node 16 44 0 4 1 0 1 1 0 8 0 sysvmsgpl 40 16 0 5 1 0 1 1 0 8 0 semapl 112 48 0 38 1 0 1 1 0 8 0 shmpl 112 18 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2120 0 707 46 0 46 46 0 8 0 ffsino 240 2120 0 707 84 0 84 84 0 8 0 nchpl 144 2960 0 1342 61 0 61 61 0 8 0 uvmvnodes 72 2419 0 0 44 0 44 44 0 8 0 vnodes 200 2419 0 0 128 0 128 128 0 8 0 namei 1024 8116 0 8115 2 1 1 1 0 8 0 scxspl 192 17556 0 17556 7 6 1 6 0 8 1 sigapl 432 636 0 622 2 0 2 2 0 8 0 futexpl 56 7426 0 7425 1 0 1 1 0 8 0 knotepl 112 155 0 136 1 0 1 1 0 8 0 kqueuepl 104 139 0 137 1 0 1 1 0 8 0 pipepl 112 364 0 343 2 1 1 1 0 8 0 fdescpl 424 637 0 622 2 0 2 2 0 8 0 filepl 120 3580 0 3484 4 0 4 4 0 8 1 lockfpl 104 168 0 168 2 1 1 1 0 8 1 lockfspl 48 58 0 58 2 1 1 1 0 8 1 sessionpl 112 17 0 7 1 0 1 1 0 8 0 pgrppl 48 19 0 9 1 0 1 1 0 8 0 ucredpl 96 522 0 515 1 0 1 1 0 8 0 zombiepl 144 622 0 622 2 1 1 1 0 8 1 processpl 840 652 0 622 4 0 4 4 0 8 0 procpl 600 1251 0 1213 4 0 4 4 0 8 1 sosppl 128 11 0 11 1 1 0 1 0 8 0 sockpl 384 454 0 437 3 0 3 3 0 8 1 mcl64k 65536 16 0 16 3 2 1 1 0 8 1 mcl16k 16384 3 0 3 1 1 0 1 0 8 0 mcl12k 12288 5 0 5 2 1 1 1 0 8 1 mcl9k 9216 3 0 3 2 2 0 1 0 8 0 mcl8k 8192 8 0 8 3 2 1 1 0 8 1 mcl4k 4096 31 0 31 2 1 1 1 0 8 1 mcl2k2 2112 4 0 4 3 2 1 1 0 8 1 mcl2k 2048 57784 0 57739 15 8 7 13 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 96373 0 96291 12 5 7 9 0 8 0 bufpl 256 20754 0 17647 199 0 199 199 0 8 0 anonpl 16 72789 0 61612 65 2 63 63 0 62 17 amapchunkpl 152 2569 0 2452 9 3 6 7 0 158 1 amappl16 192 3219 0 2618 46 7 39 43 0 8 8 amappl15 184 638 0 633 1 0 1 1 0 8 0 amappl14 176 28 0 27 2 1 1 1 0 8 0 amappl13 168 7 0 6 1 0 1 1 0 8 0 amappl12 160 10 0 7 1 0 1 1 0 8 0 amappl11 152 44 0 30 1 0 1 1 0 8 0 amappl10 144 64 0 62 2 1 1 1 0 8 0 amappl9 136 553 0 550 1 0 1 1 0 8 0 amappl8 128 130 0 111 1 0 1 1 0 8 0 amappl7 120 31 0 28 1 0 1 1 0 8 0 amappl6 112 53 0 46 1 0 1 1 0 8 0 amappl5 104 135 0 125 1 0 1 1 0 8 0 amappl4 96 833 0 803 2 1 1 2 0 8 0 amappl3 88 123 0 118 1 0 1 1 0 8 0 amappl2 80 4982 0 4917 2 0 2 2 0 8 0 amappl1 72 20443 0 20020 24 15 9 19 0 8 0 amappl 72 1491 0 1452 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 19 0 0 1 0 1 1 0 8 0 uaddrrnd 24 637 0 622 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 637 0 622 1 0 1 1 0 8 0 vmmpekpl 168 8172 0 8152 2 0 2 2 0 8 1 vmmpepl 168 71981 0 70366 105 22 83 83 0 357 12 vmsppl 264 636 0 622 2 1 1 2 0 8 0 pdppl 4096 1280 0 1244 6 1 5 6 0 8 0 pvpl 32 222803 0 208601 164 6 158 158 0 265 41 pmappl 200 636 0 622 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 346 0 23 10 0 10 10 0 8 0