panic: tcp_output: template len != hdrlen - optlen Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *325582 79634 0 0x2 0x4000000 0 syz-fuzzer db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff823f0699) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac1cc0) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac1cc0) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da7aaf8,9,fffffd8053bf1e00,0,0,ffff80001d6a94e8) at tcp_usrreq+0xa54 sosend(fffffd805da7aaf8,0,ffff80001d752c98,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d6a94e8,3,ffff80001d752c98,0,ffff80001d752d80) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d6a94e8,ffff80001d752d30,ffff80001d752d80) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d752e00) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc002b8d3c8, 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(ffffffff823f0699) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac1cc0) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac1cc0) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da7aaf8,9,fffffd8053bf1e00,0,0,ffff80001d6a94e8) at tcp_usrreq+0xa54 sosend(fffffd805da7aaf8,0,ffff80001d752c98,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d6a94e8,3,ffff80001d752c98,0,ffff80001d752d80) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d6a94e8,ffff80001d752d30,ffff80001d752d80) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d752e00) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc002b8d3c8, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001d752800 rbx 0xffff80001d7528b0 rdx 0x2 rcx 0 rax 0x1 r8 0xffffffff810651df kprintf+0x15f r9 0x1 r10 0x2 r11 0xaabe6a35ceda97bf r12 0x3000000008 r13 0xffff80001d752810 r14 0x100 r15 0x1 rip 0xffffffff81b999e8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001d7527f0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-fuzzer) pid=325582 stat=onproc flags process=2 proc=4000000 pri=32, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff80001d6aa118,0xffff80001d6a9768 process=0xffff8000ffff8ae0 user=0xffff80001d74d000, vmspace=0xfffffd806bc09990 estcpu=0, cpticks=0, pctcpu=0.5 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 73236 420434 0 0 3 0x14280 nfsidl nfsio 78794 376404 0 0 3 0x14280 nfsidl nfsio 74937 439092 0 0 3 0x14280 nfsidl nfsio 64883 415323 0 0 3 0x14280 nfsidl nfsio 81462 47677 0 0 3 0x14280 nfsidl nfsio 26444 137283 0 0 3 0x14280 nfsidl nfsio 6337 263689 0 0 3 0x14280 nfsidl nfsio 70501 217077 0 0 3 0x14280 nfsidl nfsio 19269 273042 0 0 3 0x14280 nfsidl nfsio 98212 16412 0 0 3 0x14280 nfsidl nfsio 75707 295959 0 0 3 0x14280 nfsidl nfsio 65111 303834 0 0 3 0x14280 nfsidl nfsio 21316 223192 0 0 3 0x14280 nfsidl nfsio 44164 111438 0 0 3 0x14280 nfsidl nfsio 46520 341446 0 0 3 0x14280 nfsidl nfsio 72478 387516 0 0 3 0x14280 nfsidl nfsio 7533 444272 0 0 3 0x14280 nfsidl nfsio 17364 149711 0 0 3 0x14280 nfsidl nfsio 30569 394485 0 0 3 0x14280 nfsidl nfsio 26106 75408 0 0 3 0x14280 nfsidl nfsio 37681 268577 0 0 3 0x14200 bored sosplice 36948 413608 79634 0 3 0x82 piperd syz-executor.0 79634 364980 85998 0 3 0x82 kqread syz-fuzzer 79634 268666 85998 0 2 0x4000002 syz-fuzzer 79634 310395 85998 0 3 0x4000082 thrsleep syz-fuzzer 79634 42945 85998 0 3 0x4000082 thrsleep syz-fuzzer 79634 411730 85998 0 3 0x4000082 thrsleep syz-fuzzer 79634 153528 85998 0 2 0x4000002 syz-fuzzer 79634 312040 85998 0 3 0x4000082 thrsleep syz-fuzzer *79634 325582 85998 0 7 0x4000002 syz-fuzzer 85998 135458 62268 0 3 0x10008a pause ksh 62268 428192 35958 0 3 0x92 select sshd 48569 5107 1 0 3 0x100083 ttyin getty 35958 65741 1 0 3 0x80 select sshd 1488 465080 92715 73 3 0x100090 kqread syslogd 92715 483370 1 0 3 0x100082 netio syslogd 69686 51594 1 77 3 0x100090 poll dhclient 46851 452558 1 0 3 0x80 poll dhclient 73914 92834 0 0 3 0x14200 bored smr 17348 523863 0 0 3 0x14200 pgzero zerothread 6575 73635 0 0 3 0x14200 aiodoned aiodoned 18030 151444 0 0 3 0x14200 syncer update 5146 88100 0 0 3 0x14200 cleaner cleaner 8343 129240 0 0 3 0x14200 reaper reaper 39307 11092 0 0 3 0x14200 pgdaemon pagedaemon 66681 475618 0 0 3 0x14200 bored crynlk 71678 236199 0 0 3 0x14200 bored crypto 34930 325583 0 0 3 0x40014200 acpi0 acpi0 32315 100235 0 0 3 0x14200 bored softnet 96075 316583 0 0 3 0x14200 bored systqmp 66590 198704 0 0 3 0x14200 bored systq 87095 100335 0 0 3 0x40014200 bored softclock 48275 232660 0 0 3 0x40014200 idle0 1 429187 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 9493 6341K 6724K 78643K 11100 0 pcb 13 8K 8K 78643K 91 0 rtable 90 11K 15K 78643K 438 0 ifaddr 62 12K 14K 78643K 155 0 counters 20 16K 16K 78643K 23 0 ioctlops 0 0K 4K 78643K 37 0 iov 0 0K 28K 78643K 40 0 mount 1 1K 1K 78643K 1 0 vnodes 1221 77K 77K 78643K 1394 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 0K 1K 78643K 38 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 195K 288K 78643K 12938 0 file desc 3 5K 25K 78643K 212 0 sigio 0 0K 0K 78643K 2 0 proc 48 38K 63K 78643K 380 0 subproc 16 1K 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 29 0 in_multi 35 1K 2K 78643K 99 0 ether_multi 1 0K 0K 78643K 10 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 55 254K 254K 78643K 55 0 exec 0 0K 1K 78643K 189 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 116 14K 23K 78643K 1334 0 UVM aobj 10 2K 3K 78643K 12 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 44 0 NDP 10 0K 0K 78643K 23 0 temp 90 3852K 3918K 78643K 5968 0 kqueue 3 4K 6K 78643K 4 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 25 0 23 1 0 1 1 0 8 0 rtentry 112 51 0 18 2 0 2 2 0 8 0 unpcb 120 131 0 123 1 0 1 1 0 8 0 syncache 264 6 0 6 2 2 0 1 0 8 0 tcpqe 32 49 0 49 1 1 0 1 0 8 0 tcpcb 544 96 0 92 1 0 1 1 0 8 0 ipq 40 2 0 2 1 1 0 1 0 8 0 ipqe 40 6 0 6 1 1 0 1 0 8 0 inpcb 296 314 0 307 2 0 2 2 0 8 1 nd6 48 12 0 9 1 0 1 1 0 8 0 pkpcb 40 2 0 2 1 1 0 1 0 8 0 pfstscr 40 1 0 0 1 0 1 1 0 8 0 pfrktable 1344 92 0 92 1 0 1 1 0 8 1 pftag 88 21 0 20 1 0 1 1 0 8 0 pfstitem 24 1 0 0 1 0 1 1 0 8 0 pfstkey 112 1 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 10 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 2 10 12 0 8 0 art_table 32 189 0 44 2 0 2 2 0 8 0 art_node 16 50 0 20 1 0 1 1 0 8 0 sysvmsgpl 40 6 0 2 1 0 1 1 0 8 0 semapl 112 30 0 20 1 0 1 1 0 8 0 shmpl 112 10 0 2 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1682 0 290 88 0 88 88 0 8 0 ffsino 240 1682 0 290 83 0 83 83 0 8 0 nchpl 144 2195 0 614 60 0 60 60 0 8 0 uvmvnodes 72 1863 0 0 34 0 34 34 0 8 0 vnodes 208 1863 0 0 99 0 99 99 0 8 0 namei 1024 5786 0 5786 1 0 1 1 0 8 1 pfiaddrpl 120 26 0 26 1 0 1 1 0 8 1 scxspl 192 6535 0 6535 1 0 1 1 0 8 1 plimitpl 152 26 0 20 1 0 1 1 0 8 0 sigapl 424 419 0 372 6 0 6 6 0 8 0 futexpl 56 4320 0 4320 1 0 1 1 0 8 1 knotepl 112 63 0 50 1 0 1 1 0 8 0 kqueuepl 144 22 0 20 1 0 1 1 0 8 0 pipelkpl 16 94 0 87 1 0 1 1 0 8 0 pipepl 120 188 0 175 2 0 2 2 0 8 1 fdescpl 432 384 0 372 2 0 2 2 0 8 0 filepl 120 2277 0 2205 5 0 5 5 0 8 2 lockfpl 104 39 0 38 1 0 1 1 0 8 0 lockfspl 48 16 0 15 1 0 1 1 0 8 0 sessionpl 112 17 0 8 1 0 1 1 0 8 0 pgrppl 48 23 0 14 1 0 1 1 0 8 0 ucredpl 96 180 0 173 1 0 1 1 0 8 0 zombiepl 144 372 0 372 1 0 1 1 0 8 1 processpl 920 419 0 372 7 0 7 7 0 8 0 procpl 624 642 0 588 5 0 5 5 0 8 0 sosppl 128 2 0 2 1 1 0 1 0 8 0 sockpl 400 472 0 455 4 0 4 4 0 8 2 mcl64k 65536 29 0 29 1 0 1 1 0 8 1 mcl12k 12288 8 0 8 1 0 1 1 0 8 1 mcl9k 9216 5 0 5 1 0 1 1 0 8 1 mcl8k 8192 8 0 8 1 0 1 1 0 8 1 mcl4k 4096 33 0 33 2 1 1 1 0 8 1 mcl2k2 2112 1 0 1 1 0 1 1 0 8 1 mcl2k 2048 70824 0 70779 18 10 8 16 0 8 1 mtagpl 96 8 0 2 2 1 1 1 0 8 0 mbufpl 256 114600 0 114466 30 16 14 28 0 8 5 bufpl 280 3934 0 140 271 0 271 271 0 8 0 anonpl 16 49359 0 37605 67 1 66 66 0 107 0 amapchunkpl 152 1663 0 1538 8 2 6 8 0 158 0 amappl16 192 1801 0 913 46 0 46 46 0 8 1 amappl15 184 2 0 0 1 0 1 1 0 8 0 amappl14 176 25 0 22 1 0 1 1 0 8 0 amappl13 168 26 0 24 1 0 1 1 0 8 0 amappl12 160 102 0 100 1 0 1 1 0 8 0 amappl11 152 148 0 138 1 0 1 1 0 8 0 amappl10 144 18 0 13 1 0 1 1 0 8 0 amappl9 136 376 0 374 1 0 1 1 0 8 0 amappl8 128 338 0 289 2 0 2 2 0 8 0 amappl7 120 107 0 95 1 0 1 1 0 8 0 amappl6 112 113 0 109 1 0 1 1 0 8 0 amappl5 104 409 0 398 1 0 1 1 0 8 0 amappl4 96 418 0 392 1 0 1 1 0 8 0 amappl3 88 109 0 104 1 0 1 1 0 8 0 amappl2 80 2203 0 2151 2 0 2 2 0 8 0 amappl1 72 16653 0 16263 23 13 10 17 0 8 0 amappl 80 856 0 820 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 2 1 0 1 1 0 8 0 uaddrrnd 24 384 0 372 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 384 0 372 1 0 1 1 0 8 0 vmmpekpl 168 6684 0 6653 2 0 2 2 0 8 0 vmmpepl 168 52163 0 50359 114 11 103 108 0 357 18 vmsppl 272 383 0 372 2 1 1 2 0 8 0 pdppl 4096 774 0 744 6 1 5 6 0 8 0 pvpl 32 160987 0 146295 159 0 159 159 0 265 5 pmappl 200 383 0 372 1 0 1 1 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 261 0 33 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(ffffffff823f0699) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac1cc0) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac1cc0) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da7aaf8,9,fffffd8053bf1e00,0,0,ffff80001d6a94e8) at tcp_usrreq+0xa54 sosend(fffffd805da7aaf8,0,ffff80001d752c98,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d6a94e8,3,ffff80001d752c98,0,ffff80001d752d80) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d6a94e8,ffff80001d752d30,ffff80001d752d80) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d752e00) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc002b8d3c8, 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(ffffffff823f0699) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac1cc0) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac1cc0) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da7aaf8,9,fffffd8053bf1e00,0,0,ffff80001d6a94e8) at tcp_usrreq+0xa54 sosend(fffffd805da7aaf8,0,ffff80001d752c98,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d6a94e8,3,ffff80001d752c98,0,ffff80001d752d80) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d6a94e8,ffff80001d752d30,ffff80001d752d80) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d752e00) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc002b8d3c8, count: -9