You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"Message type 93 is not valid in the current context" when the server sends CHANNEL_WINDOW_ADJUST during its re-key (ProFTPD) #1875
Large SFTP uploads to ProFTPD still fail for me on 2026.0.1 with Message type 93 is not valid in the current context.
Cause, as far as I can tell: ProFTPD mod_sftp sends SSH_MSG_CHANNEL_WINDOW_ADJUST between its own KEXINIT and NEWKEYS during a re-key, against RFC 4253 section 7.1. Confirmed and fixed upstream in proftpd/proftpd#2509 (master and the 1.3.9 branch). So I believe this is a server bug, not an SSH.NET bug.
Why I am raising it here anyway:
My provider runs ProFTPD 1.3.8b from Ubuntu 24.04 LTS and will not update beyond what the distribution ships, so I expect affected servers to stay around for years.
OpenSSH works against the same server. From reading the OpenSSH 10.6 source, I believe its receive side does not check the key exchange state for channel messages: the channel handlers stay registered during a re-key, and an unexpected message is an error only during the initial key exchange with strict KEX (kex_protocol_error in kex.c).
Reproduction (ProFTPD 1.3.9e in Docker, SSH.NET develop b0d6c59, one upload over one connection):
With ProFTPD's default 4 GiB window an adjust is sent only once per about 4 GB, so the collision is rare. My provider uses a 64 MiB window.
Correction to #1823: I said there was no evidence that ProFTPD sends channel messages during a re-key. My test used 128 MB files, which never exhausted the window, so no adjust was ever sent. That was my mistake.
Possible change:@vlastee's receive-side commit from #1823 (accept and defer connection protocol messages during re-exchange), cherry-picked onto develop locally. With it the 60 GB upload against the unfixed server passed (54 re-keys, 962 window adjusts, 5 of them between the server's KEXINIT and NEWKEYS).
Activity