panic: tcp_output: template len != hdrlen - optlen Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *250366 33891 0 0x12 0 0 sshd db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff823ff075) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac3320) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac3320) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da68198,9,fffffd805ba27600,0,0,ffff80001d71c9d0) at tcp_usrreq+0xa54 sosend(fffffd805da68198,0,ffff80001d6cdb28,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d71c9d0,4,ffff80001d6cdb28,0,ffff80001d6cdc10) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d71c9d0,ffff80001d6cdbc0,ffff80001d6cdc10) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d6cdc90) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc0360, 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(ffffffff823ff075) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac3320) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac3320) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da68198,9,fffffd805ba27600,0,0,ffff80001d71c9d0) at tcp_usrreq+0xa54 sosend(fffffd805da68198,0,ffff80001d6cdb28,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d71c9d0,4,ffff80001d6cdb28,0,ffff80001d6cdc10) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d71c9d0,ffff80001d6cdbc0,ffff80001d6cdc10) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d6cdc90) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc0360, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001d6cd690 rbx 0xffff80001d6cd740 rdx 0x2 rcx 0 rax 0x1 r8 0xffffffff81443f7f kprintf+0x15f r9 0x1 r10 0x2 r11 0xc438715f7ae558dc r12 0x3000000008 r13 0xffff80001d6cd6a0 r14 0x100 r15 0x1 rip 0xffffffff8197d558 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001d6cd680 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (sshd) pid=250366 stat=onproc flags process=12 proc=0 pri=24, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff80001d71d870,0xffff80001d71c020 process=0xffff80001d700018 user=0xffff80001d6c8000, 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 2372 520178 1865 0 3 0x2 biowait syz-executor.1 29973 341675 1865 0 2 0x2 syz-executor.0 1865 410734 29398 0 3 0x82 thrsleep syz-fuzzer 1865 171718 29398 0 2 0x4000002 syz-fuzzer 1865 331236 29398 0 3 0x4000082 thrsleep syz-fuzzer 1865 466256 29398 0 3 0x4000082 thrsleep syz-fuzzer 1865 313381 29398 0 3 0x4000082 thrsleep syz-fuzzer 1865 286891 29398 0 2 0x4000002 syz-fuzzer 1865 451830 29398 0 3 0x4000082 thrsleep syz-fuzzer 1865 500758 29398 0 3 0x4000082 thrsleep syz-fuzzer 29398 98671 33891 0 3 0x10008a pause ksh *33891 250366 92677 0 7 0x12 sshd 70664 273347 1 0 3 0x100083 ttyin getty 92677 204646 1 0 3 0x80 select sshd 23633 161771 8794 73 3 0x100090 kqread syslogd 8794 375621 1 0 3 0x100082 netio syslogd 29110 438555 1 77 3 0x100090 poll dhclient 80122 321094 1 0 3 0x80 poll dhclient 89079 511119 0 0 3 0x14200 bored smr 31658 247801 0 0 3 0x14200 pgzero zerothread 23596 471140 0 0 3 0x14200 aiodoned aiodoned 38809 3338 0 0 3 0x14200 syncer update 22001 392241 0 0 3 0x14200 cleaner cleaner 81491 362016 0 0 3 0x14200 reaper reaper 83383 198153 0 0 3 0x14200 pgdaemon pagedaemon 39276 40928 0 0 3 0x14200 bored crynlk 44404 86175 0 0 3 0x14200 bored crypto 86511 312887 0 0 3 0x40014200 acpi0 acpi0 51379 493315 0 0 3 0x14200 bored softnet 81886 51507 0 0 3 0x14200 bored systqmp 78100 434351 0 0 3 0x14200 bored systq 78604 475818 0 0 3 0x40014200 bored softclock 44724 228339 0 0 3 0x40014200 idle0 1 179171 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 9462 6329K 6842K 78643K 10681 0 pcb 13 8K 8K 78643K 59 0 rtable 109 3K 3K 78643K 220 0 ifaddr 53 12K 12K 78643K 55 0 counters 21 16K 16K 78643K 21 0 ioctlops 0 0K 4K 78643K 35 0 iov 0 0K 12K 78643K 11 0 mount 1 1K 1K 78643K 1 0 vnodes 1216 76K 77K 78643K 1248 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 28 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 195K 288K 78643K 12938 0 file desc 4 9K 25K 78643K 105 0 sigio 0 0K 0K 78643K 2 0 proc 49 38K 54K 78643K 360 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 20 0 in_multi 50 2K 2K 78643K 66 0 ether_multi 1 0K 0K 78643K 7 0 mrt 1 0K 0K 78643K 3 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 183 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 130 23K 23K 78643K 1113 0 UVM aobj 5 2K 2K 78643K 5 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 20 0 NDP 7 0K 0K 78643K 11 0 temp 71 3848K 3912K 78643K 3529 0 kqueue 3 4K 6K 78643K 9 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 19 0 17 1 0 1 1 0 8 0 rtentry 112 54 0 8 2 0 2 2 0 8 0 unpcb 120 119 0 111 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 102 0 102 1 0 1 1 0 8 1 tcpcb 544 66 0 62 1 0 1 1 0 8 0 inpcb 296 174 0 167 2 0 2 2 0 8 1 rttmr 72 1 0 1 1 0 1 1 0 8 1 nd6 48 7 0 0 1 0 1 1 0 8 0 pfrule 1360 2 0 0 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 196 0 6 13 0 13 13 0 8 0 art_table 32 197 0 6 2 0 2 2 0 8 0 art_node 16 53 0 12 1 0 1 1 0 8 0 semupl 112 4 0 4 1 0 1 1 0 8 1 semapl 112 22 0 12 1 0 1 1 0 8 0 shmpl 112 2 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1507 0 111 88 0 88 88 0 8 0 ffsino 240 1507 0 111 83 0 83 83 0 8 0 nchpl 144 1828 0 226 60 0 60 60 0 8 0 uvmvnodes 72 1572 0 0 29 0 29 29 0 8 0 vnodes 208 1572 0 0 83 0 83 83 0 8 0 namei 1024 4557 0 4556 1 0 1 1 0 8 0 scxspl 192 5335 0 5334 1 0 1 1 0 8 0 plimitpl 152 16 0 9 1 0 1 1 0 8 0 sigapl 424 291 0 264 4 0 4 4 0 8 0 futexpl 56 1517 0 1517 1 0 1 1 0 8 1 knotepl 112 68 0 49 1 0 1 1 0 8 0 kqueuepl 144 8 0 6 1 0 1 1 0 8 0 pipepl 272 76 0 66 1 0 1 1 0 8 0 fdescpl 432 277 0 264 2 0 2 2 0 8 0 filepl 120 1479 0 1384 4 0 4 4 0 8 1 lockfpl 104 22 0 21 1 0 1 1 0 8 0 lockfspl 48 10 0 9 1 0 1 1 0 8 0 sessionpl 112 17 0 7 1 0 1 1 0 8 0 pgrppl 48 17 0 7 1 0 1 1 0 8 0 ucredpl 96 110 0 103 1 0 1 1 0 8 0 zombiepl 144 264 0 264 1 0 1 1 0 8 1 processpl 928 291 0 264 4 0 4 4 0 8 0 procpl 624 385 0 351 4 0 4 4 0 8 1 sockpl 400 314 0 297 3 0 3 3 0 8 1 mcl64k 65536 4 0 4 1 0 1 1 0 8 1 mcl12k 12288 1 0 1 1 0 1 1 0 8 1 mcl9k 9216 1 0 1 1 0 1 1 0 8 1 mcl4k 4096 17 0 17 2 1 1 1 0 8 1 mcl2k 2048 93301 0 93254 16 2 14 14 0 8 7 mtagpl 96 10 0 4 2 1 1 1 0 8 0 mbufpl 256 147669 0 147576 11 2 9 9 0 8 1 bufpl 280 3433 0 124 237 0 237 237 0 8 0 anonpl 16 44351 0 27387 71 1 70 70 0 107 1 amapchunkpl 152 1252 0 1120 7 0 7 7 0 158 0 amappl16 192 1363 0 432 48 0 48 48 0 8 1 amappl15 184 1 0 0 1 0 1 1 0 8 0 amappl14 176 29 0 23 1 0 1 1 0 8 0 amappl13 168 26 0 23 1 0 1 1 0 8 0 amappl12 160 48 0 45 1 0 1 1 0 8 0 amappl11 152 58 0 48 1 0 1 1 0 8 0 amappl10 144 14 0 8 1 0 1 1 0 8 0 amappl9 136 403 0 401 1 0 1 1 0 8 0 amappl8 128 329 0 286 2 0 2 2 0 8 0 amappl7 120 108 0 96 1 0 1 1 0 8 0 amappl6 112 28 0 20 1 0 1 1 0 8 0 amappl5 104 255 0 245 1 0 1 1 0 8 0 amappl4 96 414 0 390 1 0 1 1 0 8 0 amappl3 88 104 0 96 1 0 1 1 0 8 0 amappl2 80 1364 0 1306 2 0 2 2 0 8 0 amappl1 72 15042 0 14645 24 12 12 17 0 8 3 amappl 80 633 0 593 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 4 0 0 1 0 1 1 0 8 0 uaddrrnd 24 277 0 264 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 277 0 264 1 0 1 1 0 8 0 vmmpekpl 168 5907 0 5882 2 0 2 2 0 8 0 vmmpepl 168 41166 0 39240 125 7 118 118 0 357 29 vmsppl 272 276 0 264 2 0 2 2 0 8 1 pdppl 4096 560 0 528 6 0 6 6 0 8 1 pvpl 32 144931 0 125086 167 0 167 167 0 265 5 pmappl 200 276 0 264 1 0 1 1 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 239 0 7 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(ffffffff823ff075) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac3320) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac3320) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da68198,9,fffffd805ba27600,0,0,ffff80001d71c9d0) at tcp_usrreq+0xa54 sosend(fffffd805da68198,0,ffff80001d6cdb28,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d71c9d0,4,ffff80001d6cdb28,0,ffff80001d6cdc10) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d71c9d0,ffff80001d6cdbc0,ffff80001d6cdc10) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d6cdc90) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc0360, 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(ffffffff823ff075) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac3320) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac3320) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da68198,9,fffffd805ba27600,0,0,ffff80001d71c9d0) at tcp_usrreq+0xa54 sosend(fffffd805da68198,0,ffff80001d6cdb28,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d71c9d0,4,ffff80001d6cdb28,0,ffff80001d6cdc10) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d71c9d0,ffff80001d6cdbc0,ffff80001d6cdc10) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d6cdc90) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc0360, count: -9