panic: tcp_output: template len != hdrlen - optlen Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *488130 15521 0 0x12 0 0 sshd db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff823fe70a) at panic+0x164 sys/kern/subr_prf.c:218 tcp_output(ffff800000ac54d0) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac54d0) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da5e008,9,fffffd805e2cd200,0,0,ffff80001d6fc010) at tcp_usrreq+0xa54 sosend(fffffd805da5e008,0,ffff80001d6c96a8,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d6fc010,4,ffff80001d6c96a8,0,ffff80001d6c9790) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d6fc010,ffff80001d6c9740,ffff80001d6c9790) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d6c9810) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc4580, 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(ffffffff823fe70a) at panic+0x164 sys/kern/subr_prf.c:218 tcp_output(ffff800000ac54d0) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac54d0) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da5e008,9,fffffd805e2cd200,0,0,ffff80001d6fc010) at tcp_usrreq+0xa54 sosend(fffffd805da5e008,0,ffff80001d6c96a8,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d6fc010,4,ffff80001d6c96a8,0,ffff80001d6c9790) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d6fc010,ffff80001d6c9740,ffff80001d6c9790) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d6c9810) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc4580, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001d6c9210 rbx 0xffff80001d6c92c0 rdx 0x8b rcx 0x2 rax 0x1 r8 0xffff80001d6c91d0 r9 0xffffffff8122fb1f kprintf+0x15f r10 0x1 r11 0x18a94f41b160c7d r12 0x3000000008 r13 0xffff80001d6c9220 r14 0x100 r15 0x1 rip 0xffffffff81b1d038 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001d6c9200 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (sshd) pid=488130 stat=onproc flags process=12 proc=0 pri=24, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff80001d6fdb38,0xffff80001d6fc788 process=0xffff80001d6fe778 user=0xffff80001d6c4000, vmspace=0xfffffd806bc09aa0 estcpu=0, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 15841 270459 71175 0 2 0x10 syz-executor.0 15841 374047 71175 0 3 0x4000090 lockf syz-executor.0 28770 125602 0 0 3 0x14280 nfsidl nfsio 26806 94254 0 0 3 0x14280 nfsidl nfsio 95255 393047 0 0 3 0x14280 nfsidl nfsio 82512 379840 0 0 3 0x14280 nfsidl nfsio 62139 341322 0 0 3 0x14280 nfsidl nfsio 38445 269998 0 0 3 0x14280 nfsidl nfsio 5846 381917 0 0 3 0x14280 nfsidl nfsio 22834 142706 0 0 3 0x14280 nfsidl nfsio 3591 489083 0 0 3 0x14280 nfsidl nfsio 62919 8847 0 0 3 0x14280 nfsidl nfsio 91685 178993 0 0 3 0x14280 nfsidl nfsio 15753 232047 0 0 3 0x14280 nfsidl nfsio 82878 520832 0 0 3 0x14280 nfsidl nfsio 82249 342948 0 0 3 0x14280 nfsidl nfsio 73197 19900 0 0 3 0x14280 nfsidl nfsio 1912 98539 0 0 3 0x14280 nfsidl nfsio 31440 107539 0 0 3 0x14280 nfsidl nfsio 88889 200643 0 0 3 0x14280 nfsidl nfsio 84820 141838 0 0 3 0x14280 nfsidl nfsio 9009 303081 0 0 3 0x14280 nfsidl nfsio 84206 70425 35550 0 2 0x2 syz-executor.1 48331 476510 0 0 3 0x14200 acct acct 71175 391218 35550 0 3 0x82 nanosleep syz-executor.0 35550 271220 28963 0 3 0x82 thrsleep syz-fuzzer 35550 178036 28963 0 2 0x4000002 syz-fuzzer 35550 188377 28963 0 3 0x4000082 thrsleep syz-fuzzer 35550 308759 28963 0 3 0x4000082 thrsleep syz-fuzzer 35550 519735 28963 0 3 0x4000082 thrsleep syz-fuzzer 35550 226946 28963 0 2 0x4000002 syz-fuzzer 35550 52106 28963 0 3 0x4000082 thrsleep syz-fuzzer 28963 81443 15521 0 3 0x10008a pause ksh *15521 488130 4130 0 7 0x12 sshd 96461 154169 1 0 3 0x100083 ttyin getty 4130 426864 1 0 3 0x80 select sshd 30209 497901 68902 73 3 0x100090 kqread syslogd 68902 327566 1 0 3 0x100082 netio syslogd 46980 433974 1 77 3 0x100090 poll dhclient 48721 502649 1 0 3 0x80 poll dhclient 77637 487495 0 0 3 0x14200 bored smr 78825 162271 0 0 2 0x14200 zerothread 76737 160001 0 0 3 0x14200 aiodoned aiodoned 54999 506825 0 0 3 0x14200 syncer update 77609 111684 0 0 3 0x14200 cleaner cleaner 68078 138401 0 0 3 0x14200 reaper reaper 69390 311215 0 0 3 0x14200 pgdaemon pagedaemon 79744 276102 0 0 3 0x14200 bored crynlk 66202 489429 0 0 3 0x14200 bored crypto 92709 315991 0 0 3 0x40014200 acpi0 acpi0 53379 149749 0 0 3 0x14200 bored softnet 71473 130981 0 0 3 0x14200 bored systqmp 47836 483820 0 0 3 0x14200 bored systq 53546 205728 0 0 3 0x40014200 bored softclock 3239 114911 0 0 3 0x40014200 idle0 1 207319 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 9490 6474K 6845K 78643K 11338 0 pcb 13 8K 8K 78643K 71 0 rtable 97 6K 9K 78643K 524 0 ifaddr 67 14K 14K 78643K 163 0 sysctl 2 0K 0K 78643K 2 0 counters 21 16K 17K 78643K 32 0 ioctlops 0 0K 4K 78643K 104 0 iov 0 0K 14K 78643K 874 0 mount 1 1K 1K 78643K 1 0 vnodes 1225 77K 77K 78643K 1458 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 10 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 1K 78643K 80 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 195K 288K 78643K 12938 0 file desc 5 13K 25K 78643K 551 0 sigio 0 0K 0K 78643K 2 0 proc 55 39K 63K 78643K 437 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 20 0 in_multi 39 2K 2K 78643K 73 0 ether_multi 1 0K 0K 78643K 7 0 mrt 0 0K 0K 78643K 10 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 248 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 154 56K 72K 78643K 2125 0 UVM aobj 19 3K 3K 78643K 29 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 27 0 NDP 10 0K 0K 78643K 27 0 temp 106 3865K 3940K 78643K 10914 0 kqueue 3 4K 12K 78643K 29 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 12 0 6 1 0 1 1 0 8 0 rtpcb 88 53 0 51 1 0 1 1 0 8 0 rtentry 112 75 0 43 2 0 2 2 0 8 0 unpcb 120 459 0 435 1 0 1 1 0 8 0 syncache 272 5 0 5 2 1 1 1 0 8 1 tcpqe 32 352 0 352 2 1 1 1 0 8 1 tcpcb 592 107 0 99 3 1 2 2 0 8 1 ipq 40 2 0 1 1 0 1 1 0 8 0 ipqe 40 4 0 3 1 0 1 1 0 8 0 inpcb 296 389 0 380 5 3 2 2 0 8 1 rttmr 72 4 0 4 1 1 0 1 0 8 0 nd6 48 10 0 6 1 0 1 1 0 8 0 ppxss 1136 1 0 1 1 1 0 1 0 8 0 pfstscr 40 4 0 2 1 0 1 1 0 8 0 pfrktable 1344 61 0 56 2 1 1 2 0 8 0 pftag 88 9 0 8 1 0 1 1 0 8 0 pfqueue 264 2 0 2 1 1 0 1 0 8 0 pfstitem 24 2 0 0 1 0 1 1 0 8 0 pfstkey 112 4 0 2 1 0 1 1 0 8 0 pfstate 328 2 0 1 1 0 1 1 0 8 0 pfrule 1360 18 0 12 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 256 0 122 12 3 9 12 0 8 0 art_table 32 257 0 122 2 0 2 2 0 8 0 art_node 16 74 0 47 1 0 1 1 0 8 0 sysvmsgpl 40 32 0 14 2 1 1 1 0 8 0 semupl 112 3 0 3 1 1 0 1 0 8 0 semapl 112 78 0 68 1 0 1 1 0 8 0 shmpl 112 26 0 10 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 2067 0 670 88 0 88 88 0 8 0 ffsino 240 2067 0 670 83 0 83 83 0 8 0 nchpl 144 3377 0 1795 60 0 60 60 0 8 0 uvmvnodes 72 2293 0 0 42 0 42 42 0 8 0 vnodes 208 2293 0 0 121 0 121 121 0 8 0 namei 1024 8846 0 8846 2 1 1 1 0 8 1 vcpupl 1984 4 0 0 1 0 1 1 0 8 0 vmpool 528 4 0 0 1 0 1 1 0 8 0 pfiaddrpl 120 20 0 16 1 0 1 1 0 8 0 scxspl 200 9172 0 9172 2 1 1 1 0 8 1 plimitpl 152 48 0 41 1 0 1 1 0 8 0 sigapl 424 755 0 706 6 0 6 6 0 8 0 futexpl 56 11005 0 11005 2 1 1 1 0 8 1 knotepl 112 106 0 86 1 0 1 1 0 8 0 kqueuepl 152 68 0 66 1 0 1 1 0 8 0 pipepl 272 141 0 130 4 3 1 2 0 8 0 fdescpl 432 720 0 706 2 0 2 2 0 8 0 filepl 120 4474 0 4359 4 0 4 4 0 8 0 lockfpl 104 117 0 114 1 0 1 1 0 8 0 lockfspl 48 45 0 43 1 0 1 1 0 8 0 sessionpl 120 18 0 8 1 0 1 1 0 8 0 pgrppl 48 26 0 16 1 0 1 1 0 8 0 ucredpl 96 398 0 390 1 0 1 1 0 8 0 zombiepl 144 706 0 706 2 1 1 1 0 8 1 processpl 944 755 0 706 7 0 7 7 0 8 0 procpl 632 1346 0 1290 5 0 5 5 0 8 0 sockpl 400 905 0 870 8 4 4 4 0 8 0 mcl64k 65536 20 0 20 3 2 1 1 0 8 1 mcl16k 16384 3 0 3 2 2 0 1 0 8 0 mcl12k 12288 10 0 10 2 2 0 1 0 8 0 mcl9k 9216 6 0 6 3 2 1 1 0 8 1 mcl8k 8192 12 0 12 2 2 0 1 0 8 0 mcl4k 4096 66 0 65 2 1 1 1 0 8 0 mcl2k2 2112 3 0 3 1 1 0 1 0 8 0 mcl2k 2048 95046 0 94983 32 23 9 28 0 8 0 mtagpl 96 46 0 18 2 1 1 1 0 8 0 mbufpl 256 648438 0 648282 23 10 13 15 0 8 3 bufpl 280 4550 0 123 317 0 317 317 0 8 0 anonpl 16 86189 0 68261 86 4 82 84 0 107 7 amapchunkpl 152 3673 0 3494 36 15 21 21 0 158 13 amappl16 192 3522 0 2552 63 6 57 57 0 8 8 amappl15 184 177 0 176 1 0 1 1 0 8 0 amappl14 176 85 0 82 1 0 1 1 0 8 0 amappl13 168 33 0 30 1 0 1 1 0 8 0 amappl12 160 25 0 21 1 0 1 1 0 8 0 amappl11 152 134 0 124 1 0 1 1 0 8 0 amappl10 144 12 0 10 1 0 1 1 0 8 0 amappl9 136 598 0 595 1 0 1 1 0 8 0 amappl8 128 365 0 312 2 0 2 2 0 8 0 amappl7 120 109 0 98 1 0 1 1 0 8 0 amappl6 112 35 0 23 1 0 1 1 0 8 0 amappl5 104 572 0 560 1 0 1 1 0 8 0 amappl4 96 526 0 497 1 0 1 1 0 8 0 amappl3 88 220 0 208 1 0 1 1 0 8 0 amappl2 80 5054 0 4988 2 0 2 2 0 8 0 amappl1 72 25330 0 24926 24 15 9 17 0 8 0 amappl 80 1592 0 1541 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 28 0 10 1 0 1 1 0 8 0 uaddrrnd 24 724 0 706 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 724 0 706 1 0 1 1 0 8 0 vmmpekpl 168 8331 0 8309 2 0 2 2 0 8 0 vmmpepl 168 94735 0 92651 163 47 116 130 0 357 23 vmsppl 272 723 0 706 3 1 2 2 0 8 0 pdppl 4096 1454 0 1416 7 1 6 6 0 8 0 pvpl 32 252097 0 231076 194 6 188 192 0 265 12 pmappl 200 723 0 706 1 0 1 1 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 280 0 56 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(ffffffff823fe70a) at panic+0x164 sys/kern/subr_prf.c:218 tcp_output(ffff800000ac54d0) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac54d0) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da5e008,9,fffffd805e2cd200,0,0,ffff80001d6fc010) at tcp_usrreq+0xa54 sosend(fffffd805da5e008,0,ffff80001d6c96a8,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d6fc010,4,ffff80001d6c96a8,0,ffff80001d6c9790) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d6fc010,ffff80001d6c9740,ffff80001d6c9790) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d6c9810) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc4580, 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(ffffffff823fe70a) at panic+0x164 sys/kern/subr_prf.c:218 tcp_output(ffff800000ac54d0) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac54d0) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da5e008,9,fffffd805e2cd200,0,0,ffff80001d6fc010) at tcp_usrreq+0xa54 sosend(fffffd805da5e008,0,ffff80001d6c96a8,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d6fc010,4,ffff80001d6c96a8,0,ffff80001d6c9790) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d6fc010,ffff80001d6c9740,ffff80001d6c9790) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d6c9810) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc4580, count: -9