panic: tcp_output: template len != hdrlen - optlen Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *513522 43808 0 0x2 0x4000000 0 syz-fuzzer db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff823ff4c7) at panic+0x164 sys/kern/subr_prf.c:218 tcp_output(ffff800000ac3100) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac3100) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da754b8,9,fffffd80692b0e00,0,0,ffff80001d71c9d0) at tcp_usrreq+0xa54 sosend(fffffd805da754b8,0,ffff80001d7458f8,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d71c9d0,6,ffff80001d7458f8,0,ffff80001d7459e0) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d71c9d0,ffff80001d745990,ffff80001d7459e0) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d745a60) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc0002613d8, 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(ffffffff823ff4c7) at panic+0x164 sys/kern/subr_prf.c:218 tcp_output(ffff800000ac3100) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac3100) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da754b8,9,fffffd80692b0e00,0,0,ffff80001d71c9d0) at tcp_usrreq+0xa54 sosend(fffffd805da754b8,0,ffff80001d7458f8,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d71c9d0,6,ffff80001d7458f8,0,ffff80001d7459e0) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d71c9d0,ffff80001d745990,ffff80001d7459e0) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d745a60) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc0002613d8, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001d745460 rbx 0xffff80001d745510 rdx 0x8b rcx 0x2 rax 0x1 r8 0xffff80001d745420 r9 0xffffffff8203e52f kprintf+0x15f r10 0x1 r11 0x9394f7e14e98772b r12 0x3000000008 r13 0xffff80001d745470 r14 0x100 r15 0x1 rip 0xffffffff81989c28 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001d745450 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-fuzzer) pid=513522 stat=onproc flags process=2 proc=4000000 pri=24, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff80001d71c010,0xffff80001d6a9eb8 process=0xffff80001d7063b8 user=0xffff80001d740000, vmspace=0xfffffd806bc0abb0 estcpu=0, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 27526 202369 43808 0 3 0x82 piperd syz-executor.0 42095 247187 43808 0 3 0x82 wait syz-executor.1 6877 399039 0 0 3 0x14200 acct acct 13975 3451 0 0 3 0x14200 bored sosplice 8143 413324 0 0 3 0x14280 nfsidl nfsio 9323 81776 0 0 3 0x14280 nfsidl nfsio 94805 335460 0 0 3 0x14280 nfsidl nfsio 88481 261258 0 0 3 0x14280 nfsidl nfsio 47651 231508 0 0 3 0x14280 nfsidl nfsio 29119 93929 0 0 3 0x14280 nfsidl nfsio 82111 33060 0 0 3 0x14280 nfsidl nfsio 40235 404615 0 0 3 0x14280 nfsidl nfsio 89619 503532 0 0 3 0x14280 nfsidl nfsio 16214 154274 0 0 3 0x14280 nfsidl nfsio 11337 252605 0 0 3 0x14280 nfsidl nfsio 55158 212394 0 0 3 0x14280 nfsidl nfsio 56785 472541 0 0 3 0x14280 nfsidl nfsio 35423 201518 0 0 3 0x14280 nfsidl nfsio 83562 412496 0 0 3 0x14280 nfsidl nfsio 40730 370350 0 0 3 0x14280 nfsidl nfsio 75713 163985 0 0 3 0x14280 nfsidl nfsio 15698 126327 0 0 3 0x14280 nfsidl nfsio 6617 406111 0 0 3 0x14280 nfsidl nfsio 66641 510643 0 0 3 0x14280 nfsidl nfsio 43808 7115 47101 0 3 0x82 thrsleep syz-fuzzer 43808 85207 47101 0 2 0x4000482 syz-fuzzer 43808 241548 47101 0 3 0x4000082 thrsleep syz-fuzzer *43808 513522 47101 0 7 0x4000002 syz-fuzzer 43808 321698 47101 0 3 0x4000082 thrsleep syz-fuzzer 43808 451219 47101 0 3 0x4000082 thrsleep syz-fuzzer 47101 405502 46435 0 3 0x10008a pause ksh 46435 242995 43520 0 3 0x92 select sshd 24664 144843 1 0 3 0x100083 ttyin getty 43520 169271 1 0 3 0x80 select sshd 33605 50324 40352 73 3 0x100090 kqread syslogd 40352 203678 1 0 3 0x100082 netio syslogd 56523 252283 1 77 3 0x100090 poll dhclient 75333 364474 1 0 3 0x80 poll dhclient 39668 57098 0 0 3 0x14200 bored smr 9173 480925 0 0 3 0x14200 pgzero zerothread 3204 2584 0 0 3 0x14200 aiodoned aiodoned 33056 345294 0 0 3 0x14200 syncer update 18684 90120 0 0 3 0x14200 cleaner cleaner 8381 441082 0 0 3 0x14200 reaper reaper 56457 385930 0 0 3 0x14200 pgdaemon pagedaemon 15763 490356 0 0 3 0x14200 bored crynlk 15510 311511 0 0 3 0x14200 bored crypto 16659 199211 0 0 3 0x40014200 acpi0 acpi0 40039 327902 0 0 3 0x14200 bored softnet 19061 206114 0 0 3 0x14200 bored systqmp 46673 212741 0 0 3 0x14200 bored systq 62273 391955 0 0 3 0x40014200 bored softclock 41503 2616 0 0 3 0x40014200 idle0 1 90959 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 9501 6345K 6656K 78643K 10991 0 pcb 13 8K 8K 78643K 59 0 rtable 128 8K 12K 78643K 521 0 ifaddr 82 16K 17K 78643K 165 0 sysctl 3 1K 1K 78643K 3 0 counters 21 16K 16K 78643K 27 0 ioctlops 0 0K 4K 78643K 70 0 iov 0 0K 24K 78643K 635 0 mount 1 1K 1K 78643K 1 0 vnodes 1217 77K 77K 78643K 1424 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 13 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 0K 78643K 92 0 dirhash 9 1K 2K 78643K 12 0 ACPI 1809 195K 288K 78643K 12938 0 file desc 5 13K 25K 78643K 479 0 sigio 0 0K 0K 78643K 4 0 proc 49 38K 63K 78643K 514 0 subproc 32 2K 2K 78643K 85 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 26 0 in_multi 33 2K 2K 78643K 148 0 ether_multi 1 0K 0K 78643K 10 0 mrt 0 0K 0K 78643K 2 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 256 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 135 23K 39K 78643K 1960 0 UVM aobj 14 2K 2K 78643K 16 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 13 0K 0K 78643K 40 0 temp 122 3860K 3924K 78643K 5518 0 kqueue 3 4K 12K 78643K 18 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 6 1 0 1 1 0 8 0 rtpcb 80 35 0 33 1 0 1 1 0 8 0 rtentry 112 104 0 60 2 0 2 2 0 8 0 unpcb 120 173 0 165 1 0 1 1 0 8 0 syncache 264 6 0 6 2 2 0 1 0 8 0 tcpqe 32 856 0 856 1 1 0 1 0 8 0 tcpcb 544 132 0 128 3 1 2 2 0 8 1 ipq 40 2 0 2 1 1 0 1 0 8 0 ipqe 40 90 0 90 1 1 0 1 0 8 0 inpcb 296 394 0 387 3 1 2 2 0 8 1 rttmr 72 1 0 1 1 1 0 1 0 8 0 ip6q 72 1 0 1 1 1 0 1 0 8 0 ip6af 40 2 0 2 1 1 0 1 0 8 0 nd6 48 32 0 26 1 0 1 1 0 8 0 pkpcb 40 2 0 2 1 1 0 1 0 8 0 swfcl 56 2 0 0 1 0 1 1 0 8 0 pfosfp 40 1 0 0 1 0 1 1 0 8 0 pfosfpen 112 1 0 0 1 0 1 1 0 8 0 pfrktable 1344 49 0 40 2 1 1 2 0 8 0 pftag 88 11 0 8 1 0 1 1 0 8 0 pfrule 1360 18 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 454 0 266 17 5 12 17 0 8 0 art_table 32 455 0 266 3 1 2 3 0 8 0 art_node 16 103 0 63 1 0 1 1 0 8 0 sysvmsgpl 40 24 0 16 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 90 0 80 1 0 1 1 0 8 0 shmpl 112 13 0 2 1 0 1 1 0 8 0 dirhash 1024 17 0 10 3 1 2 3 0 8 0 dino2pl 256 1970 0 574 88 0 88 88 0 8 0 ffsino 240 1970 0 574 83 0 83 83 0 8 0 nchpl 144 3028 0 1440 60 0 60 60 0 8 0 uvmvnodes 72 2157 0 0 40 0 40 40 0 8 0 vnodes 208 2157 0 0 114 0 114 114 0 8 0 namei 1024 8163 0 8163 1 0 1 1 0 8 1 pfiaddrpl 120 18 0 12 1 0 1 1 0 8 0 scxspl 192 8696 0 8696 1 0 1 1 0 8 1 plimitpl 152 50 0 43 1 0 1 1 0 8 0 sigapl 424 678 0 628 6 0 6 6 0 8 0 futexpl 56 8331 0 8331 1 0 1 1 0 8 1 knotepl 112 122 0 102 1 0 1 1 0 8 0 kqueuepl 144 50 0 48 1 0 1 1 0 8 0 pipepl 272 123 0 112 3 1 2 2 0 8 0 fdescpl 432 642 0 628 2 0 2 2 0 8 0 filepl 120 3689 0 3590 5 1 4 5 0 8 0 lockfpl 104 126 0 125 1 0 1 1 0 8 0 lockfspl 48 43 0 42 1 0 1 1 0 8 0 sessionpl 112 20 0 10 1 0 1 1 0 8 0 pgrppl 48 20 0 10 1 0 1 1 0 8 0 ucredpl 96 314 0 307 1 0 1 1 0 8 0 zombiepl 144 629 0 628 1 0 1 1 0 8 0 processpl 928 678 0 628 7 0 7 7 0 8 0 procpl 624 1140 0 1085 5 0 5 5 0 8 0 sosppl 128 6 0 6 1 1 0 1 0 8 0 sockpl 400 608 0 591 4 1 3 4 0 8 1 mcl64k 65536 26 0 26 1 0 1 1 0 8 1 mcl16k 16384 5 0 5 2 2 0 1 0 8 0 mcl12k 12288 9 0 9 2 2 0 1 0 8 0 mcl9k 9216 7 0 7 1 0 1 1 0 8 1 mcl8k 8192 20 0 20 2 1 1 1 0 8 1 mcl4k 4096 38 0 38 2 1 1 1 0 8 1 mcl2k2 2112 5 0 5 2 1 1 1 0 8 1 mcl2k 2048 87631 0 87566 28 19 9 26 0 8 0 mtagpl 96 24 0 16 2 1 1 1 0 8 0 mbufpl 256 142102 0 141942 23 11 12 20 0 8 0 bufpl 280 4455 0 125 310 0 310 310 0 8 0 anonpl 16 85623 0 68350 87 4 83 85 0 107 9 amapchunkpl 152 3402 0 3228 24 12 12 21 0 158 4 amappl16 192 2880 0 1905 57 2 55 57 0 8 6 amappl15 184 117 0 116 1 0 1 1 0 8 0 amappl14 176 122 0 121 1 0 1 1 0 8 0 amappl13 168 120 0 116 1 0 1 1 0 8 0 amappl12 160 185 0 180 1 0 1 1 0 8 0 amappl11 152 183 0 173 1 0 1 1 0 8 0 amappl10 144 22 0 17 1 0 1 1 0 8 0 amappl9 136 343 0 342 1 0 1 1 0 8 0 amappl8 128 379 0 342 2 0 2 2 0 8 0 amappl7 120 121 0 108 1 0 1 1 0 8 0 amappl6 112 30 0 24 1 0 1 1 0 8 0 amappl5 104 474 0 462 1 0 1 1 0 8 0 amappl4 96 671 0 642 1 0 1 1 0 8 0 amappl3 88 329 0 320 1 0 1 1 0 8 0 amappl2 80 4204 0 4137 2 0 2 2 0 8 0 amappl1 72 23280 0 22865 24 15 9 17 0 8 0 amappl 80 1398 0 1347 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 15 0 2 1 0 1 1 0 8 0 uaddrrnd 24 642 0 628 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 642 0 628 1 0 1 1 0 8 0 vmmpekpl 168 7646 0 7609 2 0 2 2 0 8 0 vmmpepl 168 87093 0 85020 142 18 124 135 0 357 28 vmsppl 272 641 0 628 3 2 1 2 0 8 0 pdppl 4096 1290 0 1256 6 1 5 6 0 8 0 pvpl 32 251373 0 230974 201 7 194 196 0 265 23 pmappl 200 641 0 628 1 0 1 1 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 278 0 48 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(ffffffff823ff4c7) at panic+0x164 sys/kern/subr_prf.c:218 tcp_output(ffff800000ac3100) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac3100) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da754b8,9,fffffd80692b0e00,0,0,ffff80001d71c9d0) at tcp_usrreq+0xa54 sosend(fffffd805da754b8,0,ffff80001d7458f8,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d71c9d0,6,ffff80001d7458f8,0,ffff80001d7459e0) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d71c9d0,ffff80001d745990,ffff80001d7459e0) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d745a60) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc0002613d8, 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(ffffffff823ff4c7) at panic+0x164 sys/kern/subr_prf.c:218 tcp_output(ffff800000ac3100) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac3100) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da754b8,9,fffffd80692b0e00,0,0,ffff80001d71c9d0) at tcp_usrreq+0xa54 sosend(fffffd805da754b8,0,ffff80001d7458f8,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d71c9d0,6,ffff80001d7458f8,0,ffff80001d7459e0) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d71c9d0,ffff80001d745990,ffff80001d7459e0) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d745a60) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc0002613d8, count: -9