login: panic: tcp_output: template len != hdrlen - optlen Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *501600 67626 0 0x2 0x4000000 0 syz-fuzzer db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff82413b0c) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ad9aa0) at tcp_output+0x2c4b tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ad9aa0) at tcp_output+0x2c4b sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd806eaef328,9,fffffd806b0fd200,0,0,ffff800020ddc758) at tcp_usrreq+0xa55 sosend(fffffd806eaef328,0,ffff800020ea5778,0,0,80) at sosend+0x671 sys/kern/uipc_socket.c:555 dofilewritev(ffff800020ddc758,3,ffff800020ea5778,0,ffff800020ea5860) at dofilewritev+0x1b6 sys/kern/sys_generic.c:365 sys_write(ffff800020ddc758,ffff800020ea5810,ffff800020ea5860) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff800020ea58e0) at syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800020ea58e0) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc0003ad3c8, 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{0}> ddb{0}> set $lines = 0 ddb{0}> set $maxwidth = 0 ddb{0}> show panic tcp_output: template len != hdrlen - optlen ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff82413b0c) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ad9aa0) at tcp_output+0x2c4b tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ad9aa0) at tcp_output+0x2c4b sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd806eaef328,9,fffffd806b0fd200,0,0,ffff800020ddc758) at tcp_usrreq+0xa55 sosend(fffffd806eaef328,0,ffff800020ea5778,0,0,80) at sosend+0x671 sys/kern/uipc_socket.c:555 dofilewritev(ffff800020ddc758,3,ffff800020ea5778,0,ffff800020ea5860) at dofilewritev+0x1b6 sys/kern/sys_generic.c:365 sys_write(ffff800020ddc758,ffff800020ea5810,ffff800020ea5860) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff800020ea58e0) at syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800020ea58e0) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc0003ad3c8, count: -9 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800020ea52e0 rbx 0xffff800020ea5390 rdx 0x8b rcx 0x2 rax 0x1 r8 0xffffffff8151256f kprintf+0x16f r9 0x1 r10 0x2 r11 0x19c61eecfc059e22 r12 0x3000000008 r13 0xffff800020ea52f0 r14 0x100 r15 0x1 rip 0xffffffff81f0cec8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020ea52d0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-fuzzer) pid=501600 stat=onproc flags process=2 proc=4000000 pri=32, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff800020ddc278,0xffff800020ddc4f8 process=0xffff800020e38f78 user=0xffff800020ea0000, vmspace=0xfffffd806e904a18 estcpu=0, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 891 28197 67626 0 3 0x82 piperd syz-executor.1 58358 369034 67626 0 3 0x82 wait syz-executor.0 67626 267749 26839 0 3 0x82 thrsleep syz-fuzzer 67626 389314 26839 0 3 0x4000082 nanosleep syz-fuzzer 67626 280571 26839 0 3 0x4000082 thrsleep syz-fuzzer 67626 153417 26839 0 3 0x4000082 thrsleep syz-fuzzer 67626 83419 26839 0 3 0x4000082 kqread syz-fuzzer 67626 47657 26839 0 3 0x4000082 thrsleep syz-fuzzer 67626 417981 26839 0 3 0x4000082 thrsleep syz-fuzzer *67626 501600 26839 0 7 0x4000002 syz-fuzzer 67626 113650 26839 0 3 0x4000082 thrsleep syz-fuzzer 67626 205767 26839 0 3 0x4000082 thrsleep syz-fuzzer 26839 171876 31672 0 3 0x10008a pause ksh 31672 153393 49358 0 3 0x92 select sshd 54324 4835 1 0 3 0x100083 ttyin getty 49358 215784 1 0 3 0x80 select sshd 60184 226457 26356 74 3 0x100092 bpf pflogd 26356 497129 1 0 3 0x80 netio pflogd 17082 126721 25941 73 3 0x100090 kqread syslogd 25941 75997 1 0 3 0x100082 netio syslogd 4084 153410 1 77 3 0x100090 poll dhclient 24863 437427 1 0 3 0x80 poll dhclient 56157 146422 0 0 3 0x14200 bored smr 89036 152569 0 0 3 0x14200 pgzero zerothread 22496 142301 0 0 3 0x14200 aiodoned aiodoned 31628 181272 0 0 3 0x14200 syncer update 24513 400282 0 0 3 0x14200 cleaner cleaner 11518 292518 0 0 3 0x14200 reaper reaper 92801 56355 0 0 3 0x14200 pgdaemon pagedaemon 56701 311440 0 0 3 0x14200 bored crynlk 46316 145816 0 0 3 0x14200 bored crypto 31026 337774 0 0 3 0x40014200 acpi0 acpi0 62070 501315 0 0 7 0x40014200 idle1 61968 38224 0 0 3 0x14200 bored softnet 74785 486624 0 0 3 0x14200 bored systqmp 16406 82971 0 0 3 0x14200 bored systq 11836 82221 0 0 3 0x40014200 bored softclock 23037 159700 0 0 3 0x40014200 idle0 1 315231 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 67626 (syz-fuzzer) thread 0xffff800020ddc758 (501600) exclusive rwlock netlock r = 0 (0xffffffff8276eb48) #0 witness_lock+0x4c7 stacktrace_save sys/sys/stacktrace.h:36 [inline] #0 witness_lock+0x4c7 sys/kern/subr_witness.c:1164 #1 solock+0x5a sys/kern/uipc_socket2.c:282 #2 sosend+0x559 sys/kern/uipc_socket.c:543 #3 dofilewritev+0x1b6 sys/kern/sys_generic.c:365 #4 sys_write+0x83 sys/kern/sys_generic.c:285 #5 syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:102 [inline] #5 syscall+0x4a4 sys/arch/amd64/amd64/trap.c:570 #6 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 9494 6407K 6660K 78643K 10667 0 pcb 13 8K 8K 78643K 39 0 rtable 100 3K 5K 78643K 274 0 ifaddr 56 11K 12K 78643K 94 0 counters 43 33K 34K 78643K 55 0 ioctlops 0 0K 4K 78643K 1476 0 iov 0 0K 2K 78643K 8 0 mount 1 1K 1K 78643K 1 0 vnodes 1218 77K 77K 78643K 1251 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 1K 1K 78643K 2 0 sem 10 0K 0K 78643K 14 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1824 197K 290K 78643K 13058 0 file desc 5 13K 25K 78643K 83 0 proc 61 63K 95K 78643K 440 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 26 0 in_multi 29 1K 2K 78643K 46 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 31 148K 148K 78643K 31 0 exec 0 0K 1K 78643K 211 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 112 22K 38K 78643K 1180 0 UVM aobj 4 2K 2K 78643K 4 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 12 0 NDP 9 0K 0K 78643K 20 0 temp 83 3860K 3924K 78643K 2881 0 kqueue 3 4K 12K 78643K 12 0 SYN cache 2 16K 16K 78643K 2 0 ddb{0}> 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 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 23 0 21 1 0 1 1 0 8 0 rtentry 112 51 0 10 2 0 2 2 0 8 0 unpcb 120 77 0 67 1 0 1 1 0 8 0 syncache 264 6 0 6 2 2 0 1 0 8 0 tcpqe 32 590 0 590 1 1 0 1 0 8 0 tcpcb 544 42 0 38 1 0 1 1 0 8 0 inpcb 296 143 0 136 2 1 1 2 0 8 0 nd6 48 8 0 4 1 0 1 1 0 8 0 pffrag 232 1 0 0 1 0 1 1 0 482 0 pffrnode 88 1 0 0 1 0 1 1 0 8 0 pffrent 40 2 0 1 1 0 1 1 0 8 0 pfosfp 40 846 0 423 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfrktable 1344 9 0 9 1 1 0 1 0 8 0 pfstitem 24 15 0 3 1 0 1 1 0 8 0 pfstkey 112 15 0 3 1 0 1 1 0 8 0 pfstate 328 15 0 3 2 0 2 2 0 8 0 pfrule 1360 24 0 19 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 212 0 40 12 1 11 12 0 8 0 art_table 32 213 0 40 2 0 2 2 0 8 0 art_node 16 50 0 12 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 10 0 2 1 0 1 1 0 8 0 shmpl 112 2 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1511 0 106 89 0 89 89 0 8 0 ffsino 272 1511 0 106 95 1 94 94 0 8 0 nchpl 144 1804 0 193 60 0 60 60 0 8 0 uvmvnodes 72 1567 0 0 29 0 29 29 0 8 0 vnodes 208 1567 0 0 83 0 83 83 0 8 0 namei 1024 4809 0 4809 2 2 0 1 0 8 0 percpumem 16 38 0 6 1 0 1 1 0 8 0 pfiaddrpl 120 3 0 3 1 1 0 1 0 8 0 scxspl 192 5376 0 5376 8 4 4 7 0 8 4 plimitpl 152 15 0 7 1 0 1 1 0 8 0 sigapl 424 298 0 267 4 0 4 4 0 8 0 futexpl 56 975 0 975 1 1 0 1 0 8 0 knotepl 112 76 0 57 1 0 1 1 0 8 0 kqueuepl 144 18 0 16 1 0 1 1 0 8 0 pipelkpl 48 85 0 75 1 0 1 1 0 8 0 pipepl 120 170 0 151 1 0 1 1 0 8 0 fdescpl 496 283 0 267 3 0 3 3 0 8 0 filepl 152 1554 0 1451 6 1 5 5 0 8 0 lockfpl 104 79 0 78 1 0 1 1 0 8 0 lockfspl 48 25 0 24 1 0 1 1 0 8 0 sessionpl 112 18 0 7 1 0 1 1 0 8 0 pgrppl 48 18 0 7 1 0 1 1 0 8 0 ucredpl 96 145 0 136 1 0 1 1 0 8 0 zombiepl 144 268 0 267 2 1 1 1 0 8 0 processpl 984 298 0 267 6 1 5 5 0 8 0 procpl 624 422 0 382 4 0 4 4 0 8 0 sockpl 400 243 0 224 5 2 3 4 0 8 1 mcl64k 65536 3 0 0 1 0 1 1 0 8 0 mcl12k 12288 2 0 0 1 0 1 1 0 8 0 mcl9k 9216 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 1 0 0 1 0 1 1 0 8 0 mcl4k 4096 3 0 0 1 0 1 1 0 8 0 mcl2k 2048 210 0 0 26 0 26 26 0 8 0 mtagpl 96 6 0 0 1 0 1 1 0 8 0 mbufpl 256 222 0 0 14 0 14 14 0 8 0 bufpl 280 3446 0 132 237 0 237 237 0 8 0 anonpl 16 41419 0 26288 63 2 61 62 0 124 0 amapchunkpl 152 1969 0 1810 20 2 18 20 0 158 11 amappl16 192 1171 0 364 41 0 41 41 0 8 0 amappl15 184 1 0 0 1 0 1 1 0 8 0 amappl14 176 25 0 20 1 0 1 1 0 8 0 amappl13 168 30 0 26 1 0 1 1 0 8 0 amappl12 160 8 0 6 1 0 1 1 0 8 0 amappl11 152 62 0 47 1 0 1 1 0 8 0 amappl10 144 68 0 60 1 0 1 1 0 8 0 amappl9 136 385 0 384 1 0 1 1 0 8 0 amappl8 128 325 0 303 1 0 1 1 0 8 0 amappl7 120 139 0 127 1 0 1 1 0 8 0 amappl6 112 23 0 19 2 1 1 1 0 8 0 amappl5 104 179 0 164 1 0 1 1 0 8 0 amappl4 96 490 0 458 2 1 1 2 0 8 0 amappl3 88 105 0 97 1 0 1 1 0 8 0 amappl2 80 1288 0 1220 2 0 2 2 0 8 0 amappl1 72 16426 0 15971 23 13 10 18 0 8 0 amappl 80 673 0 625 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 3 0 0 1 0 1 1 0 8 0 uaddrrnd 24 283 0 267 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 283 0 267 1 0 1 1 0 8 0 vmmpekpl 168 6279 0 6248 2 0 2 2 0 8 0 vmmpepl 168 41355 0 39393 117 8 109 113 0 357 22 vmsppl 368 282 0 267 2 0 2 2 0 8 0 pdppl 4096 573 0 534 7 1 6 6 0 8 0 pvpl 32 146568 0 128300 150 1 149 150 0 265 0 pmappl 232 282 0 267 2 1 1 2 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 268 0 10 8 0 8 8 0 8 0 ddb{0}> machine ddbcpu 0 Invalid cpu 0 ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff82413b0c) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ad9aa0) at tcp_output+0x2c4b tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ad9aa0) at tcp_output+0x2c4b sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd806eaef328,9,fffffd806b0fd200,0,0,ffff800020ddc758) at tcp_usrreq+0xa55 sosend(fffffd806eaef328,0,ffff800020ea5778,0,0,80) at sosend+0x671 sys/kern/uipc_socket.c:555 dofilewritev(ffff800020ddc758,3,ffff800020ea5778,0,ffff800020ea5860) at dofilewritev+0x1b6 sys/kern/sys_generic.c:365 sys_write(ffff800020ddc758,ffff800020ea5810,ffff800020ea5860) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff800020ea58e0) at syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800020ea58e0) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc0003ad3c8, count: -9 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp x86_ipi_db(ffff800020d70ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:352 x86_ipi_handler() at x86_ipi_handler+0xc6 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 acpicpu_idle() at acpicpu_idle+0x331 sys/dev/acpi/acpicpu.c:1187 sched_idle(ffff800020d70ff0) at sched_idle+0x3f7 sys/kern/kern_sched.c:178 end trace frame: 0x0, count: 10 ddb{1}> trace x86_ipi_db(ffff800020d70ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:352 x86_ipi_handler() at x86_ipi_handler+0xc6 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 acpicpu_idle() at acpicpu_idle+0x331 sys/dev/acpi/acpicpu.c:1187 sched_idle(ffff800020d70ff0) at sched_idle+0x3f7 sys/kern/kern_sched.c:178 end trace frame: 0x0, count: -5