panic: tcp_output: template len != hdrlen - optlen Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *277586 90663 0 0x12 0 0 sshd db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff823ee815) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac2320) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac2320) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da77328,9,fffffd805fe4d700,0,0,ffff80001d717760) at tcp_usrreq+0xa54 sosend(fffffd805da77328,0,ffff80001d71e378,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d717760,4,ffff80001d71e378,0,ffff80001d71e460) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d717760,ffff80001d71e410,ffff80001d71e460) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d71e4e0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffd0b10, 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(ffffffff823ee815) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac2320) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac2320) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da77328,9,fffffd805fe4d700,0,0,ffff80001d717760) at tcp_usrreq+0xa54 sosend(fffffd805da77328,0,ffff80001d71e378,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d717760,4,ffff80001d71e378,0,ffff80001d71e460) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d717760,ffff80001d71e410,ffff80001d71e460) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d71e4e0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffd0b10, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001d71dee0 rbx 0xffff80001d71df90 rdx 0x2 rcx 0 rax 0x1 r8 0xffffffff819dd21f kprintf+0x15f r9 0x1 r10 0x2 r11 0x3f1b124b1a3e1675 r12 0x3000000008 r13 0xffff80001d71def0 r14 0x100 r15 0x1 rip 0xffffffff820d2da8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001d71ded0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (sshd) pid=277586 stat=onproc flags process=12 proc=0 pri=24, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff80001d717eb0,0xffff80001d717290 process=0xffff8000ffff8e78 user=0xffff80001d719000, vmspace=0xfffffd806bc09990 estcpu=0, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 56339 348725 25820 0 2 0 syz-executor.0 56339 377588 25820 0 2 0x4000000 syz-executor.0 65018 326156 55407 0 2 0x2 syz-executor.1 25820 314740 55407 0 3 0x82 nanosleep syz-executor.0 62562 113301 0 0 3 0x14200 bored sosplice 55407 404856 96097 0 3 0x82 thrsleep syz-fuzzer 55407 140918 96097 0 2 0x4000002 syz-fuzzer 55407 281321 96097 0 3 0x4000082 thrsleep syz-fuzzer 55407 348990 96097 0 3 0x4000082 thrsleep syz-fuzzer 55407 321597 96097 0 3 0x4000082 thrsleep syz-fuzzer 55407 515203 96097 0 2 0x4000002 syz-fuzzer 55407 196909 96097 0 3 0x4000082 thrsleep syz-fuzzer 55407 467173 96097 0 3 0x4000082 thrsleep syz-fuzzer 96097 73224 90663 0 3 0x10008a pause ksh *90663 277586 19049 0 7 0x12 sshd 36098 113385 1 0 3 0x100083 ttyin getty 19049 194800 1 0 3 0x80 select sshd 87051 363464 32219 73 3 0x100090 kqread syslogd 32219 493252 1 0 3 0x100082 netio syslogd 58790 416157 1 77 3 0x100090 poll dhclient 60067 375600 1 0 3 0x80 poll dhclient 30994 475379 0 0 3 0x14200 bored smr 88323 22930 0 0 2 0x14200 zerothread 96670 18335 0 0 3 0x14200 aiodoned aiodoned 29593 12540 0 0 3 0x14200 syncer update 19173 205058 0 0 3 0x14200 cleaner cleaner 1072 266572 0 0 3 0x14200 reaper reaper 97600 128955 0 0 3 0x14200 pgdaemon pagedaemon 85919 282510 0 0 3 0x14200 bored crynlk 49277 7745 0 0 3 0x14200 bored crypto 76484 67340 0 0 3 0x40014200 acpi0 acpi0 20875 474372 0 0 3 0x14200 bored softnet 20974 436253 0 0 3 0x14200 bored systqmp 35631 475600 0 0 3 0x14200 bored systq 50721 443444 0 0 3 0x40014200 bored softclock 83411 406773 0 0 3 0x40014200 idle0 1 84561 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 9492 6341K 6661K 78643K 10772 0 pcb 13 8K 8K 78643K 39 0 rtable 91 7K 8K 78643K 371 0 ifaddr 68 13K 14K 78643K 100 0 counters 21 16K 16K 78643K 24 0 ioctlops 0 0K 4K 78643K 43 0 iov 0 0K 16K 78643K 34 0 mount 1 1K 1K 78643K 1 0 vnodes 1214 76K 77K 78643K 1331 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 6 0 VM map 2 0K 0K 78643K 2 0 sem 12 1K 1K 78643K 24 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 195K 288K 78643K 12938 0 file desc 5 13K 25K 78643K 198 0 sigio 0 0K 0K 78643K 2 0 proc 50 38K 55K 78643K 463 0 subproc 32 2K 2K 78643K 68 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 10 0 in_multi 25 1K 2K 78643K 66 0 ether_multi 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 225 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 23K 43K 78643K 1347 0 UVM aobj 12 2K 2K 78643K 12 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 6 0 NDP 12 0K 0K 78643K 23 0 temp 101 3859K 3923K 78643K 8023 0 kqueue 3 4K 14K 78643K 24 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 12 0 8 1 0 1 1 0 8 0 rtpcb 80 25 0 23 1 0 1 1 0 8 0 rtentry 112 77 0 49 2 0 2 2 0 8 1 unpcb 120 97 0 87 1 0 1 1 0 8 0 syncache 264 6 0 6 2 2 0 1 0 8 0 tcpqe 32 335 0 335 2 2 0 1 0 8 0 tcpcb 544 38 0 34 1 0 1 1 0 8 0 ipq 40 2 0 2 1 0 1 1 0 8 1 ipqe 40 6 0 6 1 0 1 1 0 8 1 inpcb 296 146 0 139 3 1 2 2 0 8 1 nd6 48 13 0 9 1 0 1 1 0 8 0 pfrke_plain 160 2 0 2 1 0 1 1 0 8 1 pfrktable 1344 17 0 10 1 0 1 1 0 8 0 pftag 88 2 0 0 1 0 1 1 0 8 0 pfrule 1360 12 0 6 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 330 0 183 12 0 12 12 0 8 2 art_table 32 331 0 183 2 0 2 2 0 8 0 art_node 16 76 0 53 1 0 1 1 0 8 0 sysvmsgpl 40 10 0 5 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 14 0 4 1 0 1 1 0 8 0 shmpl 112 10 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1625 0 230 88 0 88 88 0 8 0 ffsino 240 1625 0 230 83 0 83 83 0 8 0 nchpl 144 2111 0 520 60 0 60 60 0 8 0 rtmask 32 4 0 4 1 0 1 1 0 8 1 uvmvnodes 72 1742 0 0 32 0 32 32 0 8 0 vnodes 208 1742 0 0 92 0 92 92 0 8 0 namei 1024 5861 0 5861 2 1 1 1 0 8 1 vmpool 528 1 0 1 1 1 0 1 0 8 0 pfiaddrpl 120 6 0 0 1 0 1 1 0 8 0 scxspl 192 10420 0 10420 1 0 1 1 0 8 1 plimitpl 152 22 0 15 1 0 1 1 0 8 0 sigapl 424 379 0 350 4 0 4 4 0 8 0 futexpl 56 2830 0 2830 2 1 1 1 0 8 1 knotepl 112 117 0 98 1 0 1 1 0 8 0 kqueuepl 144 38 0 36 1 0 1 1 0 8 0 pipepl 272 94 0 84 1 0 1 1 0 8 0 fdescpl 432 364 0 350 2 0 2 2 0 8 0 filepl 120 2169 0 2074 5 1 4 4 0 8 1 lockfpl 104 413 0 412 1 0 1 1 0 8 0 lockfspl 48 106 0 105 1 0 1 1 0 8 0 sessionpl 112 19 0 9 1 0 1 1 0 8 0 pgrppl 48 21 0 11 1 0 1 1 0 8 0 ucredpl 96 396 0 389 1 0 1 1 0 8 0 zombiepl 144 350 0 350 1 0 1 1 0 8 1 processpl 920 379 0 350 4 0 4 4 0 8 0 procpl 624 562 0 525 4 0 4 4 0 8 1 sosppl 128 3 0 3 2 1 1 1 0 8 1 sockpl 400 268 0 249 5 2 3 4 0 8 0 mcl64k 65536 10 0 10 3 2 1 1 0 8 1 mcl12k 12288 7 0 7 1 1 0 1 0 8 0 mcl9k 9216 1 0 1 1 1 0 1 0 8 0 mcl8k 8192 6 0 5 2 1 1 1 0 8 0 mcl4k 4096 17 0 17 3 2 1 1 0 8 1 mcl2k2 2112 1 0 1 1 0 1 1 0 8 1 mcl2k 2048 77908 0 77843 23 14 9 19 0 8 0 mtagpl 96 15 0 11 2 1 1 1 0 8 0 mbufpl 256 124561 0 124412 17 5 12 12 0 8 1 bufpl 280 4973 0 126 347 0 347 347 0 8 0 anonpl 16 62650 0 47626 83 2 81 81 0 107 15 amapchunkpl 152 2368 0 2244 19 3 16 19 0 158 10 amappl16 192 2057 0 1204 67 15 52 55 0 8 8 amappl15 184 1 0 0 1 0 1 1 0 8 0 amappl14 176 58 0 52 1 0 1 1 0 8 0 amappl13 168 82 0 78 1 0 1 1 0 8 0 amappl12 160 50 0 49 1 0 1 1 0 8 0 amappl11 152 83 0 72 1 0 1 1 0 8 0 amappl10 144 11 0 7 1 0 1 1 0 8 0 amappl9 136 398 0 397 1 0 1 1 0 8 0 amappl8 128 391 0 348 2 0 2 2 0 8 0 amappl7 120 129 0 115 1 0 1 1 0 8 0 amappl6 112 23 0 18 1 0 1 1 0 8 0 amappl5 104 246 0 235 1 0 1 1 0 8 0 amappl4 96 516 0 489 1 0 1 1 0 8 0 amappl3 88 179 0 171 1 0 1 1 0 8 0 amappl2 80 1930 0 1864 2 0 2 2 0 8 0 amappl1 72 16572 0 16163 24 15 9 17 0 8 0 amappl 80 811 0 773 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 11 0 0 1 0 1 1 0 8 0 uaddrrnd 24 365 0 351 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 365 0 351 1 0 1 1 0 8 0 vmmpekpl 168 6543 0 6515 2 0 2 2 0 8 0 vmmpepl 168 52098 0 50172 139 22 117 117 0 357 32 vmsppl 272 364 0 351 3 1 2 2 0 8 1 pdppl 4096 736 0 702 6 1 5 6 0 8 0 pvpl 32 217252 0 199195 300 21 279 299 0 265 125 pmappl 200 364 0 351 1 0 1 1 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 260 0 31 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(ffffffff823ee815) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac2320) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac2320) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da77328,9,fffffd805fe4d700,0,0,ffff80001d717760) at tcp_usrreq+0xa54 sosend(fffffd805da77328,0,ffff80001d71e378,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d717760,4,ffff80001d71e378,0,ffff80001d71e460) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d717760,ffff80001d71e410,ffff80001d71e460) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d71e4e0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffd0b10, 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(ffffffff823ee815) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac2320) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac2320) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da77328,9,fffffd805fe4d700,0,0,ffff80001d717760) at tcp_usrreq+0xa54 sosend(fffffd805da77328,0,ffff80001d71e378,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d717760,4,ffff80001d71e378,0,ffff80001d71e460) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d717760,ffff80001d71e410,ffff80001d71e460) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d71e4e0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffd0b10, count: -9