panic: pool_cache_item_magic_check: mbufpl cpu free list modified: item addr 0xfffffd806dbe0600+16 0x0!=0xa025c184cf031ab5 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 162090 71149 0 0x2 0 0 syz-executor.1 *512288 62199 0 0x12 0 1 sshd db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:207 pool_cache_get(ffffffff8263c960) at pool_cache_get+0x323 pool_cache_item_magic_check sys/kern/subr_pool.c:1789 [inline] pool_cache_get(ffffffff8263c960) at pool_cache_get+0x323 sys/kern/subr_pool.c:1892 pool_get() at pool_get+0x91 sys/kern/subr_pool.c:572 m_gethdr(1,1) at m_gethdr+0x4c sys/kern/uipc_mbuf.c:283 m_getuio(ffff800020aeaf78,0,4a7c,ffff800020aeb0f8) at m_getuio+0xe4 sys/kern/uipc_socket.c:556 sosend(fffffd806e973c08,0,ffff800020aeb0f8,0,0,80) at sosend+0x510 sys/kern/uipc_socket.c:511 dofilewritev(ffff800020ac1b38,4,ffff800020aeb0f8,0,ffff800020aeb1e0) at dofilewritev+0x1b7 sys/kern/sys_generic.c:364 sys_write(ffff800020ac1b38,ffff800020aeb190,ffff800020aeb1e0) at sys_write+0x83 sys/kern/sys_generic.c:284 syscall(ffff800020aeb260) at syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800020aeb260) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,4,1cb74af1616b,4,4,1cb97a528b40) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffdc1f0, count: 4 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{1}> ddb{1}> set $lines = 0 ddb{1}> set $maxwidth = 0 ddb{1}> show panic pool_cache_item_magic_check: mbufpl cpu free list modified: item addr 0xfffffd806dbe0600+16 0x0!=0xa025c184cf031ab5 ddb{1}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:207 pool_cache_get(ffffffff8263c960) at pool_cache_get+0x323 pool_cache_item_magic_check sys/kern/subr_pool.c:1789 [inline] pool_cache_get(ffffffff8263c960) at pool_cache_get+0x323 sys/kern/subr_pool.c:1892 pool_get() at pool_get+0x91 sys/kern/subr_pool.c:572 m_gethdr(1,1) at m_gethdr+0x4c sys/kern/uipc_mbuf.c:283 m_getuio(ffff800020aeaf78,0,4a7c,ffff800020aeb0f8) at m_getuio+0xe4 sys/kern/uipc_socket.c:556 sosend(fffffd806e973c08,0,ffff800020aeb0f8,0,0,80) at sosend+0x510 sys/kern/uipc_socket.c:511 dofilewritev(ffff800020ac1b38,4,ffff800020aeb0f8,0,ffff800020aeb1e0) at dofilewritev+0x1b7 sys/kern/sys_generic.c:364 sys_write(ffff800020ac1b38,ffff800020aeb190,ffff800020aeb1e0) at sys_write+0x83 sys/kern/sys_generic.c:284 syscall(ffff800020aeb260) at syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800020aeb260) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,4,1cb74af1616b,4,4,1cb97a528b40) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffdc1f0, count: -11 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800020aeacb0 rbx 0xffff800020aead60 rdx 0xffff800020ac1b38 rcx 0 rax 0 r8 0xffffffff81241baf kprintf+0x16f r9 0x1 r10 0x25 r11 0x463bf58436a582d r12 0x3000000008 r13 0xffff800020aeacc0 r14 0x100 r15 0x1 rip 0xffffffff816bc498 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020aeaca0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (sshd) pid=512288 stat=onproc flags process=12 proc=0 pri=50, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff800020ac0778,0xffff800020ac0298 process=0xffff800020a8b890 user=0xffff800020ae6000, vmspace=0xfffffd806e7e0008 estcpu=0, cpticks=2, pctcpu=0.0 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 10718 168401 42304 0 3 0x2 biowait syz-executor.0 71149 162090 42304 0 7 0x2 syz-executor.1 6906 219042 0 0 3 0x14200 acct acct 80188 233972 0 0 3 0x14200 bored sosplice 42304 166893 96445 0 3 0x82 nanosleep syz-fuzzer 42304 407749 96445 0 3 0x4000082 nanosleep syz-fuzzer 42304 66216 96445 0 3 0x4000082 thrsleep syz-fuzzer 42304 504512 96445 0 3 0x4000082 thrsleep syz-fuzzer 42304 94593 96445 0 3 0x4000082 thrsleep syz-fuzzer 42304 170185 96445 0 3 0x4000082 thrsleep syz-fuzzer 42304 136133 96445 0 3 0x4000082 thrsleep syz-fuzzer 42304 516081 96445 0 2 0x4000002 syz-fuzzer 42304 68001 96445 0 3 0x4000082 thrsleep syz-fuzzer 42304 192777 96445 0 3 0x4000082 thrsleep syz-fuzzer 42304 489301 96445 0 3 0x4000082 kqread syz-fuzzer 96445 455396 62199 0 3 0x10008a pause ksh *62199 512288 12281 0 7 0x12 sshd 36650 462844 1 0 3 0x100083 ttyin getty 12281 279873 1 0 3 0x80 select sshd 53092 245558 34330 74 3 0x100092 bpf pflogd 34330 56967 1 0 3 0x80 netio pflogd 30404 277475 34001 73 3 0x100090 kqread syslogd 34001 174936 1 0 3 0x100082 netio syslogd 88985 250126 1 77 3 0x100090 poll dhclient 90151 289168 1 0 3 0x80 poll dhclient 53492 93501 0 0 3 0x14200 pgzero zerothread 3663 88434 0 0 3 0x14200 aiodoned aiodoned 94748 40613 0 0 3 0x14200 syncer update 39640 230681 0 0 3 0x14200 cleaner cleaner 74914 306217 0 0 3 0x14200 reaper reaper 98544 84105 0 0 3 0x14200 pgdaemon pagedaemon 87015 26799 0 0 3 0x14200 bored crynlk 69264 142528 0 0 3 0x14200 bored crypto 37921 467288 0 0 3 0x40014200 acpi0 acpi0 70979 126199 0 0 3 0x40014200 idle1 44289 273181 0 0 3 0x14200 bored softnet 88612 186884 0 0 3 0x14200 bored systqmp 30111 264996 0 0 3 0x14200 bored systq 55831 512504 0 0 3 0x40014200 bored softclock 5615 497106 0 0 3 0x40014200 idle0 73971 504530 0 0 3 0x14200 bored smr 1 247145 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 10718 (syz-executor.0) thread 0xffff800020ab0508 (168401) exclusive rrwlock inode r = 0 (0xfffffd806f97ce70) #0 witness_lock+0x52e sys/kern/subr_witness.c:1163 #1 rw_enter+0x447 sys/kern/kern_rwlock.c:306 #2 rrw_enter+0x4f sys/kern/kern_rwlock.c:435 #3 VOP_LOCK+0xf0 sys/kern/vfs_vops.c:615 #4 vn_lock+0x81 sys/kern/vfs_vnops.c:562 #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+0x14b4 sys/ufs/ufs/ufs_lookup.c:487 #9 VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:91 #10 vfs_lookup+0x7a6 sys/kern/vfs_lookup.c:568 #11 namei+0x63c sys/kern/vfs_lookup.c:249 #12 dounlinkat+0x99 sys/kern/vfs_syscalls.c:1785 #13 syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:92 [inline] #13 syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555 #14 Xsyscall+0x128 exclusive rrwlock inode r = 0 (0xfffffd806587f4e0) #0 witness_lock+0x52e sys/kern/subr_witness.c:1163 #1 rw_enter+0x447 sys/kern/kern_rwlock.c:306 #2 rrw_enter+0x4f sys/kern/kern_rwlock.c:435 #3 VOP_LOCK+0xf0 sys/kern/vfs_vops.c:615 #4 vn_lock+0x81 sys/kern/vfs_vnops.c:562 #5 vget+0x1c3 sys/kern/vfs_subr.c:672 #6 cache_lookup+0x2bb sys/kern/vfs_cache.c:224 #7 ufs_lookup+0x1bc sys/ufs/ufs/ufs_lookup.c:162 #8 VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:91 #9 vfs_lookup+0x7a6 sys/kern/vfs_lookup.c:568 #10 namei+0x63c sys/kern/vfs_lookup.c:249 #11 dounlinkat+0x99 sys/kern/vfs_syscalls.c:1785 #12 syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:92 [inline] #12 syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555 #13 Xsyscall+0x128 Process 71149 (syz-executor.1) thread 0xffff800020ab1650 (162090) exclusive rrwlock inode r = 0 (0xfffffd806e1b6808) #0 witness_lock+0x52e sys/kern/subr_witness.c:1163 #1 rw_enter+0x447 sys/kern/kern_rwlock.c:306 #2 rrw_enter+0x4f sys/kern/kern_rwlock.c:435 #3 VOP_LOCK+0xf0 sys/kern/vfs_vops.c:615 #4 vn_lock+0x81 sys/kern/vfs_vnops.c:562 #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+0x14b4 sys/ufs/ufs/ufs_lookup.c:487 #9 VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:91 #10 vfs_lookup+0x7a6 sys/kern/vfs_lookup.c:568 #11 namei+0x63c sys/kern/vfs_lookup.c:249 #12 dounlinkat+0x99 sys/kern/vfs_syscalls.c:1785 #13 syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:92 [inline] #13 syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555 #14 Xsyscall+0x128 exclusive rrwlock inode r = 0 (0xfffffd806e13b700) #0 witness_lock+0x52e sys/kern/subr_witness.c:1163 #1 rw_enter+0x447 sys/kern/kern_rwlock.c:306 #2 rrw_enter+0x4f sys/kern/kern_rwlock.c:435 #3 VOP_LOCK+0xf0 sys/kern/vfs_vops.c:615 #4 vn_lock+0x81 sys/kern/vfs_vnops.c:562 #5 vget+0x1c3 sys/kern/vfs_subr.c:672 #6 cache_lookup+0x2bb sys/kern/vfs_cache.c:224 #7 ufs_lookup+0x1bc sys/ufs/ufs/ufs_lookup.c:162 #8 VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:91 #9 vfs_lookup+0x7a6 sys/kern/vfs_lookup.c:568 #10 namei+0x63c sys/kern/vfs_lookup.c:249 #11 dounlinkat+0x99 sys/kern/vfs_syscalls.c:1785 #12 syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:92 [inline] #12 syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555 #13 Xsyscall+0x128 Process 42304 (syz-fuzzer) thread 0xffff800020a5e008 (516081) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff8263e610) #0 witness_lock+0x52e sys/kern/subr_witness.c:1163 #1 uvm_map_inentry+0xbe sys/uvm/uvm_map.c:1872 #2 syscall+0x397 mi_syscall sys/sys/syscall_mi.h:71 [inline] #2 syscall+0x397 sys/arch/amd64/amd64/trap.c:555 #3 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9589 6441K 14696K 78643K 16825 0 0 pcb 13 12K 14K 78643K 551 0 0 rtable 114 13K 14K 78643K 2134 0 0 ifaddr 87 19K 22K 78643K 615 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1605 0 0 iov 0 0K 28K 78643K 588 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1206 76K 77K 78643K 3727 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 37 0 0 VM map 2 1K 1K 78643K 8 0 0 sem 12 0K 0K 78643K 376 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 4 9K 25K 78643K 2789 0 0 sigio 0 0K 0K 78643K 43 0 0 proc 62 63K 95K 78643K 1558 0 0 subproc 32 2K 2K 78643K 391 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 155 0 0 in_multi 33 2K 2K 78643K 364 0 0 ether_multi 1 0K 0K 78643K 15 0 0 mrt 0 0K 0K 78643K 15 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 78 344K 344K 78643K 78 0 0 exec 0 0K 1K 78643K 690 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 115 22K 32K 78643K 10395 0 0 UVM aobj 91 3K 4K 78643K 107 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 644 0 0 NDP 21 0K 1K 78643K 199 0 0 temp 237 3561K 3663K 78643K 94084 0 0 kqueue 0 0K 0K 78643K 12 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb{1}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 85 0 80 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 228 0 226 1 0 1 1 0 8 0 rtentry 112 375 0 334 2 0 2 2 0 8 0 unpcb 120 1489 0 1479 4 3 1 2 0 8 0 syncache 264 9 0 9 5 5 0 1 0 8 0 tcpqe 32 6604 0 6604 2 2 0 1 0 8 0 tcpcb 544 1947 0 1943 16 7 9 11 0 8 8 inpcb 280 5718 0 5711 23 14 9 13 0 8 8 rttmr 72 3 0 3 3 3 0 1 0 8 0 ip6q 72 1 0 1 1 1 0 1 0 8 0 ip6af 40 2 0 2 1 1 0 1 0 8 0 nd6 48 52 0 48 3 2 1 1 0 8 0 pkpcb 40 2 0 2 1 1 0 1 0 8 0 ppxss 1128 74 0 74 7 6 1 1 0 8 1 pffrag 232 29 0 29 10 9 1 1 0 482 1 pffrnode 88 29 0 29 10 9 1 1 0 8 1 pffrent 40 64 0 64 10 9 1 1 0 8 1 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 152 0 128 1 0 1 1 0 8 0 pfstkey 112 152 0 128 2 0 2 2 0 8 0 pfstate 328 152 0 128 5 2 3 5 0 8 0 pfrule 1360 21 0 16 2 1 1 2 0 8 0 art_heap8 4096 7 0 6 5 4 1 3 0 8 0 art_heap4 256 1524 0 1310 31 17 14 15 0 8 0 art_table 32 1531 0 1316 2 0 2 2 0 8 0 art_node 16 374 0 337 1 0 1 1 0 8 0 sysvmsgpl 40 45 0 32 1 0 1 1 0 8 0 semupl 112 3 0 3 1 1 0 1 0 8 0 semapl 112 372 0 362 1 0 1 1 0 8 0 shmpl 112 105 0 16 3 0 3 3 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 5795 0 4392 46 0 46 46 0 8 0 ffsino 272 5795 0 4392 95 0 95 95 0 8 0 nchpl 144 9965 0 9489 61 38 23 61 0 8 0 uvmvnodes 72 5926 0 0 108 0 108 108 0 8 0 vnodes 208 5926 0 0 312 0 312 312 0 8 0 namei 1024 33052 0 33052 6 5 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 vmpool 552 6 0 6 3 3 0 1 0 8 0 scsiplug 64 5 0 5 3 3 0 1 0 8 0 scxspl 192 30463 0 30462 30 28 2 7 0 8 1 plimitpl 152 209 0 201 1 0 1 1 0 8 0 sigapl 432 2926 0 2912 4 2 2 3 0 8 0 futexpl 56 56140 0 56140 3 2 1 1 0 8 1 knotepl 112 811 0 792 3 2 1 2 0 8 0 kqueuepl 104 804 0 802 5 1 4 4 0 8 3 pipepl 112 2234 0 2215 10 8 2 2 0 8 1 fdescpl 488 2927 0 2912 3 0 3 3 0 8 0 filepl 152 24086 0 23984 35 23 12 14 0 8 8 lockfpl 104 810 0 809 1 0 1 1 0 8 0 lockfspl 48 275 0 274 1 0 1 1 0 8 0 sessionpl 112 39 0 28 1 0 1 1 0 8 0 pgrppl 48 57 0 46 1 0 1 1 0 8 0 ucredpl 96 2584 0 2575 1 0 1 1 0 8 0 zombiepl 144 2913 0 2913 4 3 1 1 0 8 1 processpl 896 2945 0 2913 5 1 4 5 0 8 0 procpl 632 8601 0 8559 6 1 5 5 0 8 1 srpgc 64 33 0 33 10 10 0 1 0 8 0 sosppl 128 45 0 45 9 8 1 1 0 8 1 sockpl 384 7475 0 7456 43 32 11 22 0 8 8 mcl64k 65536 25 0 0 3 0 3 3 0 8 0 mcl16k 16384 13 0 0 2 0 2 2 0 8 0 mcl12k 12288 17 0 0 2 0 2 2 0 8 0 mcl9k 9216 13 0 0 1 0 1 1 0 8 0 mcl8k 8192 14 0 0 2 0 2 2 0 8 0 mcl4k 4096 17 0 0 3 0 3 3 0 8 0 mcl2k2 2112 4 0 0 1 0 1 1 0 8 0 mcl2k 2048 137 0 0 16 0 16 16 0 8 0 mtagpl 80 29 0 0 1 0 1 1 0 8 0 mbufpl 256 343 0 0 12 0 12 12 0 8 0 bufpl 256 13665 0 6617 441 0 441 441 0 8 0 anonpl 16 310808 0 293957 94 9 85 85 0 124 10 amapchunkpl 152 20639 0 20516 43 34 9 19 0 158 3 amappl16 192 13441 0 12408 92 31 61 64 0 8 8 amappl15 184 78 0 78 2 2 0 1 0 8 0 amappl14 176 1135 0 1133 2 1 1 1 0 8 0 amappl13 168 510 0 510 4 4 0 1 0 8 0 amappl12 160 63 0 62 2 1 1 1 0 8 0 amappl11 152 291 0 273 1 0 1 1 0 8 0 amappl10 144 70 0 64 1 0 1 1 0 8 0 amappl9 136 1332 0 1326 1 0 1 1 0 8 0 amappl8 128 872 0 834 2 0 2 2 0 8 0 amappl7 120 191 0 183 1 0 1 1 0 8 0 amappl6 112 255 0 245 1 0 1 1 0 8 0 amappl5 104 380 0 366 1 0 1 1 0 8 0 amappl4 96 2758 0 2725 1 0 1 1 0 8 0 amappl3 88 1910 0 1905 1 0 1 1 0 8 0 amappl2 80 21214 0 21148 4 2 2 3 0 8 0 amappl1 72 75324 0 74904 26 16 10 20 0 8 0 amappl 80 9213 0 9176 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 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 17 0 17 1 1 0 1 0 8 0 aobjpl 64 106 0 16 2 0 2 2 0 8 0 uaddrrnd 24 2933 0 2912 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2933 0 2912 1 0 1 1 0 8 0 vmmpekpl 168 27143 0 27104 2 0 2 2 0 8 0 vmmpepl 168 376475 0 374406 230 95 135 140 0 357 33 vmsppl 368 2926 0 2912 2 0 2 2 0 8 0 pdppl 4096 5873 0 5836 8 2 6 6 0 8 1 pvpl 32 871758 0 851759 243 43 200 200 0 265 24 pmappl 232 2932 0 2918 5 4 1 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 649 0 38 18 0 18 18 0 8 0