panic: tcp_output: template len != hdrlen - optlen Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *258490 18820 0 0x2 0x4000000 0 syz-fuzzer db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff823f6259) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac3320) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac3320) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da62c88,9,fffffd805e32fd00,0,0,ffff80001d71dd50) at tcp_usrreq+0xa54 sosend(fffffd805da62c88,0,ffff80001d767158,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d71dd50,3,ffff80001d767158,0,ffff80001d767240) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d71dd50,ffff80001d7671f0,ffff80001d767240) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d7672c0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc0001633c8, 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(ffffffff823f6259) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac3320) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac3320) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da62c88,9,fffffd805e32fd00,0,0,ffff80001d71dd50) at tcp_usrreq+0xa54 sosend(fffffd805da62c88,0,ffff80001d767158,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d71dd50,3,ffff80001d767158,0,ffff80001d767240) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d71dd50,ffff80001d7671f0,ffff80001d767240) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d7672c0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc0001633c8, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001d766cc0 rbx 0xffff80001d766d70 rdx 0x2 rcx 0 rax 0x1 r8 0xffffffff813392bf kprintf+0x15f r9 0x1 r10 0x2 r11 0x8731930d09645a1 r12 0x3000000008 r13 0xffff80001d766cd0 r14 0x100 r15 0x1 rip 0xffffffff81597d08 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001d766cb0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-fuzzer) pid=258490 stat=onproc flags process=2 proc=4000000 pri=32, usrpri=77, nice=20 forw=0xffffffffffffffff, list=0xffff80001d71ceb0,0xffff80001d6aa128 process=0xffff80001d706018 user=0xffff80001d762000, vmspace=0xfffffd806bc0a000 estcpu=27, cpticks=0, pctcpu=4.55 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 42383 358220 5109 0 2 0x10 syz-executor.1 42383 205507 5109 0 3 0x4000090 fsleep syz-executor.1 15342 249756 0 0 3 0x14200 bored sosplice 9415 46619 18820 0 3 0x82 piperd syz-executor.0 5109 391260 18820 0 3 0x82 nanosleep syz-executor.1 18820 111719 8984 0 3 0x82 thrsleep syz-fuzzer 18820 40026 8984 0 3 0x4000082 nanosleep syz-fuzzer 18820 283555 8984 0 2 0x4000002 syz-fuzzer 18820 194024 8984 0 3 0x4000082 thrsleep syz-fuzzer 18820 460609 8984 0 3 0x4000082 thrsleep syz-fuzzer *18820 258490 8984 0 7 0x4000002 syz-fuzzer 18820 255096 8984 0 3 0x4000082 thrsleep syz-fuzzer 8984 512657 47502 0 3 0x10008a pause ksh 47502 48842 51936 0 3 0x92 select sshd 84388 268241 1 0 3 0x100083 ttyin getty 51936 433891 1 0 3 0x80 select sshd 59043 206842 59691 73 3 0x100090 kqread syslogd 59691 365047 1 0 3 0x100082 netio syslogd 93698 19205 1 77 3 0x100090 poll dhclient 84719 349492 1 0 3 0x80 poll dhclient 22556 148044 0 0 3 0x14200 bored smr 41058 254584 0 0 2 0x14200 zerothread 4148 145588 0 0 3 0x14200 aiodoned aiodoned 9333 448554 0 0 3 0x14200 syncer update 40090 354149 0 0 3 0x14200 cleaner cleaner 1003 395320 0 0 3 0x14200 reaper reaper 92190 488139 0 0 3 0x14200 pgdaemon pagedaemon 24122 501620 0 0 3 0x14200 bored crynlk 55953 195833 0 0 3 0x14200 bored crypto 55936 57689 0 0 3 0x40014200 acpi0 acpi0 57444 31546 0 0 3 0x14200 bored softnet 51660 360947 0 0 3 0x14200 bored systqmp 83047 323391 0 0 3 0x14200 bored systq 58206 67577 0 0 3 0x40014200 bored softclock 49443 449518 0 0 3 0x40014200 idle0 1 227460 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 9484 6343K 6587K 78643K 10666 0 pcb 13 8K 8K 78643K 27 0 rtable 93 2K 3K 78643K 239 0 ifaddr 235 56K 56K 78643K 262 0 counters 21 16K 16K 78643K 23 0 ioctlops 0 0K 4K 78643K 30 0 iov 0 0K 12K 78643K 335 0 mount 1 1K 1K 78643K 1 0 vnodes 1218 77K 77K 78643K 1254 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 5 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 0K 78643K 49 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 195K 288K 78643K 12938 0 file desc 5 13K 25K 78643K 336 0 proc 49 38K 63K 78643K 368 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 8 0 in_multi 567 18K 18K 78643K 607 0 ether_multi 1 0K 0K 78643K 2 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 123 22K 23K 78643K 1561 0 UVM aobj 11 2K 2K 78643K 11 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 9 0 NDP 9 0K 0K 78643K 19 0 temp 84 3849K 3921K 78643K 4860 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 6 0 0 1 0 1 1 0 8 0 rtpcb 80 25 0 23 1 0 1 1 0 8 0 rtentry 112 57 0 19 2 0 2 2 0 8 0 unpcb 120 57 0 49 1 0 1 1 0 8 0 syncache 264 5 0 5 2 1 1 1 0 8 1 tcpqe 32 349 0 349 2 1 1 1 0 8 1 tcpcb 544 76 0 71 1 0 1 1 0 8 0 ipq 40 2 0 2 1 1 0 1 0 8 0 ipqe 40 8 0 8 1 1 0 1 0 8 0 inpcb 296 424 0 416 3 2 1 2 0 8 0 nd6 48 12 0 10 1 0 1 1 0 8 0 pfstkey 112 2 0 2 1 1 0 1 0 8 0 pfstate 328 1 0 1 1 1 0 1 0 8 0 pfrule 1360 2 0 0 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 237 0 80 13 0 13 13 0 8 0 art_table 32 238 0 80 2 0 2 2 0 8 0 art_node 16 56 0 20 1 0 1 1 0 8 0 sysvmsgpl 40 6 0 2 1 0 1 1 0 8 0 semapl 112 47 0 37 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 1775 0 378 88 0 88 88 0 8 0 ffsino 240 1775 0 378 83 0 83 83 0 8 0 nchpl 144 2592 0 988 60 0 60 60 0 8 0 uvmvnodes 72 1832 0 0 34 0 34 34 0 8 0 vnodes 208 1832 0 0 97 0 97 97 0 8 0 namei 1024 6236 0 6236 1 0 1 1 0 8 1 vmpool 528 2 0 2 1 1 0 1 0 8 0 scxspl 192 6922 0 6922 1 0 1 1 0 8 1 plimitpl 152 22 0 15 1 0 1 1 0 8 0 sigapl 424 523 0 494 4 0 4 4 0 8 0 futexpl 56 5462 0 5461 1 0 1 1 0 8 0 knotepl 112 63 0 44 1 0 1 1 0 8 0 kqueuepl 144 24 0 22 1 0 1 1 0 8 0 pipepl 272 90 0 80 1 0 1 1 0 8 0 fdescpl 432 508 0 494 2 0 2 2 0 8 0 filepl 120 2494 0 2397 5 1 4 4 0 8 1 lockfpl 104 32 0 31 1 0 1 1 0 8 0 lockfspl 48 11 0 10 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 209 0 201 1 0 1 1 0 8 0 zombiepl 144 494 0 494 1 0 1 1 0 8 1 processpl 928 523 0 494 4 0 4 4 0 8 0 procpl 624 851 0 815 4 1 3 4 0 8 0 sosppl 128 2 0 2 1 1 0 1 0 8 0 sockpl 400 506 0 488 4 1 3 3 0 8 1 mcl64k 65536 8 0 8 3 2 1 1 0 8 1 mcl16k 16384 3 0 3 2 1 1 1 0 8 1 mcl12k 12288 6 0 6 3 3 0 1 0 8 0 mcl9k 9216 3 0 3 1 1 0 1 0 8 0 mcl8k 8192 5 0 5 1 1 0 1 0 8 0 mcl4k 4096 18 0 18 5 4 1 1 0 8 1 mcl2k2 2112 3 0 3 3 2 1 1 0 8 1 mcl2k 2048 89025 0 88967 21 13 8 18 0 8 0 mtagpl 96 9 0 2 2 1 1 1 0 8 0 mbufpl 256 141909 0 141752 14 1 13 13 0 8 0 bufpl 280 3713 0 125 257 0 257 257 0 8 0 anonpl 16 63263 0 46698 82 13 69 77 0 107 0 amapchunkpl 152 2034 0 1901 8 2 6 8 0 158 0 amappl16 192 2326 0 1369 58 10 48 53 0 8 0 amappl15 184 1 0 0 1 0 1 1 0 8 0 amappl14 176 25 0 21 1 0 1 1 0 8 0 amappl13 168 272 0 267 1 0 1 1 0 8 0 amappl12 160 308 0 304 2 1 1 1 0 8 0 amappl11 152 57 0 47 1 0 1 1 0 8 0 amappl10 144 14 0 10 1 0 1 1 0 8 0 amappl9 136 372 0 371 1 0 1 1 0 8 0 amappl8 128 328 0 282 2 0 2 2 0 8 0 amappl7 120 105 0 94 1 0 1 1 0 8 0 amappl6 112 26 0 18 1 0 1 1 0 8 0 amappl5 104 507 0 495 1 0 1 1 0 8 0 amappl4 96 423 0 395 1 0 1 1 0 8 0 amappl3 88 108 0 103 1 0 1 1 0 8 0 amappl2 80 3484 0 3415 2 0 2 2 0 8 0 amappl1 72 19722 0 19295 23 13 10 17 0 8 0 amappl 80 1089 0 1046 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 10 0 0 1 0 1 1 0 8 0 uaddrrnd 24 510 0 496 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 510 0 496 1 0 1 1 0 8 0 vmmpekpl 168 6739 0 6712 2 0 2 2 0 8 0 vmmpepl 168 68161 0 66089 120 29 91 110 0 357 0 vmsppl 272 509 0 496 2 1 1 2 0 8 0 pdppl 4096 1026 0 992 6 1 5 6 0 8 0 pvpl 32 190910 0 171354 189 27 162 181 0 265 0 pmappl 200 509 0 496 1 0 1 1 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 256 0 28 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(ffffffff823f6259) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac3320) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac3320) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da62c88,9,fffffd805e32fd00,0,0,ffff80001d71dd50) at tcp_usrreq+0xa54 sosend(fffffd805da62c88,0,ffff80001d767158,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d71dd50,3,ffff80001d767158,0,ffff80001d767240) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d71dd50,ffff80001d7671f0,ffff80001d767240) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d7672c0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc0001633c8, 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(ffffffff823f6259) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac3320) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac3320) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da62c88,9,fffffd805e32fd00,0,0,ffff80001d71dd50) at tcp_usrreq+0xa54 sosend(fffffd805da62c88,0,ffff80001d767158,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d71dd50,3,ffff80001d767158,0,ffff80001d767240) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d71dd50,ffff80001d7671f0,ffff80001d767240) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d7672c0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc0001633c8, count: -9