panic: tcp_output: template len != hdrlen - optlen Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *469008 17459 0 0x12 0 0 sshd db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff82400a71) at panic+0x164 sys/kern/subr_prf.c:218 tcp_output(ffff800000ac4940) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac4940) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da74198,9,fffffd806bc18400,0,0,ffff80001d702288) at tcp_usrreq+0xa54 sosend(fffffd805da74198,0,ffff80001d6c9c08,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d702288,4,ffff80001d6c9c08,0,ffff80001d6c9cf0) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d702288,ffff80001d6c9ca0,ffff80001d6c9cf0) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d6c9d70) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffcf0e0, 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(ffffffff82400a71) at panic+0x164 sys/kern/subr_prf.c:218 tcp_output(ffff800000ac4940) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac4940) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da74198,9,fffffd806bc18400,0,0,ffff80001d702288) at tcp_usrreq+0xa54 sosend(fffffd805da74198,0,ffff80001d6c9c08,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d702288,4,ffff80001d6c9c08,0,ffff80001d6c9cf0) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d702288,ffff80001d6c9ca0,ffff80001d6c9cf0) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d6c9d70) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffcf0e0, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001d6c9770 rbx 0xffff80001d6c9820 rdx 0x8b rcx 0x2 rax 0x1 r8 0xffff80001d6c9730 r9 0xffffffff821f998f kprintf+0x15f r10 0x1 r11 0xc7c84238bc5b3afc r12 0x3000000008 r13 0xffff80001d6c9780 r14 0x100 r15 0x1 rip 0xffffffff81589c68 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001d6c9760 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (sshd) pid=469008 stat=onproc flags process=12 proc=0 pri=24, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff80001d7029f0,0xffff80001d702788 process=0xffff80001d704ed8 user=0xffff80001d6c4000, vmspace=0xfffffd806bc0a550 estcpu=0, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 49828 255556 67892 0 2 0 syz-executor.0 49828 480910 67892 0 2 0x4000000 syz-executor.0 67892 158559 55155 0 3 0x82 nanosleep syz-executor.0 11632 58502 0 0 3 0x14280 nfsidl nfsio 70697 127690 0 0 3 0x14280 nfsidl nfsio 87509 180057 0 0 3 0x14280 nfsidl nfsio 5558 408340 0 0 3 0x14280 nfsidl nfsio 48564 309642 0 0 3 0x14280 nfsidl nfsio 99998 145281 0 0 3 0x14280 nfsidl nfsio 17512 122118 0 0 3 0x14280 nfsidl nfsio 41381 499628 0 0 3 0x14280 nfsidl nfsio 22448 301443 0 0 3 0x14280 nfsidl nfsio 51105 63517 0 0 3 0x14280 nfsidl nfsio 62641 26606 0 0 3 0x14280 nfsidl nfsio 9171 437870 0 0 3 0x14280 nfsidl nfsio 36230 222705 0 0 3 0x14280 nfsidl nfsio 17761 406819 0 0 3 0x14280 nfsidl nfsio 58413 456527 0 0 3 0x14280 nfsidl nfsio 93865 503374 0 0 3 0x14280 nfsidl nfsio 8984 220429 0 0 3 0x14280 nfsidl nfsio 51698 97249 0 0 3 0x14280 nfsidl nfsio 43705 169720 0 0 3 0x14280 nfsidl nfsio 80212 346708 0 0 3 0x14280 nfsidl nfsio 59907 5014 55155 0 2 0x2 syz-executor.1 38000 35187 0 0 3 0x14200 bored sosplice 19197 190534 1 0 3 0x100083 ttyin getty 55155 1357 63199 0 3 0x82 thrsleep syz-fuzzer 55155 244810 63199 0 3 0x4000082 nanosleep syz-fuzzer 55155 55286 63199 0 3 0x4000082 thrsleep syz-fuzzer 55155 277499 63199 0 3 0x4000082 thrsleep syz-fuzzer 55155 424066 63199 0 3 0x4000082 thrsleep syz-fuzzer 55155 24227 63199 0 2 0x4000002 syz-fuzzer 63199 55150 17459 0 3 0x10008a pause ksh *17459 469008 31414 0 7 0x12 sshd 31414 408724 1 0 3 0x80 select sshd 85227 412409 96407 73 3 0x100090 kqread syslogd 96407 381775 1 0 3 0x100082 netio syslogd 54166 273257 1 77 3 0x100090 poll dhclient 7327 485264 1 0 3 0x80 poll dhclient 26292 133926 0 0 3 0x14200 bored smr 55439 124413 0 0 2 0x14200 zerothread 75187 9035 0 0 3 0x14200 aiodoned aiodoned 2196 502620 0 0 3 0x14200 syncer update 77818 518542 0 0 3 0x14200 cleaner cleaner 70716 198387 0 0 3 0x14200 reaper reaper 94931 247066 0 0 3 0x14200 pgdaemon pagedaemon 23796 492572 0 0 3 0x14200 bored crynlk 82419 144492 0 0 3 0x14200 bored crypto 35153 231343 0 0 3 0x40014200 acpi0 acpi0 76226 323496 0 0 3 0x14200 bored softnet 71957 247014 0 0 3 0x14200 bored systqmp 76153 230971 0 0 3 0x14200 bored systq 68792 28601 0 0 3 0x40014200 bored softclock 61145 232199 0 0 3 0x40014200 idle0 1 329626 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 9493 6340K 6846K 78643K 11477 0 pcb 13 8K 8K 78643K 83 0 rtable 114 15K 17K 78643K 1440 0 ifaddr 81 20K 21K 78643K 818 0 sysctl 2 0K 0K 78643K 2 0 counters 21 16K 16K 78643K 159 0 ioctlops 0 0K 4K 78643K 696 0 iov 0 0K 12K 78643K 48 0 mount 1 1K 1K 78643K 1 0 vnodes 1229 77K 78K 78643K 1583 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 9 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 0K 78643K 174 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 195K 288K 78643K 12938 0 file desc 5 13K 25K 78643K 875 0 sigio 0 0K 0K 78643K 6 0 proc 50 38K 55K 78643K 507 0 subproc 32 2K 2K 78643K 68 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 43 0 in_multi 71 3K 3K 78643K 127 0 ether_multi 1 0K 0K 78643K 10 0 mrt 0 0K 0K 78643K 5 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 55 254K 254K 78643K 55 0 exec 0 0K 1K 78643K 240 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 135 55K 71K 78643K 2738 0 UVM aobj 30 2K 2K 78643K 34 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 49 0 NDP 11 0K 0K 78643K 159 0 temp 112 3866K 3930K 78643K 17759 0 kqueue 3 4K 14K 78643K 31 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 10 0 4 1 0 1 1 0 8 0 rtpcb 88 272 0 270 1 0 1 1 0 8 0 rtentry 112 77 0 41 2 0 2 2 0 8 0 unpcb 120 181 0 173 1 0 1 1 0 8 0 syncache 272 6 0 6 2 2 0 1 0 8 0 tcpqe 32 130 0 130 1 1 0 1 0 8 0 tcpcb 592 139 0 135 4 2 2 3 0 8 1 ipq 40 4 0 4 2 2 0 1 0 8 0 ipqe 40 14 0 14 2 2 0 1 0 8 0 inpcb 296 1463 0 1456 3 1 2 2 0 8 1 rttmr 72 2 0 2 1 1 0 1 0 8 0 nd6 48 15 0 9 1 0 1 1 0 8 0 pkpcb 40 12 0 12 3 3 0 1 0 8 0 pfrktable 1344 56 0 47 3 1 2 2 0 8 1 pftag 88 8 0 6 1 0 1 1 0 8 0 pfrule 1360 26 0 14 2 0 2 2 0 8 1 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 333 0 174 15 5 10 14 0 8 0 art_table 32 335 0 174 2 0 2 2 0 8 0 art_node 16 76 0 46 1 0 1 1 0 8 0 sysvmsgpl 40 31 0 7 1 0 1 1 0 8 0 semupl 112 6 0 6 1 1 0 1 0 8 0 semapl 112 170 0 160 1 0 1 1 0 8 0 shmpl 112 31 0 4 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 2680 0 1280 88 0 88 88 0 8 0 ffsino 240 2680 0 1280 83 0 83 83 0 8 0 nchpl 144 3967 0 2378 60 0 60 60 0 8 0 uvmvnodes 72 2892 0 0 53 0 53 53 0 8 0 vnodes 208 2892 0 0 153 0 153 153 0 8 0 namei 1024 10286 0 10286 1 0 1 1 0 8 1 vcpupl 1984 4 0 0 1 0 1 1 0 8 0 vmpool 528 6 0 2 1 0 1 1 0 8 0 pfiaddrpl 120 32 0 22 1 0 1 1 0 8 0 scxspl 200 11692 0 11692 1 0 1 1 0 8 1 plimitpl 152 49 0 42 1 0 1 1 0 8 0 sigapl 424 1077 0 1028 6 0 6 6 0 8 0 futexpl 56 13523 0 13523 1 0 1 1 0 8 1 knotepl 112 118 0 98 1 0 1 1 0 8 0 kqueuepl 152 56 0 54 1 0 1 1 0 8 0 pipepl 272 169 0 158 4 3 1 2 0 8 0 fdescpl 432 1042 0 1028 2 0 2 2 0 8 0 filepl 120 5302 0 5205 5 1 4 5 0 8 1 lockfpl 104 82 0 81 1 0 1 1 0 8 0 lockfspl 48 30 0 29 1 0 1 1 0 8 0 sessionpl 120 20 0 10 1 0 1 1 0 8 0 pgrppl 48 54 0 44 1 0 1 1 0 8 0 ucredpl 96 294 0 287 1 0 1 1 0 8 0 zombiepl 144 1028 0 1028 1 0 1 1 0 8 1 processpl 944 1077 0 1028 7 0 7 7 0 8 0 procpl 632 1938 0 1883 5 0 5 5 0 8 0 sosppl 144 14 0 14 2 1 1 1 0 8 1 sockpl 400 1928 0 1911 6 2 4 4 0 8 2 mcl64k 65536 18 0 18 3 2 1 1 0 8 1 mcl16k 16384 1 0 1 1 1 0 1 0 8 0 mcl12k 12288 15 0 15 3 2 1 1 0 8 1 mcl9k 9216 12 0 12 3 2 1 1 0 8 1 mcl8k 8192 20 0 20 2 1 1 1 0 8 1 mcl4k 4096 47 0 47 3 2 1 1 0 8 1 mcl2k2 2112 7 0 7 2 1 1 1 0 8 1 mcl2k 2048 95306 0 95258 16 9 7 13 0 8 0 mtagpl 96 31 0 14 3 2 1 1 0 8 0 mbufpl 256 158672 0 158528 18 7 11 12 0 8 0 bufpl 280 4782 0 116 334 0 334 334 0 8 0 anonpl 16 108468 0 91007 93 8 85 91 0 107 5 amapchunkpl 152 5426 0 5221 24 5 19 22 0 158 10 amappl16 192 4923 0 3893 75 15 60 64 0 8 8 amappl15 184 1 0 0 1 0 1 1 0 8 0 amappl14 176 2 0 1 2 1 1 1 0 8 0 amappl13 168 57 0 52 1 0 1 1 0 8 0 amappl12 160 266 0 263 1 0 1 1 0 8 0 amappl11 152 301 0 292 1 0 1 1 0 8 0 amappl10 144 356 0 347 1 0 1 1 0 8 0 amappl9 136 348 0 347 1 0 1 1 0 8 0 amappl8 128 343 0 313 1 0 1 1 0 8 0 amappl7 120 452 0 439 1 0 1 1 0 8 0 amappl6 112 212 0 206 1 0 1 1 0 8 0 amappl5 104 1145 0 1132 1 0 1 1 0 8 0 amappl4 96 466 0 436 1 0 1 1 0 8 0 amappl3 88 142 0 133 1 0 1 1 0 8 0 amappl2 80 6886 0 6818 2 0 2 2 0 8 0 amappl1 72 30590 0 30173 23 14 9 17 0 8 0 amappl 80 2194 0 2139 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 33 0 4 1 0 1 1 0 8 0 uaddrrnd 24 1048 0 1030 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1048 0 1030 1 0 1 1 0 8 0 vmmpekpl 168 9409 0 9380 2 0 2 2 0 8 0 vmmpepl 168 130827 0 128664 168 35 133 135 0 357 32 vmsppl 272 1047 0 1030 2 0 2 2 0 8 0 pdppl 4096 2102 0 2064 7 1 6 6 0 8 0 pvpl 32 316612 0 296307 211 12 199 208 0 265 14 pmappl 200 1047 0 1030 1 0 1 1 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 260 0 37 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(ffffffff82400a71) at panic+0x164 sys/kern/subr_prf.c:218 tcp_output(ffff800000ac4940) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac4940) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da74198,9,fffffd806bc18400,0,0,ffff80001d702288) at tcp_usrreq+0xa54 sosend(fffffd805da74198,0,ffff80001d6c9c08,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d702288,4,ffff80001d6c9c08,0,ffff80001d6c9cf0) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d702288,ffff80001d6c9ca0,ffff80001d6c9cf0) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d6c9d70) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffcf0e0, 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(ffffffff82400a71) at panic+0x164 sys/kern/subr_prf.c:218 tcp_output(ffff800000ac4940) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac4940) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da74198,9,fffffd806bc18400,0,0,ffff80001d702288) at tcp_usrreq+0xa54 sosend(fffffd805da74198,0,ffff80001d6c9c08,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d702288,4,ffff80001d6c9c08,0,ffff80001d6c9cf0) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d702288,ffff80001d6c9ca0,ffff80001d6c9cf0) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d6c9d70) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffcf0e0, count: -9