panic: tcp_output: template len != hdrlen - optlen Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *136498 89716 0 0x12 0 0 sshd db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff823ff6ee) at panic+0x164 sys/kern/subr_prf.c:218 tcp_output(ffff800000ac54d0) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac54d0) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da68648,9,fffffd806bc18200,0,0,ffff80001d702288) at tcp_usrreq+0xa54 sosend(fffffd805da68648,0,ffff80001d6c9ca8,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d702288,4,ffff80001d6c9ca8,0,ffff80001d6c9d90) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d702288,ffff80001d6c9d40,ffff80001d6c9d90) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d6c9e10) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe02d0, 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(ffffffff823ff6ee) at panic+0x164 sys/kern/subr_prf.c:218 tcp_output(ffff800000ac54d0) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac54d0) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da68648,9,fffffd806bc18200,0,0,ffff80001d702288) at tcp_usrreq+0xa54 sosend(fffffd805da68648,0,ffff80001d6c9ca8,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d702288,4,ffff80001d6c9ca8,0,ffff80001d6c9d90) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d702288,ffff80001d6c9d40,ffff80001d6c9d90) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d6c9e10) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe02d0, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001d6c9810 rbx 0xffff80001d6c98c0 rdx 0x8b rcx 0x2 rax 0x1 r8 0xffff80001d6c97d0 r9 0xffffffff815b7cff kprintf+0x15f r10 0x1 r11 0x5d0445dbd2c073e1 r12 0x3000000008 r13 0xffff80001d6c9820 r14 0x100 r15 0x1 rip 0xffffffff82254f08 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001d6c9800 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (sshd) pid=136498 stat=onproc flags process=12 proc=0 pri=24, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff80001d702ee0,0xffff80001d702020 process=0xffff80001d704b28 user=0xffff80001d6c4000, vmspace=0xfffffd806bc0acc0 estcpu=0, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 75318 227758 13269 0 3 0x80 nanosleep syz-executor.1 75318 13973 13269 0 3 0x4000080 netio syz-executor.1 75318 10457 13269 0 3 0x4000080 fsleep syz-executor.1 13269 216183 34330 0 3 0x82 nanosleep syz-executor.1 21235 260456 0 0 3 0x14200 bored sosplice 47912 288263 34330 0 2 0x2 syz-executor.0 34330 359331 48371 0 3 0x82 thrsleep syz-fuzzer 34330 234762 48371 0 2 0x4000002 syz-fuzzer 34330 285455 48371 0 3 0x4000082 thrsleep syz-fuzzer 34330 23267 48371 0 3 0x4000082 thrsleep syz-fuzzer 34330 20088 48371 0 3 0x4000082 thrsleep syz-fuzzer 34330 312236 48371 0 2 0x4000002 syz-fuzzer 48371 57030 89716 0 3 0x10008a pause ksh *89716 136498 76910 0 7 0x12 sshd 18297 220565 1 0 3 0x100083 ttyin getty 76910 78162 1 0 3 0x80 select sshd 43070 483665 28148 73 3 0x100090 kqread syslogd 28148 110761 1 0 3 0x100082 netio syslogd 55672 445422 1 77 3 0x100090 poll dhclient 10186 59682 1 0 3 0x80 poll dhclient 52610 416940 0 0 3 0x14200 bored smr 79866 289154 0 0 2 0x14200 zerothread 27346 87955 0 0 3 0x14200 aiodoned aiodoned 2475 457444 0 0 3 0x14200 syncer update 33490 243760 0 0 3 0x14200 cleaner cleaner 37495 68722 0 0 3 0x14200 reaper reaper 60946 1235 0 0 3 0x14200 pgdaemon pagedaemon 69902 168193 0 0 3 0x14200 bored crynlk 62134 63285 0 0 3 0x14200 bored crypto 7831 90078 0 0 3 0x40014200 acpi0 acpi0 54412 60622 0 0 3 0x14200 bored softnet 255 328010 0 0 3 0x14200 bored systqmp 77932 160068 0 0 3 0x14200 bored systq 14291 508419 0 0 3 0x40014200 bored softclock 22833 20661 0 0 3 0x40014200 idle0 1 338224 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 9461 6329K 7105K 78643K 10847 0 pcb 13 8K 8K 78643K 39 0 rtable 110 3K 4K 78643K 240 0 ifaddr 51 11K 12K 78643K 60 0 counters 21 16K 16K 78643K 22 0 ioctlops 0 0K 4K 78643K 32 0 iov 0 0K 2K 78643K 4 0 mount 1 1K 1K 78643K 1 0 vnodes 1221 77K 77K 78643K 1305 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 1K 1K 78643K 20 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 195K 288K 78643K 12938 0 file desc 5 13K 25K 78643K 120 0 proc 48 38K 54K 78643K 404 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 2 0 in_multi 33 2K 2K 78643K 44 0 ether_multi 1 0K 0K 78643K 1 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 31 148K 148K 78643K 31 0 exec 0 0K 1K 78643K 200 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 39K 39K 78643K 1150 0 UVM aobj 8 2K 2K 78643K 8 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 12 0 NDP 9 0K 0K 78643K 14 0 temp 76 3853K 3917K 78643K 2372 0 kqueue 3 4K 8K 78643K 5 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 9 0 2 1 0 1 1 0 8 0 rtpcb 88 23 0 21 1 0 1 1 0 8 0 rtentry 112 57 0 12 2 0 2 2 0 8 0 unpcb 120 53 0 45 1 0 1 1 0 8 0 syncache 272 8 0 8 2 1 1 1 0 8 1 tcpqe 32 80 0 80 2 1 1 1 0 8 1 tcpcb 592 49 0 43 3 0 3 3 0 8 2 inpcb 296 130 0 119 2 0 2 2 0 8 1 nd6 48 9 0 3 1 0 1 1 0 8 0 pfstscr 40 1 0 1 1 0 1 1 0 8 1 pfrktable 1344 1 0 0 1 0 1 1 0 8 0 pfstkey 112 2 0 2 1 0 1 1 0 8 1 pfstate 328 1 0 1 1 0 1 1 0 8 1 pfrule 1360 3 0 1 1 0 1 1 0 8 0 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 56 0 15 1 0 1 1 0 8 0 sysvmsgpl 40 4 0 4 1 0 1 1 0 8 1 semupl 112 2 0 2 1 0 1 1 0 8 1 semapl 112 10 0 0 1 0 1 1 0 8 0 shmpl 112 5 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 112 88 0 88 88 0 8 0 ffsino 240 1507 0 112 83 0 83 83 0 8 0 nchpl 144 1838 0 256 60 0 60 60 0 8 0 uvmvnodes 72 1629 0 0 30 0 30 30 0 8 0 vnodes 208 1629 0 0 86 0 86 86 0 8 0 namei 1024 4714 0 4714 1 0 1 1 0 8 1 vcpupl 1984 2 0 0 1 0 1 1 0 8 0 vmpool 528 2 0 0 1 0 1 1 0 8 0 scxspl 200 5338 0 5338 1 0 1 1 0 8 1 plimitpl 152 17 0 10 1 0 1 1 0 8 0 sigapl 424 304 0 275 4 0 4 4 0 8 0 futexpl 56 1579 0 1578 1 0 1 1 0 8 0 knotepl 112 76 0 56 1 0 1 1 0 8 0 kqueuepl 152 50 0 47 1 0 1 1 0 8 0 pipepl 272 83 0 72 2 0 2 2 0 8 0 fdescpl 432 289 0 275 2 0 2 2 0 8 0 filepl 120 1471 0 1372 4 0 4 4 0 8 0 lockfpl 104 19 0 18 1 0 1 1 0 8 0 lockfspl 48 8 0 7 1 0 1 1 0 8 0 sessionpl 120 18 0 8 1 0 1 1 0 8 0 pgrppl 48 18 0 8 1 0 1 1 0 8 0 ucredpl 96 68 0 61 1 0 1 1 0 8 0 zombiepl 144 275 0 275 1 0 1 1 0 8 1 processpl 944 304 0 275 4 0 4 4 0 8 0 procpl 632 401 0 365 4 0 4 4 0 8 0 sosppl 144 2 0 2 1 0 1 1 0 8 1 sockpl 400 208 0 190 3 0 3 3 0 8 1 mcl64k 65536 5 0 5 1 0 1 1 0 8 1 mcl12k 12288 4 0 4 1 0 1 1 0 8 1 mcl9k 9216 1 0 1 1 0 1 1 0 8 1 mcl8k 8192 3 0 3 1 0 1 1 0 8 1 mcl4k 4096 14 0 14 2 1 1 1 0 8 1 mcl2k2 2112 3 0 3 1 0 1 1 0 8 1 mcl2k 2048 93593 0 93546 17 5 12 14 0 8 5 mtagpl 96 37 0 16 2 1 1 1 0 8 0 mbufpl 256 149526 0 149389 22 3 19 20 0 8 8 bufpl 280 3375 0 116 233 0 233 233 0 8 0 anonpl 16 46090 0 32349 81 1 80 80 0 107 1 amapchunkpl 152 1482 0 1304 8 0 8 8 0 158 0 amappl16 192 1389 0 348 53 0 53 53 0 8 0 amappl15 184 46 0 44 1 0 1 1 0 8 0 amappl14 176 2 0 0 1 0 1 1 0 8 0 amappl13 168 59 0 54 1 0 1 1 0 8 0 amappl12 160 54 0 49 1 0 1 1 0 8 0 amappl11 152 46 0 37 1 0 1 1 0 8 0 amappl10 144 60 0 54 1 0 1 1 0 8 0 amappl9 136 353 0 352 1 0 1 1 0 8 0 amappl8 128 317 0 286 2 0 2 2 0 8 0 amappl7 120 157 0 143 1 0 1 1 0 8 0 amappl6 112 26 0 22 1 0 1 1 0 8 0 amappl5 104 191 0 179 1 0 1 1 0 8 0 amappl4 96 459 0 434 1 0 1 1 0 8 0 amappl3 88 152 0 139 1 0 1 1 0 8 0 amappl2 80 1419 0 1352 2 0 2 2 0 8 0 amappl1 72 15610 0 15183 22 9 13 17 0 8 4 amappl 80 657 0 602 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 7 0 0 1 0 1 1 0 8 0 uaddrrnd 24 291 0 275 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 291 0 275 1 0 1 1 0 8 0 vmmpekpl 168 6071 0 6046 2 0 2 2 0 8 0 vmmpepl 168 43841 0 41683 139 4 135 135 0 357 39 vmsppl 272 290 0 275 2 0 2 2 0 8 1 pdppl 4096 588 0 552 6 0 6 6 0 8 1 pvpl 32 152577 0 135862 188 0 188 188 0 265 3 pmappl 200 290 0 275 1 0 1 1 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 249 0 12 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(ffffffff823ff6ee) at panic+0x164 sys/kern/subr_prf.c:218 tcp_output(ffff800000ac54d0) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac54d0) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da68648,9,fffffd806bc18200,0,0,ffff80001d702288) at tcp_usrreq+0xa54 sosend(fffffd805da68648,0,ffff80001d6c9ca8,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d702288,4,ffff80001d6c9ca8,0,ffff80001d6c9d90) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d702288,ffff80001d6c9d40,ffff80001d6c9d90) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d6c9e10) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe02d0, 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(ffffffff823ff6ee) at panic+0x164 sys/kern/subr_prf.c:218 tcp_output(ffff800000ac54d0) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac54d0) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da68648,9,fffffd806bc18200,0,0,ffff80001d702288) at tcp_usrreq+0xa54 sosend(fffffd805da68648,0,ffff80001d6c9ca8,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d702288,4,ffff80001d6c9ca8,0,ffff80001d6c9d90) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d702288,ffff80001d6c9d40,ffff80001d6c9d90) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d6c9e10) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe02d0, count: -9