panic: ffs_blkfree: bad size Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 514885 51969 0 0 0 1 syz-executor.1 *117251 37699 0 0x2 0 0 syz-executor.0 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:212 ffs_blkfree(fffffd806e1fc550,16,4000) at ffs_blkfree+0xa0b sys/ufs/ffs/ffs_alloc.c:1280 ffs_truncate(fffffd806e1fc550,0,0,ffffffffffffffff) at ffs_truncate+0x1291 sys/ufs/ffs/ffs_inode.c:365 ufs_inactive(ffff800020c13338) at ufs_inactive+0x159 sys/ufs/ufs/ufs_inode.c:85 VOP_INACTIVE(fffffd8065dd9b98,ffff800020b38ee8) at VOP_INACTIVE+0x4c sys/kern/vfs_vops.c:572 vput(fffffd8065dd9b98) at vput+0xb6 sys/kern/vfs_subr.c:765 ufs_remove(ffff800020c13428) at ufs_remove+0x13c sys/ufs/ufs/ufs_vnops.c:620 VOP_REMOVE(fffffd8065da7d58,fffffd8065dd9b98,ffff800020c13518) at VOP_REMOVE+0x61 sys/kern/vfs_vops.c:378 dounlinkat(ffff800020b38ee8,ffffff9c,7f7ffffe62e0,0) at dounlinkat+0x195 sys/kern/vfs_syscalls.c:1805 syscall(ffff800020c136a0) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800020c136a0) at syscall+0x552 sys/arch/amd64/amd64/trap.c:554 Xsyscall(6,a,7f7ffffe62e0,a,c709bf5f380,7f7ffffe67a0) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe6790, 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{0}> ddb{0}> set $lines = 0 ddb{0}> set $maxwidth = 0 ddb{0}> show panic ffs_blkfree: bad size ddb{0}> 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 ffs_blkfree(fffffd806e1fc550,16,4000) at ffs_blkfree+0xa0b sys/ufs/ffs/ffs_alloc.c:1280 ffs_truncate(fffffd806e1fc550,0,0,ffffffffffffffff) at ffs_truncate+0x1291 sys/ufs/ffs/ffs_inode.c:365 ufs_inactive(ffff800020c13338) at ufs_inactive+0x159 sys/ufs/ufs/ufs_inode.c:85 VOP_INACTIVE(fffffd8065dd9b98,ffff800020b38ee8) at VOP_INACTIVE+0x4c sys/kern/vfs_vops.c:572 vput(fffffd8065dd9b98) at vput+0xb6 sys/kern/vfs_subr.c:765 ufs_remove(ffff800020c13428) at ufs_remove+0x13c sys/ufs/ufs/ufs_vnops.c:620 VOP_REMOVE(fffffd8065da7d58,fffffd8065dd9b98,ffff800020c13518) at VOP_REMOVE+0x61 sys/kern/vfs_vops.c:378 dounlinkat(ffff800020b38ee8,ffffff9c,7f7ffffe62e0,0) at dounlinkat+0x195 sys/kern/vfs_syscalls.c:1805 syscall(ffff800020c136a0) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800020c136a0) at syscall+0x552 sys/arch/amd64/amd64/trap.c:554 Xsyscall(6,a,7f7ffffe62e0,a,c709bf5f380,7f7ffffe67a0) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe6790, count: -12 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800020c12f50 rbx 0xffff800020c13000 rdx 0xffff800020b38ee8 rcx 0 rax 0 r8 0xffffffff8140fa33 kprintf+0x173 r9 0x1 r10 0x25 r11 0xbb69db8dd146c28 r12 0x3000000008 r13 0xffff800020c12f60 r14 0x100 r15 0x1 rip 0xffffffff8162e618 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c12f40 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.0) pid=117251 stat=onproc flags process=2 proc=0 pri=17, usrpri=82, nice=20 forw=0xffffffffffffffff, list=0xffff800020b389f8,0xffff800020b38c80 process=0xffff800020b8ce00 user=0xffff800020c0e000, vmspace=0xfffffd807effe2e0 estcpu=36, cpticks=3, pctcpu=0.17 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 51969 514885 44940 0 7 0 syz-executor.1 51969 404439 44940 0 2 0x4000000 syz-executor.1 51969 54222 44940 0 2 0x4000080 syz-executor.1 40155 54229 1 0 3 0x100083 ttyin getty 44940 6378 97573 0 2 0x482 syz-executor.1 28707 505989 0 0 3 0x14200 bored sosplice *37699 117251 97573 0 7 0x2 syz-executor.0 97573 375786 17709 0 3 0x82 thrsleep syz-fuzzer 97573 111668 17709 0 2 0x4000482 syz-fuzzer 97573 337546 17709 0 3 0x4000082 thrsleep syz-fuzzer 97573 248377 17709 0 3 0x4000082 kqread syz-fuzzer 97573 507316 17709 0 3 0x4000082 thrsleep syz-fuzzer 97573 326488 17709 0 3 0x4000082 thrsleep syz-fuzzer 97573 407831 17709 0 3 0x4000082 thrsleep syz-fuzzer 97573 375599 17709 0 3 0x4000082 thrsleep syz-fuzzer 97573 358191 17709 0 3 0x4000082 thrsleep syz-fuzzer 97573 336961 17709 0 3 0x4000082 thrsleep syz-fuzzer 17709 516939 62394 0 3 0x10008a pause ksh 62394 123612 79261 0 3 0x92 select sshd 79261 451544 1 0 3 0x80 select sshd 46725 14597 70341 74 3 0x100092 bpf pflogd 70341 413897 1 0 3 0x80 netio pflogd 76899 236427 89502 73 2 0x100090 syslogd 89502 104190 1 0 3 0x100082 netio syslogd 8026 265895 1 77 3 0x100090 poll dhclient 91351 443318 1 0 3 0x80 poll dhclient 55303 261973 0 0 3 0x14200 pgzero zerothread 20543 497856 0 0 3 0x14200 aiodoned aiodoned 67006 50740 0 0 3 0x14200 syncer update 80433 364052 0 0 3 0x14200 cleaner cleaner 96158 179485 0 0 3 0x14200 reaper reaper 55521 515701 0 0 3 0x14200 pgdaemon pagedaemon 93485 498321 0 0 3 0x14200 bored crynlk 37880 133181 0 0 3 0x14200 bored crypto 58185 383831 0 0 3 0x40014200 acpi0 acpi0 14445 172263 0 0 3 0x40014200 idle1 20573 268152 0 0 3 0x14200 bored softnet 5262 271200 0 0 3 0x14200 bored systqmp 86804 373195 0 0 3 0x14200 bored systq 90568 184754 0 0 3 0x40014200 bored softclock 91795 149908 0 0 3 0x40014200 idle0 93281 112148 0 0 2 0x40014200 smr 1 23419 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 37699 (syz-executor.0) thread 0xffff800020b38ee8 (117251) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff823673d0) #0 witness_lock+0x52e sys/kern/subr_witness.c:1163 #1 __mp_acquire_count+0x51 sys/kern/kern_lock.c:227 #2 mi_switch+0x38f sys/kern/sched_bsd.c:439 #3 sleep_finish+0x113 sys/kern/kern_synch.c:303 #4 tsleep+0x198 sleep_finish_timeout sys/kern/kern_synch.c:327 [inline] #4 tsleep+0x198 sleep_finish_all sys/kern/kern_synch.c:157 [inline] #4 tsleep+0x198 sys/kern/kern_synch.c:148 #5 biowait+0xa1 sys/kern/vfs_bio.c:1230 #6 bwrite+0x1e1 sys/kern/vfs_bio.c:747 #7 ffs_update+0x2c2 sys/ufs/ffs/ffs_inode.c:113 #8 ffs_truncate+0xc76 #9 ufs_inactive+0x159 sys/ufs/ufs/ufs_inode.c:85 #10 VOP_INACTIVE+0x4c sys/kern/vfs_vops.c:572 #11 vput+0xb6 sys/kern/vfs_subr.c:765 #12 ufs_remove+0x13c sys/ufs/ufs/ufs_vnops.c:620 #13 VOP_REMOVE+0x61 sys/kern/vfs_vops.c:378 #14 dounlinkat+0x195 sys/kern/vfs_syscalls.c:1805 #15 syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] #15 syscall+0x552 sys/arch/amd64/amd64/trap.c:554 #16 Xsyscall+0x128 exclusive rrwlock inode r = 0 (0xfffffd806e1fc5e8) #0 witness_lock+0x52e sys/kern/subr_witness.c:1163 #1 rw_enter+0x46d sys/kern/kern_rwlock.c:306 #2 rrw_enter+0x4f sys/kern/kern_rwlock.c:435 #3 VOP_LOCK+0x4b sys/kern/vfs_vops.c:602 #4 vn_lock+0x6e sys/kern/vfs_vnops.c:561 #5 vget+0x1c3 sys/kern/vfs_subr.c:672 #6 ufs_ihashget+0x141 sys/ufs/ufs/ufs_ihash.c:119 #7 ffs_vget+0x74 sys/ufs/ffs/ffs_vfsops.c:1323 #8 ufs_lookup+0x1575 sys/ufs/ufs/ufs_lookup.c:487 #9 VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 #10 vfs_lookup+0x77d sys/kern/vfs_lookup.c:571 #11 namei+0x61c sys/kern/vfs_lookup.c:252 #12 dounlinkat+0x99 sys/kern/vfs_syscalls.c:1769 #13 syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] #13 syscall+0x552 sys/arch/amd64/amd64/trap.c:554 #14 Xsyscall+0x128 exclusive rrwlock inode r = 0 (0xfffffd806e28ac58) #0 witness_lock+0x52e sys/kern/subr_witness.c:1163 #1 rw_enter+0x46d sys/kern/kern_rwlock.c:306 #2 rrw_enter+0x4f sys/kern/kern_rwlock.c:435 #3 VOP_LOCK+0x4b sys/kern/vfs_vops.c:602 #4 vn_lock+0x6e sys/kern/vfs_vnops.c:561 #5 vget+0x1c3 sys/kern/vfs_subr.c:672 #6 cache_lookup+0x2cf sys/kern/vfs_cache.c:224 #7 ufs_lookup+0x1ad sys/ufs/ufs/ufs_lookup.c:162 #8 VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 #9 vfs_lookup+0x77d sys/kern/vfs_lookup.c:571 #10 namei+0x61c sys/kern/vfs_lookup.c:252 #11 dounlinkat+0x99 sys/kern/vfs_syscalls.c:1769 #12 syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] #12 syscall+0x552 sys/arch/amd64/amd64/trap.c:554 #13 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9612 6896K 15008K 78643K 23827 0 0 pcb 25 9K 11K 78643K 2315 0 0 rtable 113 4K 5K 78643K 1204 0 0 ifaddr 76 18K 20K 78643K 562 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1759 0 0 iov 0 0K 24K 78643K 628 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1200 75K 77K 78643K 5963 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 82 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 568 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 5 13K 25K 78643K 5231 0 0 sigio 4 0K 0K 78643K 65 0 0 proc 54 51K 83K 78643K 1075 0 0 subproc 32 2K 2K 78643K 53 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 477 0 0 in_multi 33 2K 2K 78643K 202 0 0 ether_multi 1 0K 0K 78643K 23 0 0 mrt 0 0K 0K 78643K 28 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 102 450K 450K 78643K 102 0 0 exec 0 0K 1K 78643K 668 0 0 pfkey data 0 0K 4K 78643K 4 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 101 21K 31K 78643K 18187 0 0 UVM aobj 130 8K 8K 78643K 145 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 1K 78643K 260 0 0 NDP 17 0K 0K 78643K 150 0 0 temp 207 2744K 3384K 78643K 19500 0 0 kqueue 0 0K 0K 78643K 46 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb{0}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 8 0 2 1 0 1 1 0 8 0 inpcbpl 280 2090 0 2083 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 71 0 27 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 158 0 158 1 1 0 1 0 8 0 tcpcb 544 776 0 772 1 0 1 1 0 8 0 rttmr 72 9 0 9 7 7 0 1 0 8 0 nd6 48 9 0 3 1 0 1 1 0 8 0 ppxss 1128 102 0 102 17 17 0 1 0 8 0 pffrag 232 3 0 3 2 2 0 1 0 482 0 pffrnode 88 3 0 3 2 2 0 1 0 8 0 pffrent 40 10 0 10 3 3 0 1 0 8 0 pfosfp 40 846 0 423 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfstitem 24 64 0 57 1 0 1 1 0 8 0 pfstkey 112 64 0 57 1 0 1 1 0 8 0 pfstate 328 64 0 57 2 0 2 2 0 8 1 pfrule 1360 21 0 16 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 263 0 72 13 1 12 13 0 8 0 art_table 32 264 0 72 2 0 2 2 0 8 0 art_node 16 64 0 24 1 0 1 1 0 8 0 sysvmsgpl 40 34 0 18 1 0 1 1 0 8 0 semapl 112 566 0 556 1 0 1 1 0 8 0 shmpl 112 143 0 15 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 9906 0 8426 48 0 48 48 0 8 0 ffsino 272 9906 0 8426 100 1 99 99 0 8 0 nchpl 144 17362 0 15730 62 0 62 62 0 8 0 uvmvnodes 72 5926 0 0 108 0 108 108 0 8 0 vnodes 200 5926 0 0 312 0 312 312 0 8 0 namei 1024 54258 0 54258 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 7 0 7 6 6 0 1 0 8 0 scxspl 192 52242 0 52242 28 27 1 6 0 8 1 plimitpl 152 429 0 421 1 0 1 1 0 8 0 sigapl 432 5435 0 5420 3 1 2 3 0 8 0 futexpl 56 61050 0 61050 2 1 1 1 0 8 1 knotepl 112 913 0 894 1 0 1 1 0 8 0 kqueuepl 104 1095 0 1093 1 0 1 1 0 8 0 pipepl 112 3238 0 3219 9 8 1 2 0 8 0 fdescpl 488 5436 0 5420 3 0 3 3 0 8 0 filepl 152 31652 0 31550 13 8 5 7 0 8 1 lockfpl 104 1826 0 1826 3 2 1 1 0 8 1 lockfspl 48 649 0 649 3 2 1 1 0 8 1 sessionpl 112 26 0 15 1 0 1 1 0 8 0 pgrppl 48 85 0 74 1 0 1 1 0 8 0 ucredpl 96 6395 0 6386 1 0 1 1 0 8 0 zombiepl 144 5420 0 5420 3 2 1 1 0 8 1 processpl 896 5452 0 5420 4 0 4 4 0 8 0 procpl 632 17115 0 17072 15 10 5 5 0 8 1 srpgc 64 11 0 11 8 8 0 1 0 8 0 sosppl 128 65 0 65 15 14 1 1 0 8 1 sockpl 384 4087 0 4068 8 5 3 4 0 8 1 mcl64k 65536 583 0 0 68 34 34 64 0 8 1 mcl16k 16384 9 0 0 2 0 2 2 0 8 0 mcl12k 12288 25 0 0 2 0 2 2 0 8 0 mcl9k 9216 17 0 0 2 0 2 2 0 8 0 mcl8k 8192 11 0 0 2 0 2 2 0 8 0 mcl4k 4096 17 0 0 3 0 3 3 0 8 0 mcl2k2 2112 13 0 0 1 0 1 1 0 8 0 mcl2k 2048 169 0 0 19 3 16 19 0 8 0 mtagpl 80 4 0 0 1 0 1 1 0 8 0 mbufpl 256 694 0 0 37 0 37 37 0 8 0 bufpl 256 19466 0 12436 440 0 440 440 0 8 0 anonpl 16 536521 0 525193 177 115 62 63 0 125 12 amapchunkpl 152 32902 0 32793 53 46 7 15 0 158 1 amappl16 192 30149 0 29531 197 157 40 44 0 8 8 amappl15 184 3 0 3 3 3 0 1 0 8 0 amappl14 176 67 0 60 1 0 1 1 0 8 0 amappl13 168 2620 0 2618 1 0 1 1 0 8 0 amappl12 160 17 0 16 1 0 1 1 0 8 0 amappl11 152 60 0 45 1 0 1 1 0 8 0 amappl10 144 86 0 80 1 0 1 1 0 8 0 amappl9 136 3178 0 3174 1 0 1 1 0 8 0 amappl8 128 2749 0 2721 1 0 1 1 0 8 0 amappl7 120 43 0 38 1 0 1 1 0 8 0 amappl6 112 58 0 51 1 0 1 1 0 8 0 amappl5 104 175 0 160 1 0 1 1 0 8 0 amappl4 96 5771 0 5737 2 1 1 2 0 8 0 amappl3 88 390 0 379 1 0 1 1 0 8 0 amappl2 80 43568 0 43497 4 2 2 3 0 8 0 amappl1 72 126028 0 125593 25 15 10 19 0 8 0 amappl 80 17454 0 17416 1 0 1 1 0 84 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 144 0 15 3 0 3 3 0 8 0 uaddrrnd 24 5436 0 5420 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 5436 0 5420 1 0 1 1 0 8 0 vmmpekpl 168 45846 0 45819 2 0 2 2 0 8 0 vmmpepl 168 664690 0 662935 218 125 93 98 0 357 11 vmsppl 368 5435 0 5420 2 0 2 2 0 8 0 pdppl 4096 10880 0 10840 6 0 6 6 0 8 0 pvpl 32 1379570 0 1365053 327 168 159 161 0 265 33 pmappl 232 5435 0 5420 2 1 1 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 703 0 43 20 0 20 20 0 8 0