panic: pool_cache_item_magic_check: mbufpl cpu free list modified: item addr 0xfffffd807f00e600+16 0x0!=0xfb8683902092aa63 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 292530 4933 0 0 0 0 syz-executor.1 *403710 4933 0 0 0x4000000 1K syz-executor.1 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff8240bdef) at panic+0x164 sys/kern/subr_prf.c:218 pool_cache_get(ffffffff828f7de8) at pool_cache_get+0x323 pool_cache_item_magic_check sys/kern/subr_pool.c:1781 [inline] pool_cache_get(ffffffff828f7de8) at pool_cache_get+0x323 sys/kern/subr_pool.c:1884 pool_get(ffffffff828f7de8,1) at pool_get+0x91 sys/kern/subr_pool.c:572 m_get(1,3) at m_get+0x4c sys/kern/uipc_mbuf.c:250 sockargs(ffff8000241b7ec0,200003c0,10,3) at sockargs+0x8d sys/kern/uipc_syscalls.c:1120 sys_connect(ffff800020eb62a0,ffff8000241b7f48,ffff8000241b7f90) at sys_connect+0x9b sys/kern/uipc_syscalls.c:360 syscall(ffff8000241b8010) at syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000241b8010) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x844b1d21f60, 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{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 0xfffffd807f00e600+16 0x0!=0xfb8683902092aa63 ddb{1}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff8240bdef) at panic+0x164 sys/kern/subr_prf.c:218 pool_cache_get(ffffffff828f7de8) at pool_cache_get+0x323 pool_cache_item_magic_check sys/kern/subr_pool.c:1781 [inline] pool_cache_get(ffffffff828f7de8) at pool_cache_get+0x323 sys/kern/subr_pool.c:1884 pool_get(ffffffff828f7de8,1) at pool_get+0x91 sys/kern/subr_pool.c:572 m_get(1,3) at m_get+0x4c sys/kern/uipc_mbuf.c:250 sockargs(ffff8000241b7ec0,200003c0,10,3) at sockargs+0x8d sys/kern/uipc_syscalls.c:1120 sys_connect(ffff800020eb62a0,ffff8000241b7f48,ffff8000241b7f90) at sys_connect+0x9b sys/kern/uipc_syscalls.c:360 syscall(ffff8000241b8010) at syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000241b8010) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x844b1d21f60, count: -9 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff8000241b7c20 rbx 0xffff8000241b7cd0 rdx 0x8b rcx 0x2 rax 0x1 r8 0xffff8000241b7be0 r9 0xffffffff81c9883f kprintf+0x16f r10 0x1 r11 0xf77c994dc0c1f939 r12 0x3000000008 r13 0xffff8000241b7c30 r14 0x100 r15 0x1 rip 0xffffffff81c6ddc8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000241b7c10 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.1) pid=403710 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=55, nice=20 forw=0xffffffffffffffff, list=0xffff800020eb6028,0xffffffff828ed090 process=0xffff800020eb8fc0 user=0xffff8000241b3000, vmspace=0xfffffd807efffcf0 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 4933 292530 94970 0 7 0 syz-executor.1 * 4933 403710 94970 0 7 0x4000000 syz-executor.1 54974 345646 0 0 3 0x14200 acct acct 37298 24117 0 0 3 0x14280 nfsidl nfsio 2724 78180 0 0 3 0x14280 nfsidl nfsio 92568 170731 0 0 3 0x14280 nfsidl nfsio 53313 495101 0 0 3 0x14280 nfsidl nfsio 81928 96761 0 0 3 0x14280 nfsidl nfsio 29965 172523 0 0 3 0x14280 nfsidl nfsio 41753 372511 0 0 3 0x14280 nfsidl nfsio 92867 165605 0 0 3 0x14280 nfsidl nfsio 65929 249575 0 0 3 0x14280 nfsidl nfsio 62591 281306 0 0 3 0x14280 nfsidl nfsio 37436 140510 0 0 3 0x14280 nfsidl nfsio 24275 59389 0 0 3 0x14280 nfsidl nfsio 99772 432527 0 0 3 0x14280 nfsidl nfsio 96623 384070 0 0 3 0x14280 nfsidl nfsio 21905 470825 0 0 3 0x14280 nfsidl nfsio 70296 94080 0 0 3 0x14280 nfsidl nfsio 90814 299881 0 0 3 0x14280 nfsidl nfsio 44969 88213 0 0 3 0x14280 nfsidl nfsio 20147 331629 0 0 3 0x14280 nfsidl nfsio 26541 495310 0 0 3 0x14280 nfsidl nfsio 16367 411119 74263 0 3 0x82 nanosleep syz-executor.0 30040 459678 1 0 3 0x100083 ttyopn getty 94970 446731 74263 0 3 0x82 nanosleep syz-executor.1 74263 334921 81322 0 3 0x82 thrsleep syz-fuzzer 74263 336512 81322 0 3 0x4000082 nanosleep syz-fuzzer 74263 213220 81322 0 3 0x4000082 thrsleep syz-fuzzer 74263 303712 81322 0 3 0x4000082 thrsleep syz-fuzzer 74263 58259 81322 0 3 0x4000082 thrsleep syz-fuzzer 74263 223978 81322 0 3 0x4000082 thrsleep syz-fuzzer 74263 123713 81322 0 3 0x4000082 thrsleep syz-fuzzer 74263 462834 81322 0 3 0x4000082 thrsleep syz-fuzzer 74263 2481 81322 0 3 0x4000082 kqread syz-fuzzer 81322 148762 35832 0 3 0x10008a pause ksh 35832 171027 90061 0 3 0x92 select sshd 90061 60550 1 0 3 0x80 select sshd 20152 138190 98719 74 3 0x100092 bpf pflogd 98719 325974 1 0 3 0x80 netio pflogd 64753 179036 88127 73 3 0x100090 kqread syslogd 88127 446482 1 0 3 0x100082 netio syslogd 34913 135432 1 77 3 0x100090 poll dhclient 77460 255960 1 0 3 0x80 poll dhclient 16546 344079 0 0 3 0x14200 bored smr 8929 65409 0 0 3 0x14200 pgzero zerothread 80285 203313 0 0 3 0x14200 aiodoned aiodoned 45928 297376 0 0 3 0x14200 syncer update 73154 389300 0 0 3 0x14200 cleaner cleaner 58044 93561 0 0 3 0x14200 reaper reaper 47570 521949 0 0 3 0x14200 pgdaemon pagedaemon 4211 231440 0 0 3 0x14200 bored crynlk 17729 447805 0 0 3 0x14200 bored crypto 43964 491991 0 0 3 0x40014200 acpi0 acpi0 59740 31448 0 0 3 0x40014200 idle1 69680 451565 0 0 3 0x14200 bored softnet 50751 466230 0 0 3 0x14200 bored systqmp 41208 238812 0 0 3 0x14200 bored systq 32907 1986 0 0 3 0x40014200 bored softclock 16949 221687 0 0 3 0x40014200 idle0 1 289702 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 4933 (syz-executor.1) thread 0xffff800020eb62a0 (403710) exclusive rwlock netlock r = 0 (0xffffffff826f2960) #0 witness_lock+0x4c7 stacktrace_save sys/sys/stacktrace.h:36 [inline] #0 witness_lock+0x4c7 sys/kern/subr_witness.c:1164 #1 solock+0x5a sys/kern/uipc_socket2.c:282 #2 sys_connect+0x6a sys/kern/uipc_syscalls.c:355 #3 syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:102 [inline] #3 syscall+0x4a4 sys/arch/amd64/amd64/trap.c:570 #4 Xsyscall+0x128 exclusive kernel_lock &kernel_lock r = 0 (0xffffffff828c5c88) #0 witness_lock+0x4c7 stacktrace_save sys/sys/stacktrace.h:36 [inline] #0 witness_lock+0x4c7 sys/kern/subr_witness.c:1164 #1 syscall+0x400 mi_syscall sys/sys/syscall_mi.h:93 [inline] #1 syscall+0x400 sys/arch/amd64/amd64/trap.c:570 #2 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 9523 6429K 6797K 78643K 11312 0 pcb 13 8K 8K 78643K 96 0 rtable 122 9K 10K 78643K 570 0 ifaddr 84 16K 16K 78643K 172 0 counters 43 33K 34K 78643K 57 0 ioctlops 0 0K 4K 78643K 1570 0 iov 0 0K 16K 78643K 53 0 mount 1 1K 1K 78643K 1 0 vnodes 1221 77K 77K 78643K 1480 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 9K 78643K 12 0 VM map 2 1K 1K 78643K 2 0 sem 12 1K 1K 78643K 16 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1824 197K 290K 78643K 13058 0 file desc 5 13K 25K 78643K 675 0 proc 62 63K 95K 78643K 540 0 subproc 32 2K 2K 78643K 51 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 29 0 in_multi 44 2K 2K 78643K 138 0 ether_multi 1 0K 0K 78643K 11 0 mrt 0 0K 0K 78643K 4 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 43 201K 201K 78643K 43 0 exec 0 0K 1K 78643K 263 0 pagedep 1 8K 8K 78643K 1 0 inodedep 1 32K 32K 78643K 1 0 newblk 1 0K 0K 78643K 1 0 VM swap 7 26K 26K 78643K 7 0 UVM amap 181 77K 77K 78643K 3138 0 UVM aobj 33 4K 4K 78643K 35 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 59 0 NDP 13 0K 0K 78643K 35 0 temp 137 3872K 3936K 78643K 4775 0 kqueue 3 4K 8K 78643K 14 0 SYN cache 2 16K 16K 78643K 2 0 ddb{1}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 9 0 3 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 88 73 0 71 1 0 1 1 0 8 0 rtentry 112 80 0 40 2 0 2 2 0 8 0 unpcb 120 284 0 272 1 0 1 1 0 8 0 syncache 272 7 0 7 2 2 0 1 0 8 0 tcpcb 592 227 0 169 7 2 5 5 0 8 0 inpcb 296 559 0 544 4 2 2 2 0 8 0 rttmr 72 2 0 1 1 0 1 1 0 8 0 nd6 48 27 0 18 1 0 1 1 0 8 0 ppxss 1136 3 0 3 2 2 0 1 0 8 0 pfstscr 40 2 0 2 1 1 0 1 0 8 0 pffrag 232 2 0 2 1 1 0 1 0 482 0 pffrnode 88 2 0 2 1 1 0 1 0 8 0 pffrent 40 90 0 90 1 1 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 pfrktable 1344 82 0 71 3 2 1 2 0 8 0 pfstitem 24 28 0 17 1 0 1 1 0 8 0 pfstkey 112 32 0 21 1 0 1 1 0 8 0 pfstate 328 30 0 19 3 0 3 3 0 8 1 pfrule 1360 36 0 27 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 360 0 123 15 0 15 15 0 8 0 art_table 32 361 0 123 2 0 2 2 0 8 0 art_node 16 79 0 45 1 0 1 1 0 8 0 sysvmsgpl 40 44 0 26 1 0 1 1 0 8 0 semapl 112 10 0 0 1 0 1 1 0 8 0 shmpl 112 32 0 2 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 2229 0 820 89 0 89 89 0 8 0 ffsino 272 2229 0 820 95 0 95 95 0 8 0 nchpl 144 3352 0 1731 61 0 61 61 0 8 0 uvmvnodes 72 2463 0 0 45 0 45 45 0 8 0 vnodes 208 2463 0 0 130 0 130 130 0 8 0 namei 1024 10484 0 10484 2 1 1 1 0 8 1 percpumem 16 39 0 7 1 0 1 1 0 8 0 vcpupl 1984 4 0 0 1 0 1 1 0 8 0 vmpool 560 8 0 4 1 0 1 1 0 8 0 pfiaddrpl 120 23 0 16 2 1 1 1 0 8 0 scxspl 200 9463 0 9463 10 9 1 7 0 8 1 plimitpl 152 64 0 56 1 0 1 1 0 8 0 sigapl 424 910 0 858 6 0 6 6 0 8 0 futexpl 56 8332 0 8332 2 1 1 1 0 8 1 knotepl 112 88 0 68 1 0 1 1 0 8 0 kqueuepl 152 69 0 66 1 0 1 1 0 8 0 pipepl 304 146 0 135 3 1 2 2 0 8 1 fdescpl 496 873 0 857 3 0 3 3 0 8 0 filepl 152 5300 0 5186 6 0 6 6 0 8 1 lockfpl 104 222 0 221 1 0 1 1 0 8 0 lockfspl 48 82 0 81 1 0 1 1 0 8 0 sessionpl 120 20 0 9 1 0 1 1 0 8 0 pgrppl 48 26 0 15 1 0 1 1 0 8 0 ucredpl 96 548 0 539 1 0 1 1 0 8 0 zombiepl 144 858 0 857 1 0 1 1 0 8 0 processpl 1008 910 0 857 7 0 7 7 0 8 0 procpl 632 2260 0 2198 6 0 6 6 0 8 0 sockpl 400 920 0 891 9 4 5 5 0 8 2 mcl64k 65536 11 0 0 2 0 2 2 0 8 0 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 10 0 0 1 0 1 1 0 8 0 mcl9k 9216 3 0 0 1 0 1 1 0 8 0 mcl8k 8192 5 0 0 1 0 1 1 0 8 0 mcl4k 4096 11 0 0 2 0 2 2 0 8 0 mcl2k2 2112 4 0 0 1 0 1 1 0 8 0 mcl2k 2048 210 0 0 26 0 26 26 0 8 0 mtagpl 96 33 0 0 1 0 1 1 0 8 0 mbufpl 256 357 0 0 21 0 21 21 0 8 0 bufpl 280 4264 0 127 296 0 296 296 0 8 0 anonpl 16 95770 0 76990 83 2 81 82 0 124 0 amapchunkpl 152 4835 0 4535 17 4 13 15 0 158 0 amappl16 192 3750 0 2829 49 2 47 48 0 8 0 amappl15 184 1 0 0 1 0 1 1 0 8 0 amappl14 176 130 0 124 2 1 1 1 0 8 0 amappl13 168 226 0 223 1 0 1 1 0 8 0 amappl12 160 22 0 19 1 0 1 1 0 8 0 amappl11 152 60 0 45 1 0 1 1 0 8 0 amappl10 144 29 0 26 1 0 1 1 0 8 0 amappl9 136 688 0 683 1 0 1 1 0 8 0 amappl8 128 379 0 338 2 0 2 2 0 8 0 amappl7 120 127 0 113 1 0 1 1 0 8 0 amappl6 112 32 0 25 1 0 1 1 0 8 0 amappl5 104 785 0 768 1 0 1 1 0 8 0 amappl4 96 696 0 671 1 0 1 1 0 8 0 amappl3 88 259 0 251 1 0 1 1 0 8 0 amappl2 80 5963 0 5888 2 0 2 2 0 8 0 amappl1 72 34844 0 34386 23 13 10 18 0 8 0 amappl 80 2563 0 2478 2 0 2 2 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 18 0 17 1 0 1 1 0 8 0 aobjpl 64 34 0 2 1 0 1 1 0 8 0 uaddrrnd 24 881 0 861 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 881 0 861 1 0 1 1 0 8 0 vmmpekpl 168 10507 0 10469 3 1 2 2 0 8 0 vmmpepl 168 117874 0 115716 152 27 125 131 0 357 24 vmsppl 368 880 0 861 2 0 2 2 0 8 0 pdppl 4096 1769 0 1726 6 0 6 6 0 8 0 pvpl 32 301573 0 279481 194 9 185 194 0 265 0 pmappl 232 880 0 861 3 1 2 2 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 281 0 10 8 0 8 8 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp x86_ipi_db(ffffffff827b8ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:352 x86_ipi_handler() at x86_ipi_handler+0xc6 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 __sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0x6f sys/dev/kcov.c:118 softintr_dispatch(0) at softintr_dispatch+0x4e sys/arch/amd64/amd64/softintr.c:89 Xsoftclock() at Xsoftclock+0x1f end of kernel end trace frame: 0x7f7ffffc7780, count: 9 ddb{0}> trace x86_ipi_db(ffffffff827b8ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:352 x86_ipi_handler() at x86_ipi_handler+0xc6 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 __sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0x6f sys/dev/kcov.c:118 softintr_dispatch(0) at softintr_dispatch+0x4e sys/arch/amd64/amd64/softintr.c:89 Xsoftclock() at Xsoftclock+0x1f end of kernel end trace frame: 0x7f7ffffc7780, count: -6 ddb{0}> machine ddbcpu 1 Stopped at db_enter+0x18: addq $0x8,%rsp db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff8240bdef) at panic+0x164 sys/kern/subr_prf.c:218 pool_cache_get(ffffffff828f7de8) at pool_cache_get+0x323 pool_cache_item_magic_check sys/kern/subr_pool.c:1781 [inline] pool_cache_get(ffffffff828f7de8) at pool_cache_get+0x323 sys/kern/subr_pool.c:1884 pool_get(ffffffff828f7de8,1) at pool_get+0x91 sys/kern/subr_pool.c:572 m_get(1,3) at m_get+0x4c sys/kern/uipc_mbuf.c:250 sockargs(ffff8000241b7ec0,200003c0,10,3) at sockargs+0x8d sys/kern/uipc_syscalls.c:1120 sys_connect(ffff800020eb62a0,ffff8000241b7f48,ffff8000241b7f90) at sys_connect+0x9b sys/kern/uipc_syscalls.c:360 syscall(ffff8000241b8010) at syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000241b8010) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x844b1d21f60, count: 6 ddb{1}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff8240bdef) at panic+0x164 sys/kern/subr_prf.c:218 pool_cache_get(ffffffff828f7de8) at pool_cache_get+0x323 pool_cache_item_magic_check sys/kern/subr_pool.c:1781 [inline] pool_cache_get(ffffffff828f7de8) at pool_cache_get+0x323 sys/kern/subr_pool.c:1884 pool_get(ffffffff828f7de8,1) at pool_get+0x91 sys/kern/subr_pool.c:572 m_get(1,3) at m_get+0x4c sys/kern/uipc_mbuf.c:250 sockargs(ffff8000241b7ec0,200003c0,10,3) at sockargs+0x8d sys/kern/uipc_syscalls.c:1120 sys_connect(ffff800020eb62a0,ffff8000241b7f48,ffff8000241b7f90) at sys_connect+0x9b sys/kern/uipc_syscalls.c:360 syscall(ffff8000241b8010) at syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000241b8010) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x844b1d21f60, count: -9