panic: tcp_output: template len != hdrlen - optlen Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *276219 81111 0 0x12 0 0 sshd db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff823f8390) 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(fffffd805da784b8,9,fffffd805c5d1400,0,0,ffff80001d71c9d0) at tcp_usrreq+0xa54 sosend(fffffd805da784b8,0,ffff80001d6cdc08,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d71c9d0,4,ffff80001d6cdc08,0,ffff80001d6cdcf0) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d71c9d0,ffff80001d6cdca0,ffff80001d6cdcf0) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d6cdd70) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffdc5c0, 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(ffffffff823f8390) 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(fffffd805da784b8,9,fffffd805c5d1400,0,0,ffff80001d71c9d0) at tcp_usrreq+0xa54 sosend(fffffd805da784b8,0,ffff80001d6cdc08,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d71c9d0,4,ffff80001d6cdc08,0,ffff80001d6cdcf0) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d71c9d0,ffff80001d6cdca0,ffff80001d6cdcf0) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d6cdd70) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffdc5c0, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001d6cd770 rbx 0xffff80001d6cd820 rdx 0x2 rcx 0 rax 0x1 r8 0xffffffff8138bf7f kprintf+0x15f r9 0x1 r10 0x2 r11 0x5b10471cefe90ee8 r12 0x3000000008 r13 0xffff80001d6cd780 r14 0x100 r15 0x1 rip 0xffffffff813ac878 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001d6cd760 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (sshd) pid=276219 stat=onproc flags process=12 proc=0 pri=24, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff80001d71c4f0,0xffff80001d71cec0 process=0xffff80001d706758 user=0xffff80001d6c8000, vmspace=0xfffffd806bc09bb0 estcpu=0, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 26853 145894 0 0 3 0x14200 bored sosplice 9678 100306 58388 0 3 0x82 piperd syz-executor.0 16313 414086 58388 0 3 0x82 piperd syz-executor.1 58388 464012 71523 0 3 0x82 thrsleep syz-fuzzer 58388 279441 71523 0 3 0x4000082 nanosleep syz-fuzzer 58388 495045 71523 0 2 0x4000002 syz-fuzzer 58388 421952 71523 0 3 0x4000082 thrsleep syz-fuzzer 58388 34929 71523 0 3 0x4000082 thrsleep syz-fuzzer 58388 279127 71523 0 3 0x4000082 thrsleep syz-fuzzer 58388 46566 71523 0 3 0x4000082 thrsleep syz-fuzzer 71523 438272 81111 0 3 0x10008a pause ksh *81111 276219 82861 0 7 0x12 sshd 35919 25557 1 0 3 0x100083 ttyin getty 82861 258856 1 0 3 0x80 select sshd 66334 248203 62031 73 3 0x100090 kqread syslogd 62031 148990 1 0 3 0x100082 netio syslogd 5717 233302 1 77 3 0x100090 poll dhclient 66174 169316 1 0 3 0x80 poll dhclient 74278 43333 0 0 3 0x14200 bored smr 16798 192120 0 0 2 0x14200 zerothread 50193 319348 0 0 3 0x14200 aiodoned aiodoned 8289 334645 0 0 3 0x14200 syncer update 93125 27254 0 0 3 0x14200 cleaner cleaner 73968 480131 0 0 3 0x14200 reaper reaper 90983 474851 0 0 3 0x14200 pgdaemon pagedaemon 13767 23348 0 0 3 0x14200 bored crynlk 28260 465062 0 0 3 0x14200 bored crypto 8412 396814 0 0 3 0x40014200 acpi0 acpi0 64289 378259 0 0 3 0x14200 bored softnet 63879 246051 0 0 3 0x14200 bored systqmp 6335 392396 0 0 3 0x14200 bored systq 64361 18386 0 0 3 0x40014200 bored softclock 26003 405018 0 0 3 0x40014200 idle0 1 198919 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 9488 6337K 6911K 78643K 11308 0 pcb 13 8K 8K 78643K 35 0 rtable 117 5K 7K 78643K 307 0 ifaddr 64 13K 13K 78643K 96 0 counters 21 16K 16K 78643K 24 0 ioctlops 0 0K 4K 78643K 49 0 iov 0 0K 16K 78643K 196 0 mount 1 1K 1K 78643K 1 0 vnodes 1220 77K 77K 78643K 1398 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 26 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 195K 288K 78643K 12938 0 file desc 4 9K 25K 78643K 232 0 sigio 0 0K 0K 78643K 4 0 proc 50 38K 63K 78643K 361 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 14 0 in_multi 33 2K 2K 78643K 59 0 ether_multi 1 0K 0K 78643K 5 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 198 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 39K 78643K 1372 0 UVM aobj 8 2K 2K 78643K 14 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 10 0K 0K 78643K 21 0 temp 85 3850K 3914K 78643K 8623 0 kqueue 3 4K 12K 78643K 14 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 7 0 1 1 0 1 1 0 8 0 rtpcb 80 33 0 31 1 0 1 1 0 8 0 rtentry 112 54 0 10 2 0 2 2 0 8 0 unpcb 120 151 0 143 1 0 1 1 0 8 0 syncache 264 6 0 6 2 2 0 1 0 8 0 tcpqe 32 382 0 382 2 2 0 1 0 8 0 tcpcb 544 69 0 65 1 0 1 1 0 8 0 ipq 40 5 0 5 2 2 0 1 0 8 0 ipqe 40 12 0 12 2 2 0 1 0 8 0 inpcb 296 177 0 170 2 1 1 2 0 8 0 ip6q 72 1 0 1 1 1 0 1 0 8 0 ip6af 40 2 0 2 1 1 0 1 0 8 0 nd6 48 10 0 4 1 0 1 1 0 8 0 pfrktable 1344 24 0 19 1 0 1 1 0 8 0 pftag 88 2 0 2 1 1 0 1 0 8 0 pfrule 1360 10 0 8 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 3 13 0 13 13 0 8 0 art_table 32 197 0 3 2 0 2 2 0 8 0 art_node 16 53 0 13 1 0 1 1 0 8 0 sysvmsgpl 40 2 0 2 1 1 0 1 0 8 0 semapl 112 24 0 14 1 0 1 1 0 8 0 shmpl 112 11 0 6 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1674 0 278 88 0 88 88 0 8 0 ffsino 240 1674 0 278 83 0 83 83 0 8 0 nchpl 144 2279 0 690 60 0 60 60 0 8 0 uvmvnodes 72 1877 0 0 35 0 35 35 0 8 0 vnodes 208 1877 0 0 99 0 99 99 0 8 0 namei 1024 5769 0 5769 2 1 1 1 0 8 1 vmpool 528 4 0 4 1 1 0 1 0 8 0 pfiaddrpl 120 8 0 4 1 0 1 1 0 8 0 scxspl 192 6610 0 6610 1 0 1 1 0 8 1 plimitpl 152 36 0 29 1 0 1 1 0 8 0 sigapl 424 419 0 391 4 0 4 4 0 8 0 futexpl 56 4076 0 4076 1 0 1 1 0 8 1 knotepl 112 75 0 56 1 0 1 1 0 8 0 kqueuepl 144 26 0 24 1 0 1 1 0 8 0 pipepl 272 87 0 77 1 0 1 1 0 8 0 fdescpl 432 404 0 391 2 0 2 2 0 8 0 filepl 120 2222 0 2127 4 0 4 4 0 8 1 lockfpl 104 52 0 51 1 0 1 1 0 8 0 lockfspl 48 19 0 18 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 160 0 153 1 0 1 1 0 8 0 zombiepl 144 391 0 391 2 1 1 1 0 8 1 processpl 928 419 0 391 4 0 4 4 0 8 0 procpl 624 661 0 627 5 2 3 4 0 8 0 sosppl 128 4 0 4 2 2 0 1 0 8 0 sockpl 400 363 0 346 6 3 3 5 0 8 1 mcl64k 65536 20 0 20 3 2 1 1 0 8 1 mcl16k 16384 2 0 2 1 1 0 1 0 8 0 mcl12k 12288 4 0 4 2 2 0 1 0 8 0 mcl9k 9216 8 0 8 2 1 1 1 0 8 1 mcl8k 8192 5 0 5 2 1 1 1 0 8 1 mcl4k 4096 27 0 27 4 3 1 1 0 8 1 mcl2k2 2112 2 0 2 2 2 0 1 0 8 0 mcl2k 2048 90966 0 90915 21 14 7 17 0 8 0 mtagpl 96 23 0 3 2 1 1 1 0 8 0 mbufpl 256 145208 0 145050 13 2 11 11 0 8 0 bufpl 280 3667 0 129 253 0 253 253 0 8 0 anonpl 16 58329 0 42517 80 9 71 78 0 107 0 amapchunkpl 152 1872 0 1733 17 10 7 16 0 158 0 amappl16 192 2156 0 1202 58 10 48 54 0 8 0 amappl15 184 200 0 197 1 0 1 1 0 8 0 amappl14 176 25 0 19 1 0 1 1 0 8 0 amappl13 168 26 0 23 1 0 1 1 0 8 0 amappl12 160 13 0 12 1 0 1 1 0 8 0 amappl11 152 43 0 34 1 0 1 1 0 8 0 amappl10 144 135 0 130 1 0 1 1 0 8 0 amappl9 136 324 0 323 1 0 1 1 0 8 0 amappl8 128 336 0 292 2 0 2 2 0 8 0 amappl7 120 106 0 95 1 0 1 1 0 8 0 amappl6 112 26 0 20 1 0 1 1 0 8 0 amappl5 104 443 0 432 1 0 1 1 0 8 0 amappl4 96 423 0 393 1 0 1 1 0 8 0 amappl3 88 114 0 107 1 0 1 1 0 8 0 amappl2 80 2567 0 2511 2 0 2 2 0 8 0 amappl1 72 17898 0 17510 24 15 9 17 0 8 0 amappl 80 891 0 850 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 13 0 6 1 0 1 1 0 8 0 uaddrrnd 24 408 0 395 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 408 0 395 1 0 1 1 0 8 0 vmmpekpl 168 6554 0 6527 2 0 2 2 0 8 0 vmmpepl 168 56637 0 54697 120 30 90 113 0 357 1 vmsppl 272 407 0 395 2 1 1 2 0 8 0 pdppl 4096 822 0 790 6 1 5 6 0 8 0 pvpl 32 179628 0 160929 184 19 165 184 0 265 0 pmappl 200 407 0 395 1 0 1 1 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 258 0 33 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(ffffffff823f8390) 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(fffffd805da784b8,9,fffffd805c5d1400,0,0,ffff80001d71c9d0) at tcp_usrreq+0xa54 sosend(fffffd805da784b8,0,ffff80001d6cdc08,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d71c9d0,4,ffff80001d6cdc08,0,ffff80001d6cdcf0) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d71c9d0,ffff80001d6cdca0,ffff80001d6cdcf0) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d6cdd70) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffdc5c0, 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(ffffffff823f8390) 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(fffffd805da784b8,9,fffffd805c5d1400,0,0,ffff80001d71c9d0) at tcp_usrreq+0xa54 sosend(fffffd805da784b8,0,ffff80001d6cdc08,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d71c9d0,4,ffff80001d6cdc08,0,ffff80001d6cdcf0) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d71c9d0,ffff80001d6cdca0,ffff80001d6cdcf0) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d6cdd70) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffdc5c0, count: -9