login: panic: tcp_output: template len != hdrlen - optlen Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *360801 94107 0 0x2 0x4000000 0 syz-fuzzer db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff824104ac) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ad9880) at tcp_output+0x2c4b tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ad9880) at tcp_output+0x2c4b sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd806eadde18,9,fffffd807f01f300,0,0,ffff800020ddc278) at tcp_usrreq+0xa55 sosend(fffffd806eadde18,0,ffff800020eb3368,0,0,80) at sosend+0x671 sys/kern/uipc_socket.c:555 dofilewritev(ffff800020ddc278,3,ffff800020eb3368,0,ffff800020eb3450) at dofilewritev+0x1b6 sys/kern/sys_generic.c:365 sys_write(ffff800020ddc278,ffff800020eb3400,ffff800020eb3450) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff800020eb34d0) at syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800020eb34d0) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc0003a73c8, 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(ffffffff824104ac) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ad9880) at tcp_output+0x2c4b tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ad9880) at tcp_output+0x2c4b sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd806eadde18,9,fffffd807f01f300,0,0,ffff800020ddc278) at tcp_usrreq+0xa55 sosend(fffffd806eadde18,0,ffff800020eb3368,0,0,80) at sosend+0x671 sys/kern/uipc_socket.c:555 dofilewritev(ffff800020ddc278,3,ffff800020eb3368,0,ffff800020eb3450) at dofilewritev+0x1b6 sys/kern/sys_generic.c:365 sys_write(ffff800020ddc278,ffff800020eb3400,ffff800020eb3450) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff800020eb34d0) at syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800020eb34d0) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc0003a73c8, count: -9 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800020eb2ed0 rbx 0xffff800020eb2f80 rdx 0x8b rcx 0x2 rax 0x1 r8 0xffffffff818bab4f kprintf+0x16f r9 0x1 r10 0x2 r11 0xeea3ec4800fc539c r12 0x3000000008 r13 0xffff800020eb2ee0 r14 0x100 r15 0x1 rip 0xffffffff820dd498 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020eb2ec0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-fuzzer) pid=360801 stat=onproc flags process=2 proc=4000000 pri=32, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff800020ddc4e8,0xffff800020ddc768 process=0xffff800020e39350 user=0xffff800020eae000, vmspace=0xfffffd806e8f0b88 estcpu=0, cpticks=0, pctcpu=0.13 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 73204 5438 1 0 3 0x100083 ttyin getty 33938 256366 0 0 3 0x14280 nfsidl nfsio 71239 493540 0 0 3 0x14280 nfsidl nfsio 58637 13817 0 0 3 0x14280 nfsidl nfsio 91622 256871 0 0 3 0x14280 nfsidl nfsio 40570 472540 0 0 3 0x14280 nfsidl nfsio 35258 94198 0 0 3 0x14280 nfsidl nfsio 28357 46877 0 0 3 0x14280 nfsidl nfsio 57467 205847 0 0 3 0x14280 nfsidl nfsio 32247 480558 0 0 3 0x14280 nfsidl nfsio 2746 340085 0 0 3 0x14280 nfsidl nfsio 9412 156730 0 0 3 0x14280 nfsidl nfsio 37639 207779 0 0 3 0x14280 nfsidl nfsio 8102 144308 0 0 3 0x14280 nfsidl nfsio 88417 268235 0 0 3 0x14280 nfsidl nfsio 77152 203076 0 0 3 0x14280 nfsidl nfsio 88321 467026 0 0 3 0x14280 nfsidl nfsio 1893 446135 0 0 3 0x14280 nfsidl nfsio 25438 284255 0 0 3 0x14280 nfsidl nfsio 33608 339627 0 0 3 0x14280 nfsidl nfsio 87309 69773 0 0 3 0x14280 nfsidl nfsio 69733 149366 0 0 3 0x14200 bored sosplice 65250 126018 94107 0 3 0x82 piperd syz-executor.1 75882 32984 94107 0 3 0x82 wait syz-executor.0 94107 69778 77834 0 3 0x82 kqread syz-fuzzer 94107 370491 77834 0 3 0x4000082 nanosleep syz-fuzzer 94107 288123 77834 0 3 0x4000082 thrsleep syz-fuzzer 94107 267864 77834 0 3 0x4000082 thrsleep syz-fuzzer 94107 100732 77834 0 3 0x4000082 thrsleep syz-fuzzer 94107 230355 77834 0 3 0x4000082 thrsleep syz-fuzzer 94107 337983 77834 0 3 0x4000082 thrsleep syz-fuzzer 94107 180810 77834 0 3 0x4000082 thrsleep syz-fuzzer *94107 360801 77834 0 7 0x4000002 syz-fuzzer 94107 8976 77834 0 3 0x4000082 thrsleep syz-fuzzer 77834 498055 96707 0 3 0x10008a pause ksh 96707 343973 31423 0 3 0x92 select sshd 31423 438956 1 0 3 0x80 select sshd 2067 398225 3349 74 3 0x100092 bpf pflogd 3349 278935 1 0 3 0x80 netio pflogd 72291 172926 3456 73 3 0x100090 kqread syslogd 3456 312962 1 0 3 0x100082 netio syslogd 30588 346794 1 77 3 0x100090 poll dhclient 67107 27025 1 0 3 0x80 poll dhclient 50044 163464 0 0 3 0x14200 bored smr 13168 86699 0 0 3 0x14200 pgzero zerothread 55254 10526 0 0 3 0x14200 aiodoned aiodoned 35539 500921 0 0 3 0x14200 syncer update 72103 178790 0 0 3 0x14200 cleaner cleaner 19475 257163 0 0 3 0x14200 reaper reaper 18899 295516 0 0 3 0x14200 pgdaemon pagedaemon 1496 467133 0 0 3 0x14200 bored crynlk 84660 35936 0 0 3 0x14200 bored crypto 28227 247852 0 0 3 0x40014200 acpi0 acpi0 32125 253530 0 0 7 0x40014200 idle1 52732 279868 0 0 3 0x14200 bored softnet 23640 148186 0 0 3 0x14200 bored systqmp 27545 449315 0 0 3 0x14200 bored systq 55687 424014 0 0 3 0x40014200 bored softclock 23651 376849 0 0 3 0x40014200 idle0 1 199452 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 94107 (syz-fuzzer) thread 0xffff800020ddc278 (360801) exclusive rwlock netlock r = 0 (0xffffffff827578e8) #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 9522 6416K 6675K 78643K 11068 0 pcb 13 8K 8K 78643K 208 0 rtable 117 6K 6K 78643K 374 0 ifaddr 71 14K 15K 78643K 144 0 sysctl 2 0K 0K 78643K 2 0 counters 43 33K 34K 78643K 63 0 ioctlops 0 0K 4K 78643K 1538 0 iov 0 0K 28K 78643K 271 0 mount 1 1K 1K 78643K 1 0 vnodes 1214 76K 77K 78643K 1412 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 9 0 VM map 2 1K 1K 78643K 2 0 sem 12 0K 0K 78643K 52 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1824 197K 290K 78643K 13058 0 file desc 5 13K 25K 78643K 476 0 proc 62 63K 95K 78643K 487 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 38 0 in_multi 42 2K 2K 78643K 121 0 ether_multi 1 0K 0K 78643K 12 0 mrt 0 0K 0K 78643K 4 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 109 493K 493K 78643K 109 0 exec 0 0K 1K 78643K 347 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 137 39K 40K 78643K 2479 0 UVM aobj 19 2K 2K 78643K 21 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 86 0 NDP 11 0K 0K 78643K 31 0 temp 128 3868K 3932K 78643K 3676 0 kqueue 3 4K 10K 78643K 15 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 7 0 0 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 42 0 40 1 0 1 1 0 8 0 rtentry 112 70 0 26 2 0 2 2 0 8 0 unpcb 120 593 0 581 1 0 1 1 0 8 0 syncache 264 10 0 10 3 3 0 1 0 8 0 tcpqe 32 732 0 732 1 1 0 1 0 8 0 tcpcb 544 252 0 248 1 0 1 1 0 8 0 inpcb 296 770 0 763 5 3 2 2 0 8 1 rttmr 72 2 0 2 2 2 0 1 0 8 0 nd6 48 16 0 12 1 0 1 1 0 8 0 ppxss 1128 2 0 2 1 1 0 1 0 8 0 pffrag 232 1 0 1 1 1 0 1 0 482 0 pffrnode 88 1 0 1 1 1 0 1 0 8 0 pffrent 40 2 0 2 1 1 0 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 10 0 7 1 0 1 1 0 8 0 pfstitem 24 55 0 28 1 0 1 1 0 8 0 pfstkey 112 55 0 28 1 0 1 1 0 8 0 pfstate 328 55 0 28 3 0 3 3 0 8 0 pfrule 1360 28 0 17 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 271 0 88 14 1 13 13 0 8 1 art_table 32 272 0 88 2 0 2 2 0 8 0 art_node 16 69 0 28 1 0 1 1 0 8 0 sysvmsgpl 40 1 0 0 1 0 1 1 0 8 0 semapl 112 50 0 40 1 0 1 1 0 8 0 shmpl 112 19 0 2 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 2056 0 652 89 0 89 89 0 8 0 ffsino 272 2056 0 652 96 1 95 95 0 8 0 nchpl 144 3172 0 1571 60 0 60 60 0 8 0 uvmvnodes 72 2200 0 0 40 0 40 40 0 8 0 vnodes 208 2200 0 0 116 0 116 116 0 8 0 namei 1024 8714 0 8714 4 3 1 1 0 8 1 percpumem 16 42 0 10 1 0 1 1 0 8 0 vcpupl 1984 2 0 0 1 0 1 1 0 8 0 vmpool 560 2 0 0 1 0 1 1 0 8 0 pfiaddrpl 120 4 0 2 1 0 1 1 0 8 0 scxspl 192 8341 0 8341 8 7 1 7 0 8 1 plimitpl 152 33 0 25 1 0 1 1 0 8 0 sigapl 424 714 0 662 6 0 6 6 0 8 0 futexpl 56 6682 0 6682 3 2 1 1 0 8 1 knotepl 112 75 0 56 1 0 1 1 0 8 0 kqueuepl 144 50 0 48 1 0 1 1 0 8 0 pipelkpl 48 115 0 104 1 0 1 1 0 8 0 pipepl 120 230 0 209 1 0 1 1 0 8 0 fdescpl 496 678 0 662 3 0 3 3 0 8 0 filepl 152 4668 0 4546 7 2 5 6 0 8 0 lockfpl 104 81 0 80 1 0 1 1 0 8 0 lockfspl 48 34 0 33 1 0 1 1 0 8 0 sessionpl 112 20 0 9 1 0 1 1 0 8 0 pgrppl 48 24 0 13 1 0 1 1 0 8 0 ucredpl 96 1160 0 1150 1 0 1 1 0 8 0 zombiepl 144 663 0 662 2 1 1 1 0 8 0 processpl 984 714 0 662 8 1 7 7 0 8 0 procpl 624 1689 0 1628 6 0 6 6 0 8 0 sosppl 128 5 0 5 1 1 0 1 0 8 0 sockpl 400 1410 0 1389 9 6 3 4 0 8 0 mcl64k 65536 11 0 0 2 0 2 2 0 8 0 mcl16k 16384 1 0 0 1 0 1 1 0 8 0 mcl12k 12288 23 0 0 2 0 2 2 0 8 0 mcl9k 9216 7 0 0 1 0 1 1 0 8 0 mcl8k 8192 9 0 0 2 0 2 2 0 8 0 mcl4k 4096 5 0 0 1 0 1 1 0 8 0 mcl2k2 2112 2 0 0 1 0 1 1 0 8 0 mcl2k 2048 177 0 0 22 0 22 22 0 8 0 mtagpl 96 38 0 0 1 0 1 1 0 8 0 mbufpl 256 277 0 0 14 0 14 14 0 8 0 bufpl 280 4606 0 134 320 0 320 320 0 8 0 anonpl 16 69463 0 53737 68 3 65 65 0 124 1 amapchunkpl 152 4125 0 3994 22 13 9 19 0 158 2 amappl16 192 2788 0 1918 47 2 45 45 0 8 1 amappl15 184 235 0 232 1 0 1 1 0 8 0 amappl14 176 28 0 22 1 0 1 1 0 8 0 amappl13 168 447 0 442 1 0 1 1 0 8 0 amappl12 160 10 0 8 2 1 1 1 0 8 0 amappl11 152 59 0 44 1 0 1 1 0 8 0 amappl10 144 18 0 13 1 0 1 1 0 8 0 amappl9 136 393 0 392 1 0 1 1 0 8 0 amappl8 128 381 0 338 2 0 2 2 0 8 0 amappl7 120 118 0 108 1 0 1 1 0 8 0 amappl6 112 25 0 20 1 0 1 1 0 8 0 amappl5 104 367 0 350 1 0 1 1 0 8 0 amappl4 96 709 0 677 1 0 1 1 0 8 0 amappl3 88 402 0 396 1 0 1 1 0 8 0 amappl2 80 4760 0 4689 2 0 2 2 0 8 0 amappl1 72 24040 0 23579 23 13 10 18 0 8 0 amappl 80 1928 0 1883 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 20 0 2 1 0 1 1 0 8 0 uaddrrnd 24 680 0 662 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 680 0 662 1 0 1 1 0 8 0 vmmpekpl 168 9055 0 9019 2 0 2 2 0 8 0 vmmpepl 168 88245 0 86186 124 29 95 114 0 357 1 vmsppl 368 679 0 662 2 0 2 2 0 8 0 pdppl 4096 1367 0 1326 7 1 6 6 0 8 0 pvpl 32 225759 0 206551 174 14 160 160 0 265 4 pmappl 232 679 0 662 3 1 2 2 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 278 0 15 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(ffffffff824104ac) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ad9880) at tcp_output+0x2c4b tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ad9880) at tcp_output+0x2c4b sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd806eadde18,9,fffffd807f01f300,0,0,ffff800020ddc278) at tcp_usrreq+0xa55 sosend(fffffd806eadde18,0,ffff800020eb3368,0,0,80) at sosend+0x671 sys/kern/uipc_socket.c:555 dofilewritev(ffff800020ddc278,3,ffff800020eb3368,0,ffff800020eb3450) at dofilewritev+0x1b6 sys/kern/sys_generic.c:365 sys_write(ffff800020ddc278,ffff800020eb3400,ffff800020eb3450) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff800020eb34d0) at syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800020eb34d0) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc0003a73c8, 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