panic: tcp_output: template len != hdrlen - optlen Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *247588 96782 0 0x2 0x4000000 0 syz-fuzzer db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff823ec1a3) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac1880) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac1880) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da717d8,9,fffffd805945ee00,0,0,ffff80001d718600) at tcp_usrreq+0xa54 sosend(fffffd805da717d8,0,ffff80001d764468,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d718600,3,ffff80001d764468,0,ffff80001d764550) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d718600,ffff80001d764500,ffff80001d764550) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d7645d0) 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(ffffffff823ec1a3) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac1880) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac1880) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da717d8,9,fffffd805945ee00,0,0,ffff80001d718600) at tcp_usrreq+0xa54 sosend(fffffd805da717d8,0,ffff80001d764468,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d718600,3,ffff80001d764468,0,ffff80001d764550) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d718600,ffff80001d764500,ffff80001d764550) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d7645d0) 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 0xffff80001d763fd0 rbx 0xffff80001d764080 rdx 0x2 rcx 0 rax 0x1 r8 0xffffffff8157292f kprintf+0x15f r9 0x1 r10 0x2 r11 0x9db847cb38e0d467 r12 0x3000000008 r13 0xffff80001d763fe0 r14 0x100 r15 0x1 rip 0xffffffff81810268 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001d763fc0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-fuzzer) pid=247588 stat=onproc flags process=2 proc=4000000 pri=32, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff80001d717eb0,0xffff80001d6aa128 process=0xffff8000ffff8e78 user=0xffff80001d75f000, vmspace=0xfffffd806bc09770 estcpu=1, cpticks=0, pctcpu=0.73 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 50520 81986 89654 0 3 0x80 nanosleep syz-executor.0 50520 16371 89654 0 3 0x4000080 pipewr syz-executor.0 50520 465921 89654 0 3 0x4000080 fsleep syz-executor.0 8257 280767 78739 0 3 0x90 nanosleep syz-executor.1 8257 353838 78739 0 3 0x4000090 pipewr syz-executor.1 8257 159435 78739 0 3 0x4000090 fsleep syz-executor.1 78739 315331 96782 0 3 0x82 nanosleep syz-executor.1 76948 51824 0 0 3 0x14200 acct acct 89654 425268 96782 0 3 0x82 nanosleep syz-executor.0 96782 346405 25513 0 3 0x82 thrsleep syz-fuzzer 96782 43664 25513 0 2 0x4000002 syz-fuzzer 96782 464316 25513 0 3 0x4000082 kqread syz-fuzzer 96782 75322 25513 0 3 0x4000082 thrsleep syz-fuzzer 96782 282753 25513 0 2 0x4000002 syz-fuzzer *96782 247588 25513 0 7 0x4000002 syz-fuzzer 96782 290358 25513 0 3 0x4000082 thrsleep syz-fuzzer 25513 57662 73303 0 3 0x10008a pause ksh 73303 72339 34587 0 3 0x92 select sshd 54817 174634 1 0 3 0x100083 ttyin getty 34587 35224 1 0 3 0x80 select sshd 95824 288615 25695 73 3 0x100090 kqread syslogd 25695 122190 1 0 3 0x100082 netio syslogd 69488 128047 1 77 3 0x100090 poll dhclient 44814 78738 1 0 3 0x80 poll dhclient 77946 111550 0 0 3 0x14200 bored smr 73938 256924 0 0 3 0x14200 pgzero zerothread 76473 4763 0 0 3 0x14200 aiodoned aiodoned 67796 423197 0 0 3 0x14200 syncer update 1322 429763 0 0 3 0x14200 cleaner cleaner 90719 397120 0 0 3 0x14200 reaper reaper 51594 323076 0 0 3 0x14200 pgdaemon pagedaemon 62720 59248 0 0 3 0x14200 bored crynlk 71816 144649 0 0 3 0x14200 bored crypto 56280 363109 0 0 3 0x40014200 acpi0 acpi0 64337 355567 0 0 3 0x14200 bored softnet 6502 443131 0 0 3 0x14200 bored systqmp 3931 97119 0 0 3 0x14200 bored systq 35383 58860 0 0 3 0x40014200 bored softclock 50764 479292 0 0 3 0x40014200 idle0 1 356790 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 6330K 6520K 78643K 10765 0 pcb 13 8K 8K 78643K 37 0 rtable 122 7K 7K 78643K 286 0 ifaddr 54 12K 13K 78643K 80 0 counters 21 16K 16K 78643K 25 0 ioctlops 0 0K 4K 78643K 30 0 iov 0 0K 16K 78643K 14 0 mount 1 1K 1K 78643K 1 0 vnodes 1227 77K 77K 78643K 1343 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 4 0 VM map 2 0K 0K 78643K 2 0 sem 12 1K 1K 78643K 19 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1809 195K 288K 78643K 12938 0 file desc 6 17K 25K 78643K 127 0 sigio 0 0K 0K 78643K 2 0 proc 49 38K 63K 78643K 414 0 subproc 32 2K 2K 78643K 51 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 4 0 in_multi 33 2K 2K 78643K 58 0 ether_multi 1 0K 0K 78643K 3 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 37 175K 175K 78643K 37 0 exec 0 0K 1K 78643K 208 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 1168 0 UVM aobj 6 2K 2K 78643K 8 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 8 0 NDP 7 0K 0K 78643K 17 0 temp 79 3855K 3919K 78643K 2781 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 8 0 2 1 0 1 1 0 8 0 rtpcb 80 27 0 25 1 0 1 1 0 8 0 rtentry 112 60 0 16 2 0 2 2 0 8 0 unpcb 120 69 0 61 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 60 0 60 1 1 0 1 0 8 0 tcpcb 544 62 0 58 1 0 1 1 0 8 0 inpcb 296 133 0 125 2 0 2 2 0 8 1 rttmr 72 2 0 2 1 1 0 1 0 8 0 nd6 48 11 0 5 1 0 1 1 0 8 0 pfrktable 1344 11 0 3 1 0 1 1 0 8 0 pftag 88 2 0 0 1 0 1 1 0 8 0 pfrule 1360 4 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 232 0 44 12 0 12 12 0 8 0 art_table 32 233 0 44 2 0 2 2 0 8 0 art_node 16 59 0 19 1 0 1 1 0 8 0 sysvmsgpl 40 6 0 3 1 0 1 1 0 8 0 semapl 112 11 0 1 1 0 1 1 0 8 0 shmpl 112 6 0 2 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1530 0 130 88 0 88 88 0 8 0 ffsino 240 1530 0 130 83 0 83 83 0 8 0 nchpl 144 1867 0 278 60 0 60 60 0 8 0 uvmvnodes 72 1681 0 0 31 0 31 31 0 8 0 vnodes 208 1681 0 0 89 0 89 89 0 8 0 namei 1024 4870 0 4870 1 0 1 1 0 8 1 pfiaddrpl 120 6 0 0 1 0 1 1 0 8 0 scxspl 192 5585 0 5585 1 0 1 1 0 8 1 plimitpl 152 17 0 10 1 0 1 1 0 8 0 sigapl 424 311 0 281 4 0 4 4 0 8 0 futexpl 56 1652 0 1650 1 0 1 1 0 8 0 knotepl 112 77 0 58 1 0 1 1 0 8 0 kqueuepl 144 10 0 8 1 0 1 1 0 8 0 pipelkpl 16 116 0 104 1 0 1 1 0 8 0 pipepl 120 232 0 209 2 0 2 2 0 8 1 fdescpl 432 296 0 281 2 0 2 2 0 8 0 filepl 120 1636 0 1536 4 0 4 4 0 8 0 lockfpl 104 41 0 40 1 0 1 1 0 8 0 lockfspl 48 15 0 14 1 0 1 1 0 8 0 sessionpl 112 18 0 8 1 0 1 1 0 8 0 pgrppl 48 18 0 8 1 0 1 1 0 8 0 ucredpl 96 96 0 88 1 0 1 1 0 8 0 zombiepl 144 281 0 281 1 0 1 1 0 8 1 processpl 920 311 0 281 4 0 4 4 0 8 0 procpl 624 435 0 395 4 0 4 4 0 8 0 sockpl 400 229 0 211 4 0 4 4 0 8 2 mcl64k 65536 5 0 5 1 0 1 1 0 8 1 mcl16k 16384 1 0 1 1 0 1 1 0 8 1 mcl12k 12288 1 0 1 1 0 1 1 0 8 1 mcl8k 8192 4 0 4 1 0 1 1 0 8 1 mcl4k 4096 15 0 15 2 1 1 1 0 8 1 mcl2k 2048 76219 0 76166 18 8 10 17 0 8 2 mtagpl 96 7 0 4 2 1 1 1 0 8 0 mbufpl 256 121077 0 120980 12 1 11 11 0 8 1 bufpl 280 3575 0 126 247 0 247 247 0 8 0 anonpl 16 46876 0 33335 64 2 62 62 0 107 1 amapchunkpl 152 1698 0 1562 12 1 11 11 0 158 4 amappl16 192 1306 0 466 43 0 43 43 0 8 0 amappl15 184 1 0 0 1 0 1 1 0 8 0 amappl14 176 43 0 38 1 0 1 1 0 8 0 amappl13 168 42 0 38 1 0 1 1 0 8 0 amappl12 160 10 0 9 1 0 1 1 0 8 0 amappl11 152 49 0 40 1 0 1 1 0 8 0 amappl10 144 70 0 62 1 0 1 1 0 8 0 amappl9 136 366 0 365 1 0 1 1 0 8 0 amappl8 128 334 0 297 2 0 2 2 0 8 0 amappl7 120 152 0 139 1 0 1 1 0 8 0 amappl6 112 28 0 22 1 0 1 1 0 8 0 amappl5 104 253 0 241 1 0 1 1 0 8 0 amappl4 96 437 0 407 1 0 1 1 0 8 0 amappl3 88 123 0 116 1 0 1 1 0 8 0 amappl2 80 1471 0 1397 2 0 2 2 0 8 0 amappl1 72 15139 0 14705 23 13 10 17 0 8 0 amappl 80 673 0 629 2 0 2 2 0 84 1 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 7 0 2 1 0 1 1 0 8 0 uaddrrnd 24 296 0 281 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 296 0 281 1 0 1 1 0 8 0 vmmpekpl 168 6342 0 6314 2 0 2 2 0 8 0 vmmpepl 168 43161 0 41134 123 7 116 116 0 357 27 vmsppl 272 295 0 281 2 1 1 2 0 8 0 pdppl 4096 598 0 562 6 1 5 6 0 8 0 pvpl 32 151548 0 134926 151 0 151 151 0 265 6 pmappl 200 295 0 281 1 0 1 1 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 243 0 14 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(ffffffff823ec1a3) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac1880) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac1880) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da717d8,9,fffffd805945ee00,0,0,ffff80001d718600) at tcp_usrreq+0xa54 sosend(fffffd805da717d8,0,ffff80001d764468,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d718600,3,ffff80001d764468,0,ffff80001d764550) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d718600,ffff80001d764500,ffff80001d764550) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d7645d0) 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(ffffffff823ec1a3) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000ac1880) at tcp_output+0x2ad0 tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000ac1880) at tcp_output+0x2ad0 sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd805da717d8,9,fffffd805945ee00,0,0,ffff80001d718600) at tcp_usrreq+0xa54 sosend(fffffd805da717d8,0,ffff80001d764468,0,0,80) at sosend+0x669 sys/kern/uipc_socket.c:555 dofilewritev(ffff80001d718600,3,ffff80001d764468,0,ffff80001d764550) at dofilewritev+0x1ab sys/kern/sys_generic.c:365 sys_write(ffff80001d718600,ffff80001d764500,ffff80001d764550) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff80001d7645d0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc0001633c8, count: -9