login: panic: tcp_output: template len != hdrlen - optlen Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *157857 52736 0 0x12 0 0 sshd db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff823f4ff4) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac3760) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac3760) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da6e4b8,9,fffffd8059168b00,0,0,ffff80001d71c010) at tcp_usrreq+0xa54 sosend(fffffd805da6e4b8,0,ffff80001d6cdbb8,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d71c010,4,ffff80001d6cdbb8,0,ffff80001d6cdca0) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d71c010,ffff80001d6cdc50,ffff80001d6cdca0) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d6cdd20) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffee4d0, 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(ffffffff823f4ff4) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac3760) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac3760) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da6e4b8,9,fffffd8059168b00,0,0,ffff80001d71c010) at tcp_usrreq+0xa54 sosend(fffffd805da6e4b8,0,ffff80001d6cdbb8,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d71c010,4,ffff80001d6cdbb8,0,ffff80001d6cdca0) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d71c010,ffff80001d6cdc50,ffff80001d6cdca0) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d6cdd20) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffee4d0, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001d6cd720 rbx 0xffff80001d6cd7d0 rdx 0x2 rcx 0 rax 0x1 r8 0xffffffff81e8891f kprintf+0x15f r9 0x1 r10 0x2 r11 0x1a50c6d3ba3704b1 r12 0x3000000008 r13 0xffff80001d6cd730 r14 0x100 r15 0x1 rip 0xffffffff816d33f8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001d6cd710 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (sshd) pid=157857 stat=onproc flags process=12 proc=0 pri=24, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff80001d71d870,0xffff80001d71c500 process=0xffff80001d706018 user=0xffff80001d6c8000, vmspace=0xfffffd806bc09880 estcpu=0, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 7568 8046 11978 0 2 0x2 syz-executor.1 41249 141606 11978 0 3 0x82 piperd syz-executor.0 11978 410080 85507 0 2 0x2 syz-fuzzer 11978 126375 85507 0 2 0x4000002 syz-fuzzer 11978 14198 85507 0 3 0x4000082 thrsleep syz-fuzzer 11978 323836 85507 0 3 0x4000082 thrsleep syz-fuzzer 11978 509736 85507 0 3 0x4000082 thrsleep syz-fuzzer 11978 116553 85507 0 3 0x4000082 thrsleep syz-fuzzer 11978 113289 85507 0 3 0x4000082 thrsleep syz-fuzzer 11978 354352 85507 0 3 0x4000082 thrsleep syz-fuzzer 85507 48596 52736 0 3 0x10008a pause ksh *52736 157857 43587 0 7 0x12 sshd 94408 420569 1 0 3 0x100083 ttyin getty 43587 505797 1 0 3 0x80 select sshd 66260 311903 27706 73 3 0x100090 kqread syslogd 27706 183982 1 0 3 0x100082 netio syslogd 50475 310087 1 77 3 0x100090 poll dhclient 91121 142747 1 0 3 0x80 poll dhclient 65418 334844 0 0 3 0x14200 bored smr 3735 400662 0 0 2 0x14200 zerothread 4847 273753 0 0 3 0x14200 aiodoned aiodoned 99448 422808 0 0 3 0x14200 syncer update 69403 116196 0 0 3 0x14200 cleaner cleaner 16998 441126 0 0 3 0x14200 reaper reaper 85800 104114 0 0 3 0x14200 pgdaemon pagedaemon 96133 295471 0 0 3 0x14200 bored crynlk 571 114342 0 0 3 0x14200 bored crypto 23538 221313 0 0 3 0x40014200 acpi0 acpi0 87876 247374 0 0 3 0x14200 bored softnet 92513 412179 0 0 3 0x14200 bored systqmp 60081 91969 0 0 3 0x14200 bored systq 41811 182293 0 0 3 0x40014200 bored softclock 46643 57773 0 0 3 0x40014200 idle0 1 270093 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 9465 6391K 6914K 78643K 10716 0 pcb 13 8K 8K 78643K 19 0 rtable 110 4K 4K 78643K 202 0 ifaddr 45 10K 11K 78643K 47 0 counters 21 16K 16K 78643K 21 0 ioctlops 0 0K 4K 78643K 19 0 iov 0 0K 12K 78643K 8 0 mount 1 1K 1K 78643K 1 0 vnodes 1223 77K 77K 78643K 1282 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 0K 78643K 16 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 195K 288K 78643K 12938 0 file desc 4 9K 25K 78643K 74 0 proc 48 38K 54K 78643K 364 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 3 0 in_multi 33 2K 2K 78643K 35 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 183 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 23K 23K 78643K 1009 0 UVM aobj 3 2K 2K 78643K 3 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 4 0 NDP 6 0K 0K 78643K 10 0 temp 68 3850K 3914K 78643K 1933 0 kqueue 3 4K 4K 78643K 3 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 23 0 21 1 0 1 1 0 8 0 rtentry 112 45 0 1 2 0 2 2 0 8 0 unpcb 120 27 0 19 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 663 0 663 1 1 0 1 0 8 0 tcpcb 544 20 0 16 1 0 1 1 0 8 0 inpcb 296 50 0 43 1 0 1 1 0 8 0 nd6 48 6 0 0 1 0 1 1 0 8 0 pfrktable 1344 3 0 1 1 0 1 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 188 0 0 12 0 12 12 0 8 0 art_table 32 189 0 0 2 0 2 2 0 8 0 art_node 16 44 0 4 1 0 1 1 0 8 0 sysvmsgpl 40 4 0 4 1 1 0 1 0 8 0 semapl 112 14 0 4 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1466 0 68 88 0 88 88 0 8 0 ffsino 240 1466 0 68 83 0 83 83 0 8 0 nchpl 144 1748 0 147 60 0 60 60 0 8 0 uvmvnodes 72 1569 0 0 29 0 29 29 0 8 0 vnodes 208 1569 0 0 83 0 83 83 0 8 0 namei 1024 4393 0 4393 3 2 1 1 0 8 1 pfiaddrpl 120 2 0 0 1 0 1 1 0 8 0 scxspl 192 5031 0 5031 2 1 1 1 0 8 1 plimitpl 152 18 0 11 1 0 1 1 0 8 0 sigapl 424 260 0 233 4 0 4 4 0 8 0 futexpl 56 908 0 908 1 1 0 1 0 8 0 knotepl 112 61 0 42 1 0 1 1 0 8 0 kqueuepl 144 2 0 0 1 0 1 1 0 8 0 pipepl 272 76 0 66 1 0 1 1 0 8 0 fdescpl 432 246 0 233 2 0 2 2 0 8 0 filepl 120 1220 0 1125 4 0 4 4 0 8 1 lockfpl 104 16 0 15 1 0 1 1 0 8 0 lockfspl 48 7 0 6 1 0 1 1 0 8 0 sessionpl 112 17 0 7 1 0 1 1 0 8 0 pgrppl 48 17 0 7 1 0 1 1 0 8 0 ucredpl 96 85 0 78 1 0 1 1 0 8 0 zombiepl 144 233 0 233 2 1 1 1 0 8 1 processpl 928 260 0 233 4 0 4 4 0 8 0 procpl 624 310 0 276 4 1 3 4 0 8 0 sockpl 400 100 0 83 3 1 2 3 0 8 0 mcl4k 4096 9 0 9 2 2 0 1 0 8 0 mcl2k 2048 90921 0 90864 23 12 11 19 0 8 2 mtagpl 96 6 0 2 2 1 1 1 0 8 0 mbufpl 256 143842 0 143735 15 7 8 12 0 8 0 bufpl 280 3329 0 125 229 0 229 229 0 8 0 anonpl 16 40228 0 24221 71 2 69 69 0 107 0 amapchunkpl 152 1220 0 1077 7 0 7 7 0 158 0 amappl16 192 1168 0 255 47 1 46 47 0 8 0 amappl15 184 1 0 0 1 0 1 1 0 8 0 amappl14 176 71 0 63 1 0 1 1 0 8 0 amappl13 168 26 0 23 1 0 1 1 0 8 0 amappl12 160 7 0 7 2 2 0 1 0 8 0 amappl11 152 62 0 52 1 0 1 1 0 8 0 amappl10 144 15 0 7 1 0 1 1 0 8 0 amappl9 136 375 0 373 1 0 1 1 0 8 0 amappl8 128 327 0 288 2 0 2 2 0 8 0 amappl7 120 108 0 95 1 0 1 1 0 8 0 amappl6 112 41 0 35 1 0 1 1 0 8 0 amappl5 104 176 0 166 1 0 1 1 0 8 0 amappl4 96 437 0 410 1 0 1 1 0 8 0 amappl3 88 121 0 115 1 0 1 1 0 8 0 amappl2 80 1140 0 1085 2 0 2 2 0 8 0 amappl1 72 14321 0 13920 24 15 9 17 0 8 0 amappl 80 535 0 495 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 2 0 0 1 0 1 1 0 8 0 uaddrrnd 24 246 0 233 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 246 0 233 1 0 1 1 0 8 0 vmmpekpl 168 5770 0 5742 2 0 2 2 0 8 0 vmmpepl 168 37413 0 35503 130 12 118 121 0 357 29 vmsppl 272 245 0 233 2 1 1 2 0 8 0 pdppl 4096 498 0 466 6 1 5 6 0 8 0 pvpl 32 133624 0 114745 163 2 161 162 0 265 0 pmappl 200 245 0 233 1 0 1 1 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 250 0 29 8 1 7 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(ffffffff823f4ff4) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac3760) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac3760) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da6e4b8,9,fffffd8059168b00,0,0,ffff80001d71c010) at tcp_usrreq+0xa54 sosend(fffffd805da6e4b8,0,ffff80001d6cdbb8,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d71c010,4,ffff80001d6cdbb8,0,ffff80001d6cdca0) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d71c010,ffff80001d6cdc50,ffff80001d6cdca0) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d6cdd20) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffee4d0, 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(ffffffff823f4ff4) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac3760) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac3760) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da6e4b8,9,fffffd8059168b00,0,0,ffff80001d71c010) at tcp_usrreq+0xa54 sosend(fffffd805da6e4b8,0,ffff80001d6cdbb8,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d71c010,4,ffff80001d6cdbb8,0,ffff80001d6cdca0) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d71c010,ffff80001d6cdc50,ffff80001d6cdca0) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d6cdd20) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffee4d0, count: -9