login: panic: tcp_output: template len != hdrlen - optlen Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 341699 86530 0 0x2 0 0 syz-executor.0 * 95682 25699 0 0x12 0 1 sshd db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff8220c7fa) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000a0b540) at tcp_output+0x2c4b tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000a0b540) at tcp_output+0x2c4b sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd806eb3ec88,9,fffffd806f39c000,0,0,ffff800020ede9d0) at tcp_usrreq+0xa55 sosend(fffffd806eb3ec88,0,ffff800020e91b68,0,0,80) at sosend+0x671 sys/kern/uipc_socket.c:549 dofilewritev(ffff800020ede9d0,4,ffff800020e91b68,0,ffff800020e91c50) at dofilewritev+0x1b6 sys/kern/sys_generic.c:365 sys_write(ffff800020ede9d0,ffff800020e91c00,ffff800020e91c50) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff800020e91cd0) at syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800020e91cd0) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffbbe90, 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{1}> ddb{1}> set $lines = 0 ddb{1}> set $maxwidth = 0 ddb{1}> show panic tcp_output: template len != hdrlen - optlen ddb{1}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff8220c7fa) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000a0b540) at tcp_output+0x2c4b tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000a0b540) at tcp_output+0x2c4b sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd806eb3ec88,9,fffffd806f39c000,0,0,ffff800020ede9d0) at tcp_usrreq+0xa55 sosend(fffffd806eb3ec88,0,ffff800020e91b68,0,0,80) at sosend+0x671 sys/kern/uipc_socket.c:549 dofilewritev(ffff800020ede9d0,4,ffff800020e91b68,0,ffff800020e91c50) at dofilewritev+0x1b6 sys/kern/sys_generic.c:365 sys_write(ffff800020ede9d0,ffff800020e91c00,ffff800020e91c50) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff800020e91cd0) at syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800020e91cd0) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffbbe90, count: -9 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800020e916d0 rbx 0xffff800020e91780 rdx 0x8b rcx 0x2 rax 0x1 r8 0xffffffff8116c11f kprintf+0x16f r9 0x1 r10 0x2 r11 0x1f86ad2dd94abcfa r12 0x3000000008 r13 0xffff800020e916e0 r14 0x100 r15 0x1 rip 0xffffffff8170fd68 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020e916c0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (sshd) pid=95682 stat=onproc flags process=12 proc=0 pri=50, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff800020ede280,0xffff800020edf3a0 process=0xffff800020ec83f0 user=0xffff800020e8c000, vmspace=0xfffffd806e960178 estcpu=0, cpticks=0, pctcpu=0.1 user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 86530 341699 73002 0 7 0x2 syz-executor.0 73002 48488 22179 0 3 0x82 thrsleep syz-execprog 73002 361132 22179 0 3 0x4000082 nanosleep syz-execprog 73002 298589 22179 0 3 0x4000082 thrsleep syz-execprog 73002 322741 22179 0 3 0x4000082 nanosleep syz-execprog 73002 302102 22179 0 3 0x4000082 thrsleep syz-execprog 73002 329217 22179 0 3 0x4000082 thrsleep syz-execprog 73002 309772 22179 0 3 0x4000082 kqread syz-execprog 73002 84910 22179 0 3 0x4000082 thrsleep syz-execprog 73002 442897 22179 0 3 0x4000082 thrsleep syz-execprog 73002 104438 22179 0 3 0x4000082 thrsleep syz-execprog 22179 517792 25699 0 3 0x10008a pause ksh *25699 95682 66415 0 7 0x12 sshd 18883 164230 1 0 3 0x100083 ttyin getty 66415 272921 1 0 3 0x80 select sshd 15972 260722 85496 74 3 0x100092 bpf pflogd 85496 347261 1 0 3 0x80 netio pflogd 76606 98117 29533 73 3 0x100090 kqread syslogd 29533 260956 1 0 3 0x100082 netio syslogd 79237 234099 1 77 3 0x100090 poll dhclient 47907 37242 1 0 3 0x80 poll dhclient 10751 448096 0 0 3 0x14200 bored smr 455 3093 0 0 3 0x14200 pgzero zerothread 23984 294392 0 0 3 0x14200 aiodoned aiodoned 33262 106606 0 0 3 0x14200 syncer update 69236 21094 0 0 3 0x14200 cleaner cleaner 82605 273110 0 0 3 0x14200 reaper reaper 3107 217627 0 0 3 0x14200 pgdaemon pagedaemon 70062 313428 0 0 3 0x14200 bored crynlk 19469 164046 0 0 3 0x14200 bored crypto 66610 375648 0 0 3 0x40014200 acpi0 acpi0 9660 296909 0 0 3 0x40014200 idle1 7241 480655 0 0 3 0x14200 bored softnet 56848 15938 0 0 3 0x14200 bored systqmp 23640 185982 0 0 3 0x14200 bored systq 58473 63107 0 0 3 0x40014200 bored softclock 61215 390053 0 0 3 0x40014200 idle0 1 116162 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 25699 (sshd) thread 0xffff800020ede9d0 (95682) exclusive rwlock netlock r = 0 (0xffffffff8253e778) #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:537 #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{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 9467 6396K 6396K 78643K 10560 0 pcb 13 8K 8K 78643K 13 0 rtable 83 2K 2K 78643K 163 0 ifaddr 37 9K 9K 78643K 280 0 counters 41 33K 33K 78643K 41 0 ioctlops 0 0K 4K 78643K 1468 0 mount 1 1K 1K 78643K 1 0 vnodes 1183 74K 75K 78643K 1188 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 1K 1K 78643K 2 0 sem 2 0K 0K 78643K 2 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1824 197K 290K 78643K 13058 0 file desc 2 4K 12K 78643K 259 0 proc 59 63K 83K 78643K 398 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 in_multi 22 1K 1K 78643K 22 0 ether_multi 1 0K 0K 78643K 1 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 19 95K 95K 78643K 19 0 exec 0 0K 1K 78643K 197 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 74 12K 12K 78643K 1190 0 UVM aobj 2 2K 2K 78643K 2 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 NDP 5 0K 0K 78643K 7 0 temp 29 3029K 3093K 78643K 2350 0 kqueue 3 4K 4K 78643K 3 0 SYN cache 2 16K 16K 78643K 2 0 ddb{1}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 4 0 0 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 17 0 15 1 0 1 1 0 8 0 rtentry 112 34 0 1 1 0 1 1 0 8 0 unpcb 120 29 0 19 1 0 1 1 0 8 0 syncache 264 5 0 5 2 2 0 1 0 8 0 tcpcb 544 8 0 5 1 0 1 1 0 8 0 inpcb 280 275 0 269 1 0 1 1 0 8 0 nd6 48 3 0 0 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 pfstitem 24 11 0 2 1 0 1 1 0 8 0 pfstkey 112 11 0 2 1 0 1 1 0 8 0 pfstate 328 11 0 2 1 0 1 1 0 8 0 pfrule 1360 21 0 16 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 144 0 0 9 0 9 9 0 8 0 art_table 32 145 0 0 2 0 2 2 0 8 0 art_node 16 33 0 3 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1666 0 264 88 0 88 88 0 8 0 ffsino 272 1666 0 264 94 0 94 94 0 8 0 nchpl 144 2125 0 523 60 0 60 60 0 8 0 uvmvnodes 72 1676 0 0 31 0 31 31 0 8 0 vnodes 208 1676 0 0 89 0 89 89 0 8 0 namei 1024 5177 0 5176 2 1 1 1 0 8 0 percpumem 16 31 0 0 1 0 1 1 0 8 0 scxspl 192 5463 0 5462 8 2 6 7 0 8 5 plimitpl 152 15 0 8 1 0 1 1 0 8 0 sigapl 424 482 0 453 4 0 4 4 0 8 0 knotepl 112 47 0 36 1 0 1 1 0 8 0 kqueuepl 144 2 0 0 1 0 1 1 0 8 0 pipelkpl 48 77 0 70 2 1 1 1 0 8 0 pipepl 120 154 0 141 2 1 1 1 0 8 0 fdescpl 496 467 0 453 3 0 3 3 0 8 0 filepl 152 1598 0 1540 3 0 3 3 0 8 0 lockfpl 104 5 0 4 1 0 1 1 0 8 0 lockfspl 48 3 0 2 1 0 1 1 0 8 0 sessionpl 112 19 0 9 1 0 1 1 0 8 0 pgrppl 48 19 0 9 1 0 1 1 0 8 0 ucredpl 96 62 0 53 1 0 1 1 0 8 0 zombiepl 144 453 0 453 2 1 1 1 0 8 1 processpl 984 482 0 453 5 0 5 5 0 8 1 procpl 624 491 0 453 4 0 4 4 0 8 1 sockpl 400 321 0 303 2 0 2 2 0 8 0 mcl4k 4096 3 0 0 1 0 1 1 0 8 0 mcl2k 2048 69 0 0 9 0 9 9 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 110 0 0 6 0 6 6 0 8 0 bufpl 280 3227 0 133 221 0 221 221 0 8 0 anonpl 16 28614 0 26810 14 2 12 12 0 124 4 amapchunkpl 152 1062 0 997 4 0 4 4 0 158 1 amappl16 192 1125 0 1080 3 0 3 3 0 8 0 amappl15 184 4 0 2 1 0 1 1 0 8 0 amappl14 176 33 0 29 1 0 1 1 0 8 0 amappl13 168 20 0 19 2 1 1 1 0 8 0 amappl12 160 8 0 7 2 1 1 1 0 8 0 amappl11 152 293 0 277 1 0 1 1 0 8 0 amappl10 144 20 0 16 1 0 1 1 0 8 0 amappl9 136 228 0 227 1 0 1 1 0 8 0 amappl8 128 274 0 263 1 0 1 1 0 8 0 amappl7 120 112 0 101 1 0 1 1 0 8 0 amappl6 112 27 0 23 2 1 1 1 0 8 0 amappl5 104 379 0 365 1 0 1 1 0 8 0 amappl4 96 497 0 470 1 0 1 1 0 8 0 amappl3 88 105 0 100 1 0 1 1 0 8 0 amappl2 80 1401 0 1342 3 1 2 2 0 8 0 amappl1 72 17495 0 17076 23 5 18 18 0 8 8 amappl 80 719 0 691 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 1 0 0 1 0 1 1 0 8 0 uaddrrnd 24 467 0 453 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 467 0 453 1 0 1 1 0 8 0 vmmpekpl 168 6829 0 6805 2 0 2 2 0 8 0 vmmpepl 168 42974 0 42032 85 13 72 72 0 357 30 vmsppl 368 466 0 453 2 0 2 2 0 8 0 pdppl 4096 942 0 906 6 0 6 6 0 8 0 pvpl 32 139721 0 135547 110 6 104 104 0 265 69 pmappl 232 466 0 453 1 0 1 1 0 8 0 extentpl 40 53 0 36 1 0 1 1 0 8 0 phpool 112 232 0 4 7 0 7 7 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp x86_ipi_db(ffffffff8251cff0) 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_pc() at __sanitizer_cov_trace_pc+0x5f sys/dev/kcov.c:88 __mp_acquire_count(ffffffff82640950,1) at __mp_acquire_count+0x51 sys/kern/kern_lock.c:227 tsleep(fffffd806b7bac30,11,ffffffff82255193,0) at tsleep+0x19b biowait(fffffd806b7bac30) at biowait+0xa6 sys/kern/vfs_bio.c:1256 bwrite(fffffd806b7bac30) at bwrite+0x1e4 sys/kern/vfs_bio.c:765 VOP_BWRITE(fffffd806b7bac30) at VOP_BWRITE+0x4a sys/kern/vfs_vops.c:724 ufs_direnter(fffffd806d03ea90,fffffd806cfbdc48,ffff800020f6aac0,ffff800020f6ae10,fffffd806ce00e58) at ufs_direnter+0x8e3 sys/ufs/ufs/ufs_lookup.c:909 ufs_mkdir(ffff800020f6ac60) at ufs_mkdir+0x70b sys/ufs/ufs/ufs_vnops.c:1251 VOP_MKDIR(fffffd806d03ea90,ffff800020f6adc0,ffff800020f6ae10,ffff800020f6acf0) at VOP_MKDIR+0xc6 sys/kern/vfs_vops.c:450 domkdirat(ffff800020e6c758,ffffff9c,7f7ffffcb720,1ff) at domkdirat+0x121 sys/kern/vfs_syscalls.c:3051 syscall(ffff800020f6af90) at syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800020f6af90) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:570 end trace frame: 0xffff800020f6b010, count: 0 ddb{0}> trace x86_ipi_db(ffffffff8251cff0) 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_pc() at __sanitizer_cov_trace_pc+0x5f sys/dev/kcov.c:88 __mp_acquire_count(ffffffff82640950,1) at __mp_acquire_count+0x51 sys/kern/kern_lock.c:227 tsleep(fffffd806b7bac30,11,ffffffff82255193,0) at tsleep+0x19b biowait(fffffd806b7bac30) at biowait+0xa6 sys/kern/vfs_bio.c:1256 bwrite(fffffd806b7bac30) at bwrite+0x1e4 sys/kern/vfs_bio.c:765 VOP_BWRITE(fffffd806b7bac30) at VOP_BWRITE+0x4a sys/kern/vfs_vops.c:724 ufs_direnter(fffffd806d03ea90,fffffd806cfbdc48,ffff800020f6aac0,ffff800020f6ae10,fffffd806ce00e58) at ufs_direnter+0x8e3 sys/ufs/ufs/ufs_lookup.c:909 ufs_mkdir(ffff800020f6ac60) at ufs_mkdir+0x70b sys/ufs/ufs/ufs_vnops.c:1251 VOP_MKDIR(fffffd806d03ea90,ffff800020f6adc0,ffff800020f6ae10,ffff800020f6acf0) at VOP_MKDIR+0xc6 sys/kern/vfs_vops.c:450 domkdirat(ffff800020e6c758,ffffff9c,7f7ffffcb720,1ff) at domkdirat+0x121 sys/kern/vfs_syscalls.c:3051 syscall(ffff800020f6af90) at syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800020f6af90) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffcb790, count: -15 ddb{0}> machine ddbcpu 1 Stopped at db_enter+0x18: addq $0x8,%rsp db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff8220c7fa) at panic+0x15c sys/kern/subr_prf.c:207 tcp_output(ffff800000a0b540) at tcp_output+0x2c4b tcp_setpersist sys/netinet/tcp_output.c:1130 [inline] tcp_output(ffff800000a0b540) at tcp_output+0x2c4b sys/netinet/tcp_output.c:333 tcp_usrreq(fffffd806eb3ec88,9,fffffd806f39c000,0,0,ffff800020ede9d0) at tcp_usrreq+0xa55 sosend(fffffd806eb3ec88,0,ffff800020e91b68,0,0,80) at sosend+0x671 sys/kern/uipc_socket.c:549 dofilewritev(ffff800020ede9d0,4,ffff800020e91b68,0,ffff800020e91c50) at dofilewritev+0x1b6 sys/kern/sys_generic.c:365 sys_write(ffff800020ede9d0,ffff800020e91c00,ffff800020e91c50) at sys_write+0x83 sys/kern/sys_generic.c:285 syscall(ffff800020e91cd0) at syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800020e91cd0) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffbbe90, count: 6 ddb{1}>