panic: tcp_output: template len != hdrlen - optlen Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 374052 35843 0 0 0 1 syz-executor.1 *118643 55969 0 0x2 0x4000000 0 syz-fuzzer db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff8241850d) 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(fffffd806eae4e18,9,fffffd8072fb9700,0,0,ffff800020e41d50) at tcp_usrreq+0xa55 sosend(fffffd806eae4e18,0,ffff800020e95588,0,0,80) at sosend+0x671 sys/kern/uipc_socket.c:555 dofilewritev(ffff800020e41d50,3,ffff800020e95588,0,ffff800020e95670) at dofilewritev+0x1b6 sys/kern/sys_generic.c:365 sys_write(ffff800020e41d50,ffff800020e95620,ffff800020e95670) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff800020e956f0) at syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800020e956f0) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc0002a73c8, 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(ffffffff8241850d) 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(fffffd806eae4e18,9,fffffd8072fb9700,0,0,ffff800020e41d50) at tcp_usrreq+0xa55 sosend(fffffd806eae4e18,0,ffff800020e95588,0,0,80) at sosend+0x671 sys/kern/uipc_socket.c:555 dofilewritev(ffff800020e41d50,3,ffff800020e95588,0,ffff800020e95670) at dofilewritev+0x1b6 sys/kern/sys_generic.c:365 sys_write(ffff800020e41d50,ffff800020e95620,ffff800020e95670) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff800020e956f0) at syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800020e956f0) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc0002a73c8, count: -9 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800020e950f0 rbx 0xffff800020e951a0 rdx 0x8b rcx 0x2 rax 0x1 r8 0xffffffff81d7bbff kprintf+0x16f r9 0x1 r10 0x2 r11 0x736b6736a45a7e2c r12 0x3000000008 r13 0xffff800020e95100 r14 0x100 r15 0x1 rip 0xffffffff81e2db58 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020e950e0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-fuzzer) pid=118643 stat=onproc flags process=2 proc=4000000 pri=32, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff800020e41ae0,0xffff800020ddd878 process=0xffff800020e38ba0 user=0xffff800020e90000, vmspace=0xfffffd806e8f78a8 estcpu=0, cpticks=0, pctcpu=0.11 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 12068 181679 21451 0 2 0 syz-executor.0 12068 513806 21451 0 3 0x4000080 fsleep syz-executor.0 35843 374052 79507 0 7 0 syz-executor.1 35843 225235 79507 0 3 0x4000080 fsleep syz-executor.1 35843 10262 79507 0 3 0x4000080 fsleep syz-executor.1 35843 471219 79507 0 2 0x4000000 syz-executor.1 40355 28413 0 0 3 0x14200 bored sosplice 79507 489262 55969 0 3 0x82 nanosleep syz-executor.1 21451 55174 55969 0 3 0x82 nanosleep syz-executor.0 55969 494622 26119 0 3 0x82 thrsleep syz-fuzzer 55969 80652 26119 0 3 0x4000082 nanosleep syz-fuzzer 55969 26997 26119 0 3 0x4000082 thrsleep syz-fuzzer 55969 361008 26119 0 3 0x4000082 thrsleep syz-fuzzer *55969 118643 26119 0 7 0x4000002 syz-fuzzer 55969 272377 26119 0 3 0x4000082 thrsleep syz-fuzzer 55969 361143 26119 0 3 0x4000082 thrsleep syz-fuzzer 55969 364998 26119 0 3 0x4000082 kqread syz-fuzzer 55969 363153 26119 0 3 0x4000082 thrsleep syz-fuzzer 55969 310347 26119 0 3 0x4000082 thrsleep syz-fuzzer 26119 98150 21348 0 3 0x10008a pause ksh 21348 193770 62556 0 3 0x92 select sshd 64241 292760 1 0 3 0x100083 ttyin getty 62556 389585 1 0 3 0x80 select sshd 5917 204800 26556 74 3 0x100092 bpf pflogd 26556 404488 1 0 3 0x80 netio pflogd 95001 293469 69447 73 3 0x100090 kqread syslogd 69447 491481 1 0 3 0x100082 netio syslogd 92579 347149 1 77 3 0x100090 poll dhclient 41264 460765 1 0 3 0x80 poll dhclient 58885 306100 0 0 3 0x14200 bored smr 64171 279712 0 0 2 0x14200 zerothread 21522 414923 0 0 3 0x14200 aiodoned aiodoned 82594 102945 0 0 3 0x14200 syncer update 68405 476324 0 0 3 0x14200 cleaner cleaner 35079 247163 0 0 3 0x14200 reaper reaper 30458 26063 0 0 3 0x14200 pgdaemon pagedaemon 35867 193530 0 0 3 0x14200 bored crynlk 73261 56420 0 0 3 0x14200 bored crypto 62732 15001 0 0 3 0x40014200 acpi0 acpi0 77057 375272 0 0 3 0x40014200 idle1 97883 29813 0 0 3 0x14200 bored softnet 10915 135448 0 0 3 0x14200 bored systqmp 81001 199188 0 0 3 0x14200 bored systq 16533 502152 0 0 3 0x40014200 bored softclock 26227 261694 0 0 3 0x40014200 idle0 1 85763 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 55969 (syz-fuzzer) thread 0xffff800020e41d50 (118643) exclusive rwlock netlock r = 0 (0xffffffff82757548) #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 9496 6407K 6663K 78643K 10804 0 pcb 13 8K 8K 78643K 61 0 rtable 95 6K 6K 78643K 276 0 ifaddr 60 12K 14K 78643K 91 0 sysctl 2 0K 0K 78643K 2 0 counters 43 33K 34K 78643K 45 0 ioctlops 0 0K 4K 78643K 1505 0 iov 0 0K 16K 78643K 12 0 mount 1 1K 1K 78643K 1 0 vnodes 1223 77K 77K 78643K 1299 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 11 0K 1K 78643K 13 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1824 197K 290K 78643K 13058 0 file desc 6 17K 25K 78643K 206 0 proc 61 63K 95K 78643K 452 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 14 0 in_multi 42 2K 3K 78643K 111 0 ether_multi 1 0K 0K 78643K 5 0 mrt 0 0K 0K 78643K 10 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 233 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 135 72K 72K 78643K 1593 0 UVM aobj 2 2K 2K 78643K 6 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 24 0 NDP 9 0K 0K 78643K 20 0 temp 87 3859K 3923K 78643K 3057 0 kqueue 4 5K 9K 78643K 13 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 3 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 25 0 23 1 0 1 1 0 8 0 rtentry 112 67 0 34 2 0 2 2 0 8 0 unpcb 120 97 0 87 1 0 1 1 0 8 0 syncache 264 5 0 5 2 1 1 1 0 8 1 tcpqe 32 120 0 120 3 2 1 1 0 8 1 tcpcb 544 157 0 153 1 0 1 1 0 8 0 inpcb 296 336 0 325 3 1 2 2 0 8 1 rttmr 72 5 0 5 1 0 1 1 0 8 1 nd6 48 18 0 15 1 0 1 1 0 8 0 ppxss 1128 1 0 1 1 0 1 1 0 8 1 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 4 0 1 1 0 1 1 0 8 0 pfstitem 24 17 0 4 1 0 1 1 0 8 0 pfstkey 112 17 0 4 1 0 1 1 0 8 0 pfstate 328 17 0 4 2 0 2 2 0 8 0 pfrule 1360 27 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 227 0 82 12 0 12 12 0 8 1 art_table 32 228 0 82 2 0 2 2 0 8 0 art_node 16 66 0 36 1 0 1 1 0 8 0 sysvmsgpl 40 4 0 2 1 0 1 1 0 8 0 semupl 112 4 0 4 2 1 1 1 0 8 1 semapl 112 9 0 0 1 0 1 1 0 8 0 shmpl 112 4 0 4 1 0 1 1 0 8 1 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1648 0 242 89 0 89 89 0 8 0 ffsino 272 1648 0 242 95 0 95 95 0 8 0 nchpl 144 2102 0 492 60 0 60 60 0 8 0 uvmvnodes 72 1748 0 0 32 0 32 32 0 8 0 vnodes 208 1748 0 0 92 0 92 92 0 8 0 namei 1024 5976 0 5976 2 1 1 1 0 8 1 percpumem 16 33 0 1 1 0 1 1 0 8 0 vcpupl 1984 6 0 0 1 0 1 1 0 8 0 vmpool 560 6 0 0 1 0 1 1 0 8 0 pfiaddrpl 120 2 0 0 1 0 1 1 0 8 0 scxspl 192 6221 0 6221 9 3 6 7 0 8 6 plimitpl 152 28 0 20 1 0 1 1 0 8 0 sigapl 424 422 0 389 4 0 4 4 0 8 0 futexpl 56 2714 0 2711 1 0 1 1 0 8 0 knotepl 112 74 0 55 1 0 1 1 0 8 0 kqueuepl 144 26 0 23 1 0 1 1 0 8 0 pipepl 304 298 0 288 3 1 2 2 0 8 1 fdescpl 496 406 0 389 3 0 3 3 0 8 0 filepl 152 2801 0 2697 6 1 5 5 0 8 1 lockfpl 104 52 0 51 1 0 1 1 0 8 0 lockfspl 48 21 0 20 1 0 1 1 0 8 0 sessionpl 112 18 0 7 1 0 1 1 0 8 0 pgrppl 48 19 0 8 1 0 1 1 0 8 0 ucredpl 96 458 0 449 1 0 1 1 0 8 0 zombiepl 144 389 0 389 2 1 1 1 0 8 1 processpl 984 422 0 389 6 1 5 5 0 8 0 procpl 624 820 0 774 4 0 4 4 0 8 0 sockpl 400 458 0 435 4 1 3 3 0 8 0 mcl64k 65536 3 0 0 1 0 1 1 0 8 0 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 2 0 0 1 0 1 1 0 8 0 mcl9k 9216 3 0 0 1 0 1 1 0 8 0 mcl8k 8192 2 0 0 1 0 1 1 0 8 0 mcl4k 4096 3 0 0 1 0 1 1 0 8 0 mcl2k2 2112 1 0 0 1 0 1 1 0 8 0 mcl2k 2048 162 0 0 20 0 20 20 0 8 0 mtagpl 96 13 0 0 1 0 1 1 0 8 0 mbufpl 256 235 0 0 15 0 15 15 0 8 0 bufpl 280 3593 0 134 248 0 248 248 0 8 0 anonpl 16 49688 0 34071 65 1 64 64 0 124 1 amapchunkpl 152 2025 0 1866 8 0 8 8 0 158 0 amappl16 192 1655 0 822 43 0 43 43 0 8 1 amappl15 184 9 0 7 1 0 1 1 0 8 0 amappl14 176 32 0 27 1 0 1 1 0 8 0 amappl13 168 28 0 25 1 0 1 1 0 8 0 amappl12 160 6 0 4 1 0 1 1 0 8 0 amappl11 152 53 0 38 1 0 1 1 0 8 0 amappl10 144 24 0 16 1 0 1 1 0 8 0 amappl9 136 563 0 558 1 0 1 1 0 8 0 amappl8 128 516 0 482 2 0 2 2 0 8 0 amappl7 120 117 0 106 1 0 1 1 0 8 0 amappl6 112 21 0 18 1 0 1 1 0 8 0 amappl5 104 301 0 284 1 0 1 1 0 8 0 amappl4 96 491 0 459 1 0 1 1 0 8 0 amappl3 88 115 0 110 1 0 1 1 0 8 0 amappl2 80 2271 0 2190 2 0 2 2 0 8 0 amappl1 72 18741 0 18277 23 12 11 18 0 8 0 amappl 80 1069 0 1015 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 5 0 4 1 0 1 1 0 8 0 uaddrrnd 24 412 0 389 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 412 0 389 1 0 1 1 0 8 0 vmmpekpl 168 7840 0 7804 2 0 2 2 0 8 0 vmmpepl 168 56079 0 53957 120 26 94 113 0 357 1 vmsppl 368 411 0 389 3 0 3 3 0 8 0 pdppl 4096 831 0 784 7 0 7 7 0 8 1 pvpl 32 172035 0 153120 163 6 157 157 0 265 4 pmappl 232 411 0 389 2 0 2 2 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 264 0 5 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(ffffffff8241850d) 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(fffffd806eae4e18,9,fffffd8072fb9700,0,0,ffff800020e41d50) at tcp_usrreq+0xa55 sosend(fffffd806eae4e18,0,ffff800020e95588,0,0,80) at sosend+0x671 sys/kern/uipc_socket.c:555 dofilewritev(ffff800020e41d50,3,ffff800020e95588,0,ffff800020e95670) at dofilewritev+0x1b6 sys/kern/sys_generic.c:365 sys_write(ffff800020e41d50,ffff800020e95620,ffff800020e95670) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff800020e956f0) at syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800020e956f0) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc0002a73c8, 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 __sanitizer_cov_trace_const_cmp4(ffff800023f2b4f0,ffff800023f2b4f0) at __sanitizer_cov_trace_const_cmp4+0x7 sys/dev/kcov.c:162 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffdb170, 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 __sanitizer_cov_trace_const_cmp4(ffff800023f2b4f0,ffff800023f2b4f0) at __sanitizer_cov_trace_const_cmp4+0x7 sys/dev/kcov.c:162 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffdb170, count: -5