panic: tcp_output: template len != hdrlen - optlen Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *102973 53296 0 0x2 0x4000000 0 syz-fuzzer db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff823f5805) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac2100) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac2100) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da70648,9,fffffd805a09f400,0,0,ffff80001d718ae0) at tcp_usrreq+0xa54 sosend(fffffd805da70648,0,ffff80001d761e88,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d718ae0,3,ffff80001d761e88,0,ffff80001d761f70) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d718ae0,ffff80001d761f20,ffff80001d761f70) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d761ff0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc0001613c8, 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(ffffffff823f5805) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac2100) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac2100) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da70648,9,fffffd805a09f400,0,0,ffff80001d718ae0) at tcp_usrreq+0xa54 sosend(fffffd805da70648,0,ffff80001d761e88,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d718ae0,3,ffff80001d761e88,0,ffff80001d761f70) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d718ae0,ffff80001d761f20,ffff80001d761f70) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d761ff0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc0001613c8, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001d7619f0 rbx 0xffff80001d761aa0 rdx 0x2 rcx 0 rax 0x1 r8 0xffffffff8229301f kprintf+0x15f r9 0x1 r10 0x2 r11 0xd82ac2d76ebc6053 r12 0x3000000008 r13 0xffff80001d761a00 r14 0x100 r15 0x1 rip 0xffffffff81f7d738 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001d7619e0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-fuzzer) pid=102973 stat=onproc flags process=2 proc=4000000 pri=32, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff80001d718120,0xffff80001d6a9eb8 process=0xffff8000ffff8748 user=0xffff80001d75d000, vmspace=0xfffffd806bc0a000 estcpu=0, cpticks=0, pctcpu=0.5 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 70891 356842 0 0 3 0x14200 acct acct 2761 183189 0 0 3 0x14200 bored sosplice 52921 486508 53296 0 3 0x82 piperd syz-executor.0 52185 280258 53296 0 2 0x2 syz-executor.1 53296 288691 60600 0 3 0x82 thrsleep syz-fuzzer 53296 354084 60600 0 2 0x4000002 syz-fuzzer 53296 44996 60600 0 2 0x4000002 syz-fuzzer 53296 272249 60600 0 3 0x4000082 thrsleep syz-fuzzer 53296 324626 60600 0 2 0x4000002 syz-fuzzer *53296 102973 60600 0 7 0x4000002 syz-fuzzer 53296 301392 60600 0 3 0x4000082 thrsleep syz-fuzzer 53296 256903 60600 0 3 0x4000082 thrsleep syz-fuzzer 60600 496504 28181 0 3 0x10008a pause ksh 28181 80743 38563 0 3 0x92 select sshd 70498 161874 1 0 3 0x100083 ttyin getty 38563 108480 1 0 3 0x80 select sshd 86382 394376 10762 73 3 0x100090 kqread syslogd 10762 173115 1 0 3 0x100082 netio syslogd 38081 310331 1 77 3 0x100090 poll dhclient 99769 392267 1 0 3 0x80 poll dhclient 37007 195904 0 0 3 0x14200 bored smr 83227 453850 0 0 3 0x14200 pgzero zerothread 95448 170288 0 0 3 0x14200 aiodoned aiodoned 66298 336188 0 0 3 0x14200 syncer update 25333 188555 0 0 3 0x14200 cleaner cleaner 54759 203903 0 0 3 0x14200 reaper reaper 16500 252491 0 0 3 0x14200 pgdaemon pagedaemon 27614 184418 0 0 3 0x14200 bored crynlk 6067 98875 0 0 3 0x14200 bored crypto 12850 386662 0 0 3 0x40014200 acpi0 acpi0 55542 418738 0 0 3 0x14200 bored softnet 61760 427148 0 0 3 0x14200 bored systqmp 51545 468158 0 0 3 0x14200 bored systq 98376 186309 0 0 3 0x40014200 bored softclock 49416 411276 0 0 3 0x40014200 idle0 1 278482 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 9483 6344K 6776K 78643K 10850 0 pcb 13 8K 8K 78643K 53 0 rtable 106 4K 5K 78643K 325 0 ifaddr 63 13K 13K 78643K 100 0 counters 21 16K 16K 78643K 27 0 ioctlops 0 0K 4K 78643K 263 0 iov 0 0K 16K 78643K 40 0 mount 1 1K 1K 78643K 1 0 vnodes 1216 76K 77K 78643K 1319 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 1K 78643K 34 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 195K 288K 78643K 12938 0 file desc 4 9K 25K 78643K 340 0 proc 49 38K 54K 78643K 379 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 18 0 in_multi 40 2K 2K 78643K 71 0 ether_multi 1 0K 0K 78643K 7 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 187 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 134 39K 40K 78643K 1809 0 UVM aobj 4 2K 2K 78643K 4 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 38 0 NDP 9 0K 0K 78643K 20 0 temp 101 3855K 3919K 78643K 21401 0 kqueue 3 4K 12K 78643K 12 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 6 0 0 1 0 1 1 0 8 0 rtpcb 80 53 0 51 1 0 1 1 0 8 0 rtentry 112 49 0 8 2 0 2 2 0 8 0 unpcb 120 115 0 107 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 283 0 283 1 1 0 1 0 8 0 tcpcb 544 70 0 66 1 0 1 1 0 8 0 ipq 40 3 0 2 1 0 1 1 0 8 0 ipqe 40 5 0 4 1 0 1 1 0 8 0 inpcb 296 239 0 232 2 0 2 2 0 8 1 nd6 48 7 0 3 1 0 1 1 0 8 0 ppxss 1128 1 0 1 1 1 0 1 0 8 0 pfstscr 40 40 0 40 1 0 1 1 0 8 1 pfrktable 1344 15 0 13 2 1 1 1 0 8 0 pftag 88 2 0 0 1 0 1 1 0 8 0 pfqueue 264 2 0 2 1 0 1 1 0 8 1 pfstkey 112 82 0 82 1 0 1 1 0 8 1 pfstate 328 41 0 41 1 0 1 1 0 8 1 pfrule 1360 14 0 4 2 1 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 212 0 40 13 0 13 13 0 8 0 art_table 32 213 0 40 2 0 2 2 0 8 0 art_node 16 48 0 10 1 0 1 1 0 8 0 sysvmsgpl 40 18 0 2 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 30 0 20 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 1941 0 543 88 0 88 88 0 8 0 ffsino 240 1941 0 543 83 0 83 83 0 8 0 nchpl 144 2688 0 1084 60 0 60 60 0 8 0 uvmvnodes 72 2043 0 0 38 0 38 38 0 8 0 vnodes 208 2043 0 0 108 0 108 108 0 8 0 namei 1024 6984 0 6984 1 0 1 1 0 8 1 vcpupl 1984 1 0 0 1 0 1 1 0 8 0 vmpool 528 1 0 0 1 0 1 1 0 8 0 pfiaddrpl 120 6 0 4 2 1 1 1 0 8 0 scxspl 192 7925 0 7925 1 0 1 1 0 8 1 plimitpl 152 25 0 18 1 0 1 1 0 8 0 sigapl 424 528 0 499 4 0 4 4 0 8 0 futexpl 56 6100 0 6100 1 0 1 1 0 8 1 knotepl 112 71 0 52 1 0 1 1 0 8 0 kqueuepl 144 168 0 166 1 0 1 1 0 8 0 pipepl 272 84 0 74 1 0 1 1 0 8 0 fdescpl 432 512 0 499 2 0 2 2 0 8 0 filepl 120 2766 0 2671 4 0 4 4 0 8 1 lockfpl 104 67 0 66 1 0 1 1 0 8 0 lockfspl 48 25 0 24 1 0 1 1 0 8 0 sessionpl 112 17 0 7 1 0 1 1 0 8 0 pgrppl 48 19 0 9 1 0 1 1 0 8 0 ucredpl 96 212 0 205 1 0 1 1 0 8 0 zombiepl 144 499 0 499 1 0 1 1 0 8 1 processpl 920 528 0 499 4 0 4 4 0 8 0 procpl 624 923 0 887 4 0 4 4 0 8 1 sosppl 128 3 0 3 1 0 1 1 0 8 1 sockpl 400 407 0 390 4 1 3 4 0 8 1 mcl64k 65536 12 0 12 1 0 1 1 0 8 1 mcl12k 12288 4 0 4 2 1 1 1 0 8 1 mcl9k 9216 1 0 1 1 0 1 1 0 8 1 mcl8k 8192 3 0 3 2 1 1 1 0 8 1 mcl4k 4096 32 0 32 2 1 1 1 0 8 1 mcl2k2 2112 2 0 2 2 1 1 1 0 8 1 mcl2k 2048 72380 0 72317 23 14 9 19 0 8 0 mtagpl 96 36 0 4 2 1 1 1 0 8 0 mbufpl 256 116609 0 116398 17 3 14 14 0 8 0 bufpl 280 4052 0 128 281 0 281 281 0 8 0 anonpl 16 60633 0 44120 81 14 67 79 0 107 0 amapchunkpl 152 2061 0 1917 8 1 7 8 0 158 0 amappl16 192 2709 0 1820 56 10 46 56 0 8 1 amappl15 184 1 0 0 1 0 1 1 0 8 0 amappl14 176 24 0 19 1 0 1 1 0 8 0 amappl13 168 198 0 194 1 0 1 1 0 8 0 amappl12 160 12 0 8 1 0 1 1 0 8 0 amappl11 152 47 0 37 1 0 1 1 0 8 0 amappl10 144 19 0 15 1 0 1 1 0 8 0 amappl9 136 368 0 367 1 0 1 1 0 8 0 amappl8 128 332 0 286 2 0 2 2 0 8 0 amappl7 120 114 0 101 1 0 1 1 0 8 0 amappl6 112 22 0 18 1 0 1 1 0 8 0 amappl5 104 459 0 449 1 0 1 1 0 8 0 amappl4 96 704 0 677 1 0 1 1 0 8 0 amappl3 88 220 0 213 1 0 1 1 0 8 0 amappl2 80 3279 0 3220 2 0 2 2 0 8 0 amappl1 72 18127 0 17734 23 14 9 17 0 8 0 amappl 80 1146 0 1103 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 3 0 0 1 0 1 1 0 8 0 uaddrrnd 24 513 0 499 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 513 0 499 1 0 1 1 0 8 0 vmmpekpl 168 7130 0 7102 2 0 2 2 0 8 0 vmmpepl 168 66939 0 65062 120 22 98 114 0 357 10 vmsppl 272 512 0 499 3 1 2 2 0 8 1 pdppl 4096 1032 0 999 6 1 5 6 0 8 0 pvpl 32 192470 0 173055 187 14 173 187 0 265 14 pmappl 200 512 0 499 1 0 1 1 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 257 0 25 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(ffffffff823f5805) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac2100) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac2100) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da70648,9,fffffd805a09f400,0,0,ffff80001d718ae0) at tcp_usrreq+0xa54 sosend(fffffd805da70648,0,ffff80001d761e88,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d718ae0,3,ffff80001d761e88,0,ffff80001d761f70) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d718ae0,ffff80001d761f20,ffff80001d761f70) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d761ff0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc0001613c8, 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(ffffffff823f5805) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac2100) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac2100) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da70648,9,fffffd805a09f400,0,0,ffff80001d718ae0) at tcp_usrreq+0xa54 sosend(fffffd805da70648,0,ffff80001d761e88,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d718ae0,3,ffff80001d761e88,0,ffff80001d761f70) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d718ae0,ffff80001d761f20,ffff80001d761f70) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d761ff0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc0001613c8, count: -9