panic: tcp_output: template len != hdrlen - optlen Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *250282 86328 0 0x12 0 0 sshd db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff823f5027) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac2760) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac2760) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da70008,9,fffffd805e432600,0,0,ffff80001d717010) at tcp_usrreq+0xa54 sosend(fffffd805da70008,0,ffff80001d71e778,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d717010,4,ffff80001d71e778,0,ffff80001d71e860) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d717010,ffff80001d71e810,ffff80001d71e860) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d71e8e0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffed550, 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(ffffffff823f5027) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac2760) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac2760) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da70008,9,fffffd805e432600,0,0,ffff80001d717010) at tcp_usrreq+0xa54 sosend(fffffd805da70008,0,ffff80001d71e778,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d717010,4,ffff80001d71e778,0,ffff80001d71e860) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d717010,ffff80001d71e810,ffff80001d71e860) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d71e8e0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffed550, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001d71e2e0 rbx 0xffff80001d71e390 rdx 0x2 rcx 0 rax 0x1 r8 0xffffffff8148f4df kprintf+0x15f r9 0x1 r10 0x2 r11 0x98d07f07c5bcfc23 r12 0x3000000008 r13 0xffff80001d71e2f0 r14 0x100 r15 0x1 rip 0xffffffff82231408 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001d71e2d0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (sshd) pid=250282 stat=onproc flags process=12 proc=0 pri=24, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff80001d718390,0xffff80001d7179e0 process=0xffff8000ffff8748 user=0xffff80001d719000, vmspace=0xfffffd806bc0a990 estcpu=0, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 62230 472000 8626 0 2 0 syz-executor.1 62230 503406 8626 0 2 0x4000000 syz-executor.1 91944 503818 81117 0 2 0x2 syz-executor.0 8626 179409 81117 0 3 0x82 nanosleep syz-executor.1 81117 481923 18639 0 3 0x82 thrsleep syz-fuzzer 81117 29477 18639 0 3 0x4000082 nanosleep syz-fuzzer 81117 370719 18639 0 2 0x4000002 syz-fuzzer 81117 507573 18639 0 3 0x4000082 thrsleep syz-fuzzer 81117 350952 18639 0 3 0x4000082 thrsleep syz-fuzzer 81117 216375 18639 0 3 0x4000082 thrsleep syz-fuzzer 81117 254457 18639 0 3 0x4000082 thrsleep syz-fuzzer 81117 181767 18639 0 3 0x4000082 thrsleep syz-fuzzer 18639 410995 86328 0 3 0x10008a pause ksh *86328 250282 84583 0 7 0x12 sshd 11993 311119 1 0 3 0x100083 ttyin getty 84583 316045 1 0 3 0x80 select sshd 18264 6957 74874 73 3 0x100090 kqread syslogd 74874 509373 1 0 3 0x100082 netio syslogd 25502 320381 1 77 3 0x100090 poll dhclient 1485 456911 1 0 3 0x80 poll dhclient 9347 29239 0 0 3 0x14200 bored smr 42039 483437 0 0 2 0x14200 zerothread 72225 417216 0 0 3 0x14200 aiodoned aiodoned 35740 151879 0 0 3 0x14200 syncer update 65258 10718 0 0 3 0x14200 cleaner cleaner 71494 31738 0 0 3 0x14200 reaper reaper 81907 444362 0 0 3 0x14200 pgdaemon pagedaemon 5788 325191 0 0 3 0x14200 bored crynlk 18130 364831 0 0 3 0x14200 bored crypto 37310 506733 0 0 3 0x40014200 acpi0 acpi0 97525 32697 0 0 3 0x14200 bored softnet 6233 253817 0 0 3 0x14200 bored systqmp 24345 508814 0 0 3 0x14200 bored systq 32160 221809 0 0 3 0x40014200 bored softclock 23621 68862 0 0 3 0x40014200 idle0 1 256004 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 9484 6399K 6986K 78643K 10842 0 pcb 13 8K 8K 78643K 71 0 rtable 108 3K 5K 78643K 284 0 ifaddr 52 11K 11K 78643K 85 0 counters 21 16K 16K 78643K 25 0 ioctlops 0 0K 4K 78643K 32 0 iov 0 0K 12K 78643K 24 0 mount 1 1K 1K 78643K 1 0 vnodes 1221 77K 77K 78643K 1321 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 12 0K 0K 78643K 32 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 195K 288K 78643K 12938 0 file desc 5 13K 25K 78643K 169 0 sigio 0 0K 0K 78643K 2 0 proc 48 38K 63K 78643K 418 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 15 0 in_multi 33 2K 2K 78643K 69 0 ether_multi 1 0K 0K 78643K 5 0 mrt 0 0K 0K 78643K 1 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 49 228K 228K 78643K 49 0 exec 0 0K 1K 78643K 202 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 127 23K 32K 78643K 1286 0 UVM aobj 2 2K 2K 78643K 2 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 32 0 NDP 8 0K 0K 78643K 18 0 temp 77 3848K 3912K 78643K 6682 0 kqueue 3 4K 12K 78643K 13 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 8 0 2 1 0 1 1 0 8 0 rtpcb 80 27 0 25 1 0 1 1 0 8 0 rtentry 112 58 0 14 2 0 2 2 0 8 0 unpcb 120 83 0 75 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 155 0 155 1 1 0 1 0 8 0 tcpcb 544 86 0 82 1 0 1 1 0 8 0 inpcb 296 262 0 255 2 0 2 2 0 8 1 nd6 48 11 0 5 1 0 1 1 0 8 0 ppxss 1128 1 0 1 1 0 1 1 0 8 1 pfrktable 1344 10 0 10 1 0 1 1 0 8 1 pfrule 1360 6 0 6 1 0 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 233 0 44 12 0 12 12 0 8 0 art_table 32 234 0 44 2 0 2 2 0 8 0 art_node 16 57 0 17 1 0 1 1 0 8 0 sysvmsgpl 40 2 0 1 1 0 1 1 0 8 0 semapl 112 30 0 20 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1604 0 206 88 0 88 88 0 8 0 ffsino 240 1604 0 206 83 0 83 83 0 8 0 nchpl 144 2023 0 440 60 0 60 60 0 8 0 uvmvnodes 72 1725 0 0 32 0 32 32 0 8 0 vnodes 208 1725 0 0 91 0 91 91 0 8 0 namei 1024 5421 0 5421 1 0 1 1 0 8 1 pfiaddrpl 120 2 0 2 1 0 1 1 0 8 1 scxspl 192 5932 0 5932 1 0 1 1 0 8 1 plimitpl 152 30 0 23 1 0 1 1 0 8 0 sigapl 424 352 0 324 4 0 4 4 0 8 0 futexpl 56 2811 0 2811 1 0 1 1 0 8 1 knotepl 112 90 0 71 1 0 1 1 0 8 0 kqueuepl 144 26 0 23 1 0 1 1 0 8 0 pipepl 272 98 0 88 1 0 1 1 0 8 0 fdescpl 432 338 0 324 2 0 2 2 0 8 0 filepl 120 1997 0 1902 4 0 4 4 0 8 1 lockfpl 104 31 0 30 1 0 1 1 0 8 0 lockfspl 48 15 0 14 1 0 1 1 0 8 0 sessionpl 112 18 0 8 1 0 1 1 0 8 0 pgrppl 48 18 0 8 1 0 1 1 0 8 0 ucredpl 96 176 0 169 1 0 1 1 0 8 0 zombiepl 144 324 0 324 1 0 1 1 0 8 1 processpl 920 352 0 324 4 0 4 4 0 8 0 procpl 624 514 0 478 4 0 4 4 0 8 1 sockpl 400 372 0 355 3 0 3 3 0 8 1 mcl64k 65536 10 0 10 1 0 1 1 0 8 1 mcl16k 16384 1 0 1 1 0 1 1 0 8 1 mcl12k 12288 4 0 4 1 0 1 1 0 8 1 mcl9k 9216 2 0 2 1 0 1 1 0 8 1 mcl8k 8192 5 0 5 1 0 1 1 0 8 1 mcl4k 4096 15 0 15 2 1 1 1 0 8 1 mcl2k 2048 76710 0 76655 17 5 12 15 0 8 4 mtagpl 96 28 0 4 2 1 1 1 0 8 0 mbufpl 256 122610 0 122458 11 0 11 11 0 8 0 bufpl 280 3693 0 126 255 0 255 255 0 8 0 anonpl 16 55618 0 40566 72 2 70 71 0 107 4 amapchunkpl 152 2160 0 2017 13 0 13 13 0 158 6 amappl16 192 1536 0 644 47 0 47 47 0 8 2 amappl15 184 34 0 32 1 0 1 1 0 8 0 amappl14 176 24 0 20 1 0 1 1 0 8 0 amappl13 168 88 0 83 1 0 1 1 0 8 0 amappl12 160 66 0 63 1 0 1 1 0 8 0 amappl11 152 55 0 45 1 0 1 1 0 8 0 amappl10 144 11 0 8 1 0 1 1 0 8 0 amappl9 136 374 0 372 1 0 1 1 0 8 0 amappl8 128 357 0 316 2 0 2 2 0 8 0 amappl7 120 119 0 107 1 0 1 1 0 8 0 amappl6 112 28 0 20 1 0 1 1 0 8 0 amappl5 104 215 0 205 1 0 1 1 0 8 0 amappl4 96 489 0 462 1 0 1 1 0 8 0 amappl3 88 160 0 153 1 0 1 1 0 8 0 amappl2 80 1842 0 1776 2 0 2 2 0 8 0 amappl1 72 15805 0 15395 24 15 9 17 0 8 0 amappl 80 779 0 737 1 0 1 1 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 1 0 0 1 0 1 1 0 8 0 uaddrrnd 24 338 0 324 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 338 0 324 1 0 1 1 0 8 0 vmmpekpl 168 6396 0 6370 2 0 2 2 0 8 0 vmmpepl 168 47879 0 45912 128 7 121 121 0 357 35 vmsppl 272 337 0 324 2 1 1 2 0 8 0 pdppl 4096 682 0 648 6 1 5 6 0 8 0 pvpl 32 169861 0 151833 169 1 168 169 0 265 11 pmappl 200 337 0 324 1 0 1 1 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 241 0 10 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(ffffffff823f5027) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac2760) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac2760) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da70008,9,fffffd805e432600,0,0,ffff80001d717010) at tcp_usrreq+0xa54 sosend(fffffd805da70008,0,ffff80001d71e778,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d717010,4,ffff80001d71e778,0,ffff80001d71e860) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d717010,ffff80001d71e810,ffff80001d71e860) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d71e8e0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffed550, 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(ffffffff823f5027) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac2760) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac2760) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da70008,9,fffffd805e432600,0,0,ffff80001d717010) at tcp_usrreq+0xa54 sosend(fffffd805da70008,0,ffff80001d71e778,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d717010,4,ffff80001d71e778,0,ffff80001d71e860) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d717010,ffff80001d71e810,ffff80001d71e860) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d71e8e0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffed550, count: -9