panic: tcp_output: template len != hdrlen - optlen Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *337052 36349 0 0x2 0x4000000 0 syz-fuzzer db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff823ee3a9) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac1880) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac1880) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da6a968,9,fffffd8053d7fc00,0,0,ffff80001d717760) at tcp_usrreq+0xa54 sosend(fffffd805da6a968,0,ffff80001d73a8f8,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d717760,3,ffff80001d73a8f8,0,ffff80001d73a9e0) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d717760,ffff80001d73a990,ffff80001d73a9e0) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d73aa60) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc00015f3c8, 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(ffffffff823ee3a9) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac1880) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac1880) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da6a968,9,fffffd8053d7fc00,0,0,ffff80001d717760) at tcp_usrreq+0xa54 sosend(fffffd805da6a968,0,ffff80001d73a8f8,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d717760,3,ffff80001d73a8f8,0,ffff80001d73a9e0) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d717760,ffff80001d73a990,ffff80001d73a9e0) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d73aa60) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc00015f3c8, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001d73a460 rbx 0xffff80001d73a510 rdx 0x2 rcx 0 rax 0x1 r8 0xffffffff81664bbf kprintf+0x15f r9 0x1 r10 0x2 r11 0xbc6c047a5f60025c r12 0x3000000008 r13 0xffff80001d73a470 r14 0x100 r15 0x1 rip 0xffffffff816c65b8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001d73a450 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-fuzzer) pid=337052 stat=onproc flags process=2 proc=4000000 pri=32, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff80001d717280,0xffff80001d718130 process=0xffff8000ffff83b0 user=0xffff80001d735000, vmspace=0xfffffd806bc09dd0 estcpu=0, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 84748 315693 55930 0 2 0 syz-executor.0 84748 141760 55930 0 2 0x4000000 syz-executor.0 75333 208670 25017 0 2 0 syz-executor.1 75333 109649 25017 0 3 0x4000080 msgwait syz-executor.1 36513 340699 0 0 3 0x14200 bored sosplice 25017 298552 36349 0 3 0x82 nanosleep syz-executor.1 55930 386352 36349 0 3 0x82 nanosleep syz-executor.0 36349 274264 7961 0 3 0x82 thrsleep syz-fuzzer 36349 115872 7961 0 3 0x4000082 nanosleep syz-fuzzer *36349 337052 7961 0 7 0x4000002 syz-fuzzer 36349 135771 7961 0 3 0x4000082 thrsleep syz-fuzzer 36349 282196 7961 0 2 0x4000002 syz-fuzzer 36349 15268 7961 0 3 0x4000082 kqread syz-fuzzer 36349 441136 7961 0 3 0x4000082 thrsleep syz-fuzzer 36349 162433 7961 0 3 0x4000082 thrsleep syz-fuzzer 7961 472221 9576 0 3 0x10008a pause ksh 9576 212396 61089 0 3 0x92 select sshd 93207 120595 1 0 3 0x100083 ttyin getty 61089 299793 1 0 3 0x80 select sshd 74814 34497 42674 73 3 0x100090 kqread syslogd 42674 284599 1 0 3 0x100082 netio syslogd 7052 17797 1 77 3 0x100090 poll dhclient 59996 492028 1 0 3 0x80 poll dhclient 25411 272242 0 0 3 0x14200 bored smr 72243 129476 0 0 2 0x14200 zerothread 23593 500696 0 0 3 0x14200 aiodoned aiodoned 66119 106913 0 0 3 0x14200 syncer update 2203 514485 0 0 3 0x14200 cleaner cleaner 30567 445420 0 0 3 0x14200 reaper reaper 57333 260486 0 0 3 0x14200 pgdaemon pagedaemon 2587 66066 0 0 3 0x14200 bored crynlk 40570 220195 0 0 3 0x14200 bored crypto 47688 443272 0 0 3 0x40014200 acpi0 acpi0 89492 338602 0 0 3 0x14200 bored softnet 58240 439099 0 0 3 0x14200 bored systqmp 20148 18091 0 0 3 0x14200 bored systq 60066 511976 0 0 3 0x40014200 bored softclock 75130 168285 0 0 3 0x40014200 idle0 1 102749 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 9499 6342K 6716K 78643K 10944 0 pcb 13 8K 8K 78643K 56 0 rtable 92 4K 7K 78643K 470 0 ifaddr 64 12K 13K 78643K 100 0 sysctl 2 0K 0K 78643K 2 0 counters 20 16K 16K 78643K 22 0 ioctlops 0 0K 4K 78643K 47 0 iov 0 0K 16K 78643K 36 0 mount 1 1K 1K 78643K 1 0 vnodes 1216 76K 77K 78643K 1355 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 3 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 0K 78643K 58 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 195K 288K 78643K 12938 0 file desc 6 17K 25K 78643K 262 0 sigio 0 0K 0K 78643K 4 0 proc 49 38K 54K 78643K 381 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 118 0 in_multi 29 1K 2K 78643K 65 0 ether_multi 1 0K 0K 78643K 11 0 mrt 0 0K 0K 78643K 1 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 207 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 132 39K 39K 78643K 1454 0 UVM aobj 10 2K 2K 78643K 10 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 52 0 NDP 11 0K 0K 78643K 18 0 temp 95 3852K 3928K 78643K 9244 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 6 0 2 1 0 1 1 0 8 0 rtpcb 80 269 0 267 1 0 1 1 0 8 0 rtentry 112 45 0 12 2 0 2 2 0 8 0 unpcb 120 201 0 191 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 307 0 307 1 1 0 1 0 8 0 tcpcb 544 110 0 106 1 0 1 1 0 8 0 ipq 40 1 0 1 1 0 1 1 0 8 1 ipqe 40 45 0 45 1 0 1 1 0 8 1 inpcb 296 450 0 443 3 1 2 2 0 8 1 nd6 48 6 0 3 1 0 1 1 0 8 0 ppxss 1128 1 0 1 1 1 0 1 0 8 0 pfstscr 40 1 0 0 1 0 1 1 0 8 0 pfrktable 1344 19 0 17 1 0 1 1 0 8 0 pftag 88 4 0 4 1 0 1 1 0 8 1 pfstitem 24 2 0 0 1 0 1 1 0 8 0 pfstkey 112 2 0 0 1 0 1 1 0 8 0 pfstate 328 1 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 188 0 44 12 1 11 12 0 8 0 art_table 32 189 0 44 2 0 2 2 0 8 0 art_node 16 44 0 14 1 0 1 1 0 8 0 sysvmsgpl 40 7 0 6 2 1 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 54 0 44 1 0 1 1 0 8 0 shmpl 112 8 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1734 0 340 88 0 88 88 0 8 0 ffsino 240 1734 0 340 83 0 83 83 0 8 0 nchpl 144 2277 0 674 60 0 60 60 0 8 0 uvmvnodes 72 1874 0 0 35 0 35 35 0 8 0 vnodes 208 1874 0 0 99 0 99 99 0 8 0 namei 1024 6014 0 6014 1 0 1 1 0 8 1 vcpupl 1984 4 0 0 1 0 1 1 0 8 0 vmpool 528 4 0 0 1 0 1 1 0 8 0 pfiaddrpl 120 6 0 4 1 0 1 1 0 8 0 scxspl 192 6689 0 6689 1 0 1 1 0 8 1 plimitpl 152 37 0 30 1 0 1 1 0 8 0 sigapl 424 451 0 421 4 0 4 4 0 8 0 futexpl 56 5334 0 5334 1 0 1 1 0 8 1 knotepl 112 79 0 60 1 0 1 1 0 8 0 kqueuepl 144 58 0 54 1 0 1 1 0 8 0 pipelkpl 16 118 0 108 1 0 1 1 0 8 0 pipepl 120 236 0 217 2 0 2 2 0 8 1 fdescpl 432 434 0 419 2 0 2 2 0 8 0 filepl 120 2867 0 2772 4 0 4 4 0 8 1 lockfpl 104 49 0 48 1 0 1 1 0 8 0 lockfspl 48 18 0 17 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 330 0 323 1 0 1 1 0 8 0 zombiepl 144 421 0 421 1 0 1 1 0 8 1 processpl 920 451 0 421 4 0 4 4 0 8 0 procpl 624 752 0 713 4 0 4 4 0 8 1 sosppl 128 10 0 10 2 1 1 1 0 8 1 sockpl 400 921 0 902 4 0 4 4 0 8 1 mcl64k 65536 26 0 26 2 1 1 1 0 8 1 mcl16k 16384 2 0 2 2 1 1 1 0 8 1 mcl12k 12288 9 0 9 2 1 1 1 0 8 1 mcl9k 9216 4 0 4 1 1 0 1 0 8 0 mcl8k 8192 7 0 7 2 1 1 1 0 8 1 mcl4k 4096 24 0 24 3 2 1 1 0 8 1 mcl2k2 2112 2 0 2 2 2 0 1 0 8 0 mcl2k 2048 77259 0 77205 19 11 8 17 0 8 0 mtagpl 96 15 0 3 2 1 1 1 0 8 0 mbufpl 256 126197 0 125968 31 7 24 24 0 8 7 bufpl 280 3846 0 126 266 0 266 266 0 8 0 anonpl 16 55949 0 39609 81 10 71 79 0 107 5 amapchunkpl 152 1708 0 1578 7 1 6 7 0 158 0 amappl16 192 2141 0 1205 57 8 49 57 0 8 2 amappl15 184 114 0 111 1 0 1 1 0 8 0 amappl14 176 21 0 18 1 0 1 1 0 8 0 amappl13 168 26 0 23 1 0 1 1 0 8 0 amappl12 160 13 0 9 1 0 1 1 0 8 0 amappl11 152 159 0 148 1 0 1 1 0 8 0 amappl10 144 130 0 122 1 0 1 1 0 8 0 amappl9 136 371 0 370 1 0 1 1 0 8 0 amappl8 128 327 0 285 2 0 2 2 0 8 0 amappl7 120 107 0 95 1 0 1 1 0 8 0 amappl6 112 139 0 130 1 0 1 1 0 8 0 amappl5 104 259 0 249 1 0 1 1 0 8 0 amappl4 96 535 0 505 1 0 1 1 0 8 0 amappl3 88 114 0 108 1 0 1 1 0 8 0 amappl2 80 2648 0 2576 2 0 2 2 0 8 0 amappl1 72 17494 0 17077 25 16 9 17 0 8 0 amappl 80 967 0 925 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 9 0 0 1 0 1 1 0 8 0 uaddrrnd 24 438 0 419 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 438 0 419 1 0 1 1 0 8 0 vmmpekpl 168 6868 0 6839 2 0 2 2 0 8 0 vmmpepl 168 58308 0 56163 123 26 97 115 0 357 3 vmsppl 272 437 0 419 3 1 2 2 0 8 0 pdppl 4096 882 0 842 7 1 6 6 0 8 0 pvpl 32 174234 0 155378 188 8 180 188 0 265 27 pmappl 200 437 0 419 1 0 1 1 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 269 0 28 8 0 8 8 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(ffffffff823ee3a9) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac1880) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac1880) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da6a968,9,fffffd8053d7fc00,0,0,ffff80001d717760) at tcp_usrreq+0xa54 sosend(fffffd805da6a968,0,ffff80001d73a8f8,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d717760,3,ffff80001d73a8f8,0,ffff80001d73a9e0) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d717760,ffff80001d73a990,ffff80001d73a9e0) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d73aa60) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc00015f3c8, 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(ffffffff823ee3a9) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac1880) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac1880) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da6a968,9,fffffd8053d7fc00,0,0,ffff80001d717760) at tcp_usrreq+0xa54 sosend(fffffd805da6a968,0,ffff80001d73a8f8,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d717760,3,ffff80001d73a8f8,0,ffff80001d73a9e0) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d717760,ffff80001d73a990,ffff80001d73a9e0) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d73aa60) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc00015f3c8, count: -9