panic: tcp_output: template len != hdrlen - optlen Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *406170 64496 0 0x12 0 0 sshd db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff823fb508) 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(fffffd805da6c328,9,fffffd805e275e00,0,0,ffff80001d71d870) at tcp_usrreq+0xa54 sosend(fffffd805da6c328,0,ffff80001d7233b8,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d71d870,4,ffff80001d7233b8,0,ffff80001d7234a0) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d71d870,ffff80001d723450,ffff80001d7234a0) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d723520) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc4f00, 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(ffffffff823fb508) 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(fffffd805da6c328,9,fffffd805e275e00,0,0,ffff80001d71d870) at tcp_usrreq+0xa54 sosend(fffffd805da6c328,0,ffff80001d7233b8,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d71d870,4,ffff80001d7233b8,0,ffff80001d7234a0) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d71d870,ffff80001d723450,ffff80001d7234a0) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d723520) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc4f00, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001d722f20 rbx 0xffff80001d722fd0 rdx 0x2 rcx 0 rax 0x1 r8 0xffffffff82040b7f kprintf+0x15f r9 0x1 r10 0x2 r11 0x2393968a3dc04d85 r12 0x3000000008 r13 0xffff80001d722f30 r14 0x100 r15 0x1 rip 0xffffffff8130eb58 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001d722f10 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (sshd) pid=406170 stat=onproc flags process=12 proc=0 pri=24, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff80001d71dae0,0xffff80001d71cc50 process=0xffff80001d707238 user=0xffff80001d71e000, vmspace=0xfffffd806bc0aaa0 estcpu=0, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 46636 278394 63628 0 2 0 syz-executor.1 46636 187516 63628 0 2 0x4000000 syz-executor.1 61309 168276 0 0 3 0x14200 bored sosplice 63628 10765 27471 0 3 0x82 nanosleep syz-executor.1 84772 517890 27471 0 2 0x2 syz-executor.0 27471 119235 54371 0 3 0x82 thrsleep syz-fuzzer 27471 442239 54371 0 2 0x4000002 syz-fuzzer 27471 359773 54371 0 3 0x4000082 thrsleep syz-fuzzer 27471 421309 54371 0 3 0x4000082 thrsleep syz-fuzzer 27471 38627 54371 0 3 0x4000082 thrsleep syz-fuzzer 27471 414717 54371 0 2 0x4000002 syz-fuzzer 27471 320999 54371 0 3 0x4000082 thrsleep syz-fuzzer 54371 114938 64496 0 3 0x10008a pause ksh *64496 406170 62969 0 7 0x12 sshd 41846 207971 1 0 3 0x100083 ttyin getty 62969 490220 1 0 3 0x80 select sshd 53149 202956 18853 73 3 0x100090 kqread syslogd 18853 275778 1 0 3 0x100082 netio syslogd 934 45245 1 77 3 0x100090 poll dhclient 98545 222853 1 0 3 0x80 poll dhclient 18537 351412 0 0 3 0x14200 bored smr 55076 309930 0 0 2 0x14200 zerothread 6113 41295 0 0 3 0x14200 aiodoned aiodoned 68247 26041 0 0 3 0x14200 syncer update 22314 245245 0 0 3 0x14200 cleaner cleaner 88110 323647 0 0 3 0x14200 reaper reaper 3467 504380 0 0 3 0x14200 pgdaemon pagedaemon 7086 440355 0 0 3 0x14200 bored crynlk 49832 350487 0 0 3 0x14200 bored crypto 56155 199131 0 0 3 0x40014200 acpi0 acpi0 89696 405930 0 0 3 0x14200 bored softnet 9801 332590 0 0 3 0x14200 bored systqmp 51678 72240 0 0 3 0x14200 bored systq 92926 200786 0 0 3 0x40014200 bored softclock 41038 523930 0 0 3 0x40014200 idle0 1 287990 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 9463 6329K 6587K 78643K 10709 0 pcb 13 8K 8K 78643K 33 0 rtable 116 4K 7K 78643K 268 0 ifaddr 53 12K 13K 78643K 85 0 counters 21 16K 16K 78643K 23 0 ioctlops 0 0K 4K 78643K 35 0 iov 0 0K 12K 78643K 8 0 mount 1 1K 1K 78643K 1 0 vnodes 1219 77K 77K 78643K 1263 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 4 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 1K 78643K 34 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 195K 288K 78643K 12938 0 file desc 5 13K 25K 78643K 163 0 proc 50 38K 54K 78643K 371 0 subproc 32 2K 2K 78643K 34 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 4 0 in_multi 40 2K 2K 78643K 51 0 ether_multi 1 0K 0K 78643K 4 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 37 175K 175K 78643K 37 0 exec 0 0K 1K 78643K 193 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 120 22K 22K 78643K 1213 0 UVM aobj 11 4K 4K 78643K 11 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 14 0 NDP 7 0K 0K 78643K 14 0 temp 84 3852K 3916K 78643K 2451 0 kqueue 3 4K 9K 78643K 11 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 80 117 0 115 1 0 1 1 0 8 0 rtentry 112 51 0 4 2 0 2 2 0 8 0 unpcb 120 79 0 71 1 0 1 1 0 8 0 syncache 264 8 0 8 2 1 1 1 0 8 1 tcpcb 544 210 0 196 5 1 4 5 0 8 3 inpcb 296 304 0 297 2 0 2 2 0 8 1 nd6 48 8 0 1 1 0 1 1 0 8 0 pkpcb 40 2 0 2 1 1 0 1 0 8 0 pfstscr 40 3 0 2 1 0 1 1 0 8 0 pfrktable 1344 23 0 21 1 0 1 1 0 8 0 pftag 88 5 0 2 1 0 1 1 0 8 0 pfqueue 264 2 0 2 1 0 1 1 0 8 1 pfstitem 24 2 0 0 1 0 1 1 0 8 0 pfstkey 112 6 0 4 1 0 1 1 0 8 0 pfstate 328 3 0 2 1 0 1 1 0 8 0 pfrule 1360 8 0 4 1 0 1 1 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 222 0 6 14 0 14 14 0 8 0 art_table 32 224 0 6 2 0 2 2 0 8 0 art_node 16 50 0 7 1 0 1 1 0 8 0 sysvmsgpl 40 4 0 2 1 0 1 1 0 8 0 semupl 112 2 0 2 1 0 1 1 0 8 1 semapl 112 28 0 18 1 0 1 1 0 8 0 shmpl 112 8 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1586 0 187 88 0 88 88 0 8 0 ffsino 240 1586 0 187 83 0 83 83 0 8 0 nchpl 144 1983 0 391 60 0 60 60 0 8 0 uvmvnodes 72 1661 0 0 31 0 31 31 0 8 0 vnodes 208 1661 0 0 88 0 88 88 0 8 0 namei 1024 4979 0 4979 1 0 1 1 0 8 1 vcpupl 1984 1 0 0 1 0 1 1 0 8 0 vmpool 528 2 0 1 1 0 1 1 0 8 0 pfiaddrpl 120 8 0 6 1 0 1 1 0 8 0 scxspl 192 5480 0 5480 1 0 1 1 0 8 1 plimitpl 152 24 0 17 1 0 1 1 0 8 0 sigapl 424 350 0 321 4 0 4 4 0 8 0 futexpl 56 2758 0 2758 1 0 1 1 0 8 1 knotepl 112 70 0 50 1 0 1 1 0 8 0 kqueuepl 144 20 0 16 1 0 1 1 0 8 0 pipepl 272 75 0 64 1 0 1 1 0 8 0 fdescpl 432 335 0 321 2 0 2 2 0 8 0 filepl 120 1831 0 1734 4 0 4 4 0 8 0 lockfpl 104 28 0 27 1 0 1 1 0 8 0 lockfspl 48 12 0 11 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 115 0 108 1 0 1 1 0 8 0 zombiepl 144 321 0 321 1 0 1 1 0 8 1 processpl 928 350 0 321 4 0 4 4 0 8 0 procpl 624 521 0 485 4 0 4 4 0 8 0 sockpl 400 502 0 485 4 1 3 4 0 8 1 mcl64k 65536 1 0 1 1 0 1 1 0 8 1 mcl12k 12288 4 0 4 1 0 1 1 0 8 1 mcl9k 9216 3 0 3 1 0 1 1 0 8 1 mcl8k 8192 3 0 3 1 0 1 1 0 8 1 mcl4k 4096 17 0 16 2 1 1 1 0 8 0 mcl2k2 2112 4 0 4 1 0 1 1 0 8 1 mcl2k 2048 93816 0 93775 15 6 9 13 0 8 3 mtagpl 96 18 0 2 2 1 1 1 0 8 0 mbufpl 256 148782 0 148661 10 1 9 10 0 8 1 bufpl 280 3383 0 126 233 0 233 233 0 8 0 anonpl 16 45698 0 28410 72 2 70 70 0 107 0 amapchunkpl 152 1432 0 1268 9 2 7 9 0 158 0 amappl16 192 1551 0 630 47 0 47 47 0 8 0 amappl15 184 1 0 0 1 0 1 1 0 8 0 amappl14 176 94 0 88 1 0 1 1 0 8 0 amappl13 168 26 0 23 1 0 1 1 0 8 0 amappl12 160 7 0 4 2 1 1 1 0 8 0 amappl11 152 44 0 35 1 0 1 1 0 8 0 amappl10 144 15 0 9 1 0 1 1 0 8 0 amappl9 136 417 0 412 1 0 1 1 0 8 0 amappl8 128 354 0 325 1 0 1 1 0 8 0 amappl7 120 111 0 95 1 0 1 1 0 8 0 amappl6 112 17 0 16 1 0 1 1 0 8 0 amappl5 104 291 0 280 1 0 1 1 0 8 0 amappl4 96 420 0 395 1 0 1 1 0 8 0 amappl3 88 173 0 168 1 0 1 1 0 8 0 amappl2 80 1853 0 1787 2 0 2 2 0 8 0 amappl1 72 16423 0 16006 22 12 10 17 0 8 0 amappl 80 752 0 701 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 10 0 0 1 0 1 1 0 8 0 uaddrrnd 24 337 0 322 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 337 0 322 1 0 1 1 0 8 0 vmmpekpl 168 6207 0 6179 2 0 2 2 0 8 0 vmmpepl 168 48050 0 46030 116 6 110 113 0 357 22 vmsppl 272 336 0 322 2 0 2 2 0 8 1 pdppl 4096 680 0 645 6 1 5 6 0 8 0 pvpl 32 152032 0 131809 169 0 169 169 0 265 5 pmappl 200 336 0 322 1 0 1 1 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 245 0 13 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(ffffffff823fb508) 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(fffffd805da6c328,9,fffffd805e275e00,0,0,ffff80001d71d870) at tcp_usrreq+0xa54 sosend(fffffd805da6c328,0,ffff80001d7233b8,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d71d870,4,ffff80001d7233b8,0,ffff80001d7234a0) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d71d870,ffff80001d723450,ffff80001d7234a0) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d723520) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc4f00, 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(ffffffff823fb508) 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(fffffd805da6c328,9,fffffd805e275e00,0,0,ffff80001d71d870) at tcp_usrreq+0xa54 sosend(fffffd805da6c328,0,ffff80001d7233b8,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d71d870,4,ffff80001d7233b8,0,ffff80001d7234a0) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d71d870,ffff80001d723450,ffff80001d7234a0) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d723520) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc4f00, count: -9