panic: tcp_output: template len != hdrlen - optlen Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *344941 84121 0 0x12 0 0 sshd db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff823fbb15) at panic+0x164 sys/kern/subr_prf.c:218 tcp_output(ffff800000ac3760) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac3760) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da72008,9,fffffd806bc23b00,0,0,ffff80001d71d870) at tcp_usrreq+0xa54 sosend(fffffd805da72008,0,ffff80001d723da8,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d71d870,4,ffff80001d723da8,0,ffff80001d723e90) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d71d870,ffff80001d723e40,ffff80001d723e90) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d723f10) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffea5b0, 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(ffffffff823fbb15) at panic+0x164 sys/kern/subr_prf.c:218 tcp_output(ffff800000ac3760) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac3760) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da72008,9,fffffd806bc23b00,0,0,ffff80001d71d870) at tcp_usrreq+0xa54 sosend(fffffd805da72008,0,ffff80001d723da8,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d71d870,4,ffff80001d723da8,0,ffff80001d723e90) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d71d870,ffff80001d723e40,ffff80001d723e90) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d723f10) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffea5b0, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001d723910 rbx 0xffff80001d7239c0 rdx 0x2 rcx 0 rax 0x1 r8 0xffffffff81fc279f kprintf+0x15f r9 0x1 r10 0x2 r11 0xe0c61d12cc7e212b r12 0x3000000008 r13 0xffff80001d723920 r14 0x100 r15 0x1 rip 0xffffffff8175b418 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001d723900 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (sshd) pid=344941 stat=onproc flags process=12 proc=0 pri=24, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff80001d71dae0,0xffff80001d71d130 process=0xffff80001d700e98 user=0xffff80001d71e000, vmspace=0xfffffd806bc0a440 estcpu=0, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 4594 129357 45776 0 2 0 syz-executor.0 4594 17924 45776 0 2 0x4000000 syz-executor.0 817 441264 0 0 3 0x14280 nfsidl nfsio 98796 464380 0 0 3 0x14280 nfsidl nfsio 4049 339678 0 0 3 0x14280 nfsidl nfsio 38485 288006 0 0 3 0x14280 nfsidl nfsio 25792 40624 0 0 3 0x14280 nfsidl nfsio 67925 231243 0 0 3 0x14280 nfsidl nfsio 70442 514904 0 0 3 0x14280 nfsidl nfsio 42923 37726 0 0 3 0x14280 nfsidl nfsio 31247 436501 0 0 3 0x14280 nfsidl nfsio 87679 147234 0 0 3 0x14280 nfsidl nfsio 26324 202663 0 0 3 0x14280 nfsidl nfsio 43008 455570 0 0 3 0x14280 nfsidl nfsio 29192 367049 0 0 3 0x14280 nfsidl nfsio 62363 261749 0 0 3 0x14280 nfsidl nfsio 97468 427952 0 0 3 0x14280 nfsidl nfsio 85816 171202 0 0 3 0x14280 nfsidl nfsio 16153 378670 0 0 3 0x14280 nfsidl nfsio 21410 392226 0 0 3 0x14280 nfsidl nfsio 20867 435003 0 0 3 0x14280 nfsidl nfsio 68639 188272 0 0 3 0x14280 nfsidl nfsio 332 219586 0 0 3 0x14200 acct acct 80508 478494 0 0 3 0x14200 bored sosplice 12866 35607 97081 0 2 0x2 syz-executor.1 45776 130 97081 0 2 0x2 syz-executor.0 97081 401366 46842 0 3 0x82 thrsleep syz-fuzzer 97081 71115 46842 0 3 0x4000082 nanosleep syz-fuzzer 97081 401024 46842 0 3 0x4000082 thrsleep syz-fuzzer 97081 339533 46842 0 3 0x4000082 thrsleep syz-fuzzer 97081 278864 46842 0 3 0x4000082 thrsleep syz-fuzzer 97081 392752 46842 0 2 0x4000002 syz-fuzzer 97081 367431 46842 0 3 0x4000082 thrsleep syz-fuzzer 97081 479957 46842 0 3 0x4000082 thrsleep syz-fuzzer 97081 126421 46842 0 3 0x4000082 thrsleep syz-fuzzer 46842 242925 84121 0 3 0x10008a pause ksh *84121 344941 53267 0 7 0x12 sshd 1768 20167 1 0 3 0x100083 ttyin getty 53267 373243 1 0 3 0x80 select sshd 6789 437911 98253 73 3 0x100090 kqread syslogd 98253 351902 1 0 3 0x100082 netio syslogd 74149 219091 1 77 3 0x100090 poll dhclient 1342 437487 1 0 3 0x80 poll dhclient 47849 42888 0 0 3 0x14200 bored smr 45 26454 0 0 2 0x14200 zerothread 26071 361372 0 0 3 0x14200 aiodoned aiodoned 14635 243591 0 0 3 0x14200 syncer update 6434 51312 0 0 3 0x14200 cleaner cleaner 21023 270888 0 0 3 0x14200 reaper reaper 86174 292928 0 0 3 0x14200 pgdaemon pagedaemon 9798 159918 0 0 3 0x14200 bored crynlk 93847 251342 0 0 3 0x14200 bored crypto 16939 208752 0 0 3 0x40014200 acpi0 acpi0 5580 324959 0 0 3 0x14200 bored softnet 20062 21326 0 0 3 0x14200 bored systqmp 19388 368734 0 0 3 0x14200 bored systq 25620 256948 0 0 3 0x40014200 bored softclock 78915 523052 0 0 3 0x40014200 idle0 1 454384 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 9496 6357K 6862K 78643K 11433 0 pcb 13 8K 8K 78643K 79 0 rtable 139 12K 13K 78643K 483 0 ifaddr 92 19K 20K 78643K 182 0 counters 21 16K 16K 78643K 26 0 ioctlops 0 0K 4K 78643K 96 0 iov 0 0K 16K 78643K 61 0 mount 1 1K 1K 78643K 1 0 vnodes 1224 77K 77K 78643K 1425 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 104 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 195K 288K 78643K 12938 0 file desc 5 13K 25K 78643K 462 0 sigio 0 0K 0K 78643K 4 0 proc 49 38K 54K 78643K 380 0 subproc 32 2K 2K 78643K 38 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 23 0 in_multi 78 3K 4K 78643K 131 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 55 254K 254K 78643K 55 0 exec 0 0K 1K 78643K 205 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 145 56K 57K 78643K 1942 0 UVM aobj 19 2K 2K 78643K 19 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 51 0 NDP 11 0K 0K 78643K 22 0 temp 112 3867K 3935K 78643K 3383 0 kqueue 3 4K 12K 78643K 26 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 9 0 1 1 0 1 1 0 8 0 rtpcb 80 41 0 39 1 0 1 1 0 8 0 rtentry 112 66 0 25 2 0 2 2 0 8 0 unpcb 120 183 0 175 1 0 1 1 0 8 0 syncache 264 6 0 6 2 2 0 1 0 8 0 tcpqe 32 114 0 114 1 1 0 1 0 8 0 tcpcb 544 121 0 107 3 1 2 2 0 8 0 inpcb 296 507 0 500 4 2 2 2 0 8 1 rttmr 72 2 0 2 1 1 0 1 0 8 0 nd6 48 13 0 4 1 0 1 1 0 8 0 ppxss 1136 2 0 2 2 2 0 1 0 8 0 pfstscr 40 4 0 4 1 1 0 1 0 8 0 pfrktable 1344 84 0 66 3 1 2 2 0 8 0 pftag 88 15 0 10 1 0 1 1 0 8 0 pfstkey 112 4 0 4 1 1 0 1 0 8 0 pfstate 328 2 0 2 1 1 0 1 0 8 0 pfrule 1360 33 0 17 2 0 2 2 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 252 0 50 14 1 13 13 0 8 0 art_table 32 254 0 50 2 0 2 2 0 8 0 art_node 16 65 0 30 1 0 1 1 0 8 0 sysvmsgpl 40 39 0 21 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 102 0 92 1 0 1 1 0 8 0 shmpl 112 16 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1962 0 566 88 0 88 88 0 8 0 ffsino 240 1962 0 566 83 0 83 83 0 8 0 nchpl 144 2855 0 1252 60 0 60 60 0 8 0 uvmvnodes 72 2171 0 0 40 0 40 40 0 8 0 vnodes 208 2171 0 0 115 0 115 115 0 8 0 namei 1024 7813 0 7813 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 40 0 26 1 0 1 1 0 8 0 scxspl 192 7953 0 7953 1 0 1 1 0 8 1 plimitpl 152 36 0 29 1 0 1 1 0 8 0 sigapl 424 670 0 620 6 0 6 6 0 8 0 futexpl 56 9119 0 9119 2 1 1 1 0 8 1 knotepl 112 83 0 64 1 0 1 1 0 8 0 kqueuepl 144 83 0 81 1 0 1 1 0 8 0 pipepl 272 106 0 96 1 0 1 1 0 8 0 fdescpl 432 634 0 620 2 0 2 2 0 8 0 filepl 120 3819 0 3724 5 1 4 4 0 8 1 lockfpl 104 144 0 143 1 0 1 1 0 8 0 lockfspl 48 54 0 53 1 0 1 1 0 8 0 sessionpl 112 17 0 7 1 0 1 1 0 8 0 pgrppl 48 19 0 9 1 0 1 1 0 8 0 ucredpl 96 248 0 241 1 0 1 1 0 8 0 zombiepl 144 620 0 620 2 1 1 1 0 8 1 processpl 928 670 0 620 7 0 7 7 0 8 0 procpl 624 1208 0 1149 6 1 5 5 0 8 0 sosppl 128 3 0 3 1 1 0 1 0 8 0 sockpl 400 731 0 714 4 1 3 3 0 8 1 mcl64k 65536 29 0 29 3 2 1 1 0 8 1 mcl16k 16384 4 0 4 3 2 1 1 0 8 1 mcl12k 12288 9 0 9 3 3 0 1 0 8 0 mcl9k 9216 6 0 6 2 2 0 1 0 8 0 mcl8k 8192 18 0 18 4 3 1 1 0 8 1 mcl4k 4096 58 0 57 3 2 1 1 0 8 0 mcl2k2 2112 5 0 5 2 2 0 1 0 8 0 mcl2k 2048 96039 0 95988 22 15 7 20 0 8 0 mtagpl 96 37 0 14 2 1 1 1 0 8 0 mbufpl 256 153632 0 153492 20 7 13 13 0 8 0 bufpl 280 3908 0 128 270 0 270 270 0 8 0 anonpl 16 89683 0 70794 95 12 83 86 0 107 6 amapchunkpl 152 3250 0 3101 16 9 7 11 0 158 0 amappl16 192 3491 0 2445 63 9 54 60 0 8 1 amappl15 184 1 0 0 1 0 1 1 0 8 0 amappl14 176 454 0 445 1 0 1 1 0 8 0 amappl13 168 29 0 26 1 0 1 1 0 8 0 amappl12 160 8 0 6 1 0 1 1 0 8 0 amappl11 152 47 0 37 1 0 1 1 0 8 0 amappl10 144 13 0 9 1 0 1 1 0 8 0 amappl9 136 386 0 383 1 0 1 1 0 8 0 amappl8 128 351 0 298 2 0 2 2 0 8 0 amappl7 120 105 0 93 1 0 1 1 0 8 0 amappl6 112 30 0 21 1 0 1 1 0 8 0 amappl5 104 584 0 573 1 0 1 1 0 8 0 amappl4 96 432 0 401 1 0 1 1 0 8 0 amappl3 88 539 0 532 1 0 1 1 0 8 0 amappl2 80 4260 0 4196 2 0 2 2 0 8 0 amappl1 72 23093 0 22676 22 13 9 17 0 8 0 amappl 80 1437 0 1393 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 18 0 0 1 0 1 1 0 8 0 uaddrrnd 24 638 0 620 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 638 0 620 1 0 1 1 0 8 0 vmmpekpl 168 7675 0 7640 2 0 2 2 0 8 0 vmmpepl 168 84249 0 82061 138 35 103 118 0 357 7 vmsppl 272 637 0 620 3 1 2 2 0 8 0 pdppl 4096 1282 0 1244 8 2 6 6 0 8 1 pvpl 32 238921 0 216946 223 25 198 200 0 265 16 pmappl 200 637 0 620 1 0 1 1 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 276 0 41 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(ffffffff823fbb15) at panic+0x164 sys/kern/subr_prf.c:218 tcp_output(ffff800000ac3760) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac3760) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da72008,9,fffffd806bc23b00,0,0,ffff80001d71d870) at tcp_usrreq+0xa54 sosend(fffffd805da72008,0,ffff80001d723da8,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d71d870,4,ffff80001d723da8,0,ffff80001d723e90) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d71d870,ffff80001d723e40,ffff80001d723e90) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d723f10) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffea5b0, 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(ffffffff823fbb15) at panic+0x164 sys/kern/subr_prf.c:218 tcp_output(ffff800000ac3760) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac3760) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da72008,9,fffffd806bc23b00,0,0,ffff80001d71d870) at tcp_usrreq+0xa54 sosend(fffffd805da72008,0,ffff80001d723da8,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d71d870,4,ffff80001d723da8,0,ffff80001d723e90) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d71d870,ffff80001d723e40,ffff80001d723e90) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d723f10) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffea5b0, count: -9