panic: tcp_output: template len != hdrlen - optlen Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 82578 14530 0 0x12 0 0 sshd db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff823ff6ee) at panic+0x164 sys/kern/subr_prf.c:218 tcp_output(ffff800000ac5030) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac5030) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da74328,9,fffffd805e0a8700,0,0,ffff80001d702500) at tcp_usrreq+0xa54 sosend(fffffd805da74328,0,ffff80001d6c9528,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d702500,4,ffff80001d6c9528,0,ffff80001d6c9610) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d702500,ffff80001d6c95c0,ffff80001d6c9610) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d6c9690) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc6dc0, 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 tcp_output: template len != hdrlen - optlen ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff823ff6ee) at panic+0x164 sys/kern/subr_prf.c:218 tcp_output(ffff800000ac5030) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac5030) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da74328,9,fffffd805e0a8700,0,0,ffff80001d702500) at tcp_usrreq+0xa54 sosend(fffffd805da74328,0,ffff80001d6c9528,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d702500,4,ffff80001d6c9528,0,ffff80001d6c9610) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d702500,ffff80001d6c95c0,ffff80001d6c9610) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d6c9690) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc6dc0, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001d6c9090 rbx 0xffff80001d6c9140 rdx 0x8b rcx 0x2 rax 0x1 r8 0xffff80001d6c9050 r9 0xffffffff815b7cff kprintf+0x15f r10 0x1 r11 0xd5bfde72bd575770 r12 0x3000000008 r13 0xffff80001d6c90a0 r14 0x100 r15 0x1 rip 0xffffffff82254f08 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001d6c9080 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (sshd) pid=82578 stat=onproc flags process=12 proc=0 pri=24, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff80001d703158,0xffff80001d702298 process=0xffff80001d7043c8 user=0xffff80001d6c4000, vmspace=0xfffffd806bc0abb0 estcpu=0, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 31166 216433 88792 0 2 0 syz-executor.1 31166 497644 88792 0 2 0x4000000 syz-executor.1 90439 198304 50363 0 2 0x2 syz-executor.0 88792 405511 50363 0 2 0x482 syz-executor.1 50363 341969 29394 0 3 0x82 thrsleep syz-fuzzer 50363 2294 29394 0 2 0x4000482 syz-fuzzer 50363 166909 29394 0 2 0x4000002 syz-fuzzer 50363 402085 29394 0 3 0x4000082 thrsleep syz-fuzzer 50363 253413 29394 0 3 0x4000082 thrsleep syz-fuzzer 50363 231410 29394 0 3 0x4000082 thrsleep syz-fuzzer 50363 127844 29394 0 3 0x4000082 thrsleep syz-fuzzer 29394 428860 14530 0 3 0x10008a pause ksh *14530 82578 93669 0 7 0x12 sshd 2788 211661 1 0 3 0x100083 ttyin getty 93669 27072 1 0 3 0x80 select sshd 3544 18789 71203 73 3 0x100090 kqread syslogd 71203 359111 1 0 3 0x100082 netio syslogd 98905 47807 1 77 3 0x100090 poll dhclient 95239 112493 1 0 3 0x80 poll dhclient 74676 264048 0 0 3 0x14200 bored smr 9198 296408 0 0 2 0x14200 zerothread 22386 112839 0 0 3 0x14200 aiodoned aiodoned 66522 237425 0 0 3 0x14200 syncer update 63767 242733 0 0 3 0x14200 cleaner cleaner 97999 43142 0 0 3 0x14200 reaper reaper 84945 301966 0 0 3 0x14200 pgdaemon pagedaemon 28426 119453 0 0 3 0x14200 bored crynlk 35815 89886 0 0 3 0x14200 bored crypto 54933 444315 0 0 3 0x40014200 acpi0 acpi0 47103 150843 0 0 3 0x14200 bored softnet 27248 128911 0 0 3 0x14200 bored systqmp 95408 26899 0 0 3 0x14200 bored systq 56401 327197 0 0 3 0x40014200 bored softclock 28251 397001 0 0 3 0x40014200 idle0 1 23740 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 devbuf 9451 6325K 6333K 78643K 10555 0 pcb 13 8K 8K 78643K 13 0 rtable 105 3K 3K 78643K 191 0 ifaddr 44 10K 10K 78643K 48 0 counters 21 16K 16K 78643K 21 0 ioctlops 0 0K 2K 78643K 17 0 iov 0 0K 2K 78643K 2 0 mount 1 1K 1K 78643K 1 0 vnodes 1218 77K 77K 78643K 1224 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 1K 78643K 2 0 VM map 2 0K 0K 78643K 2 0 sem 2 0K 0K 78643K 2 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 195K 288K 78643K 12938 0 file desc 5 13K 25K 78643K 45 0 proc 47 38K 54K 78643K 358 0 subproc 32 2K 2K 78643K 34 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 in_multi 33 2K 2K 78643K 33 0 ether_multi 1 0K 0K 78643K 1 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 19 95K 95K 78643K 19 0 exec 0 0K 1K 78643K 181 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 136 23K 24K 78643K 965 0 UVM aobj 3 2K 2K 78643K 3 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 NDP 6 0K 0K 78643K 10 0 temp 66 3851K 3915K 78643K 1786 0 kqueue 3 4K 4K 78643K 3 0 SYN cache 2 16K 16K 78643K 2 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 rtpcb 88 19 0 17 1 0 1 1 0 8 0 rtentry 112 45 0 1 2 0 2 2 0 8 0 unpcb 120 31 0 23 1 0 1 1 0 8 0 syncache 272 4 0 4 1 1 0 1 0 8 0 tcpqe 32 173 0 173 1 0 1 1 0 8 1 tcpcb 592 10 0 6 1 0 1 1 0 8 0 inpcb 296 52 0 45 2 0 2 2 0 8 1 nd6 48 6 0 0 1 0 1 1 0 8 0 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 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1428 0 32 88 0 88 88 0 8 0 ffsino 240 1428 0 32 83 0 83 83 0 8 0 nchpl 144 1664 0 64 60 0 60 60 0 8 0 uvmvnodes 72 1473 0 0 27 0 27 27 0 8 0 vnodes 208 1473 0 0 78 0 78 78 0 8 0 namei 1024 4094 0 4094 1 0 1 1 0 8 1 scxspl 200 4590 0 4590 1 0 1 1 0 8 1 plimitpl 152 14 0 7 1 0 1 1 0 8 0 sigapl 424 231 0 203 4 0 4 4 0 8 0 futexpl 56 263 0 263 1 0 1 1 0 8 1 knotepl 112 62 0 42 1 0 1 1 0 8 0 kqueuepl 152 2 0 0 1 0 1 1 0 8 0 pipepl 272 69 0 58 1 0 1 1 0 8 0 fdescpl 432 217 0 203 2 0 2 2 0 8 0 filepl 120 1060 0 963 4 0 4 4 0 8 1 lockfpl 104 9 0 8 1 0 1 1 0 8 0 lockfspl 48 4 0 3 1 0 1 1 0 8 0 sessionpl 120 17 0 7 1 0 1 1 0 8 0 pgrppl 48 17 0 7 1 0 1 1 0 8 0 ucredpl 96 48 0 41 1 0 1 1 0 8 0 zombiepl 144 203 0 203 1 0 1 1 0 8 1 processpl 944 231 0 203 4 0 4 4 0 8 0 procpl 632 251 0 216 4 0 4 4 0 8 0 sockpl 400 102 0 85 4 0 4 4 0 8 2 mcl8k 8192 1 0 1 1 0 1 1 0 8 1 mcl4k 4096 10 0 10 2 1 1 1 0 8 1 mcl2k 2048 94697 0 94648 18 2 16 16 0 8 7 mtagpl 96 2 0 2 1 1 0 1 0 8 0 mbufpl 256 149379 0 149295 10 1 9 9 0 8 0 bufpl 280 3231 0 116 223 0 223 223 0 8 0 anonpl 16 37125 0 21165 67 2 65 65 0 107 0 amapchunkpl 152 1143 0 965 10 0 10 10 0 158 1 amappl16 192 988 0 162 42 0 42 42 0 8 0 amappl15 184 6 0 4 1 0 1 1 0 8 0 amappl14 176 2 0 1 1 0 1 1 0 8 0 amappl13 168 35 0 31 1 0 1 1 0 8 0 amappl12 160 28 0 22 1 0 1 1 0 8 0 amappl11 152 41 0 32 1 0 1 1 0 8 0 amappl10 144 23 0 18 1 0 1 1 0 8 0 amappl9 136 338 0 337 1 0 1 1 0 8 0 amappl8 128 330 0 284 2 0 2 2 0 8 0 amappl7 120 108 0 96 1 0 1 1 0 8 0 amappl6 112 23 0 20 1 0 1 1 0 8 0 amappl5 104 180 0 169 1 0 1 1 0 8 0 amappl4 96 427 0 399 1 0 1 1 0 8 0 amappl3 88 117 0 108 1 0 1 1 0 8 0 amappl2 80 923 0 858 2 0 2 2 0 8 0 amappl1 72 13803 0 13387 23 8 15 17 0 8 6 amappl 80 490 0 439 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 2 0 0 1 0 1 1 0 8 0 uaddrrnd 24 217 0 203 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 217 0 203 1 0 1 1 0 8 0 vmmpekpl 168 5659 0 5636 2 0 2 2 0 8 0 vmmpepl 168 34261 0 32313 159 6 153 153 0 357 68 vmsppl 272 216 0 203 2 0 2 2 0 8 1 pdppl 4096 440 0 406 6 0 6 6 0 8 1 pvpl 32 125404 0 106512 156 0 156 156 0 265 3 pmappl 200 216 0 203 1 0 1 1 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 235 0 7 7 0 7 7 0 8 0 ddb> machine ddbcpu 0 No such command ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff823ff6ee) at panic+0x164 sys/kern/subr_prf.c:218 tcp_output(ffff800000ac5030) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac5030) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da74328,9,fffffd805e0a8700,0,0,ffff80001d702500) at tcp_usrreq+0xa54 sosend(fffffd805da74328,0,ffff80001d6c9528,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d702500,4,ffff80001d6c9528,0,ffff80001d6c9610) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d702500,ffff80001d6c95c0,ffff80001d6c9610) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d6c9690) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc6dc0, count: -9 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff823ff6ee) at panic+0x164 sys/kern/subr_prf.c:218 tcp_output(ffff800000ac5030) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac5030) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da74328,9,fffffd805e0a8700,0,0,ffff80001d702500) at tcp_usrreq+0xa54 sosend(fffffd805da74328,0,ffff80001d6c9528,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d702500,4,ffff80001d6c9528,0,ffff80001d6c9610) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d702500,ffff80001d6c95c0,ffff80001d6c9610) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d6c9690) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc6dc0, count: -9