wodSFTP.NET - Bad packet length - WeOnlyDo Discussion board

wodSFTP.NET - Bad packet length (wodSFTP / wodSFTP.NET / wodSFTPdll)

by Jens Deblieck, Friday, September 22, 2023, 11:57 (438 days ago)

Dear,

With the upgrade from wodSFTP.net v3.7.0 to wodSFTP.net 3.7.2 - we are getting a "Bad packet length" error.
Library version 3.7.0 does work, but not the 3.7.2.

Can this regression issue be investigated please?

Following exception is thrown:
at A.C.f()
at A.C.A(String )
at WeOnlyDo.client.SFTP.Connect(String hostname)

wodSFTP.NET - Bad packet length

by Jasmine, Friday, September 22, 2023, 11:58 (438 days ago) @ Jens Deblieck

Hi Jens,

sure. Any chance we can duplicate this somehow? Does this happen to some specific server, or with more than one? Does this happen randomly or at specific scenario?

Regards,
Jasmine

wodSFTP.NET - Bad packet length

by Jens Deblieck, Friday, September 22, 2023, 12:14 (438 days ago) @ Jasmine

Hi Jasmine,

It happens when we connect to 1 specific server of a customer, where we cannot give any details about.
If we downgrade the library, we do not get the error and we can connect succesfully.
But we need version 3.7.2 for the MAC algorithme support.

Kr,
Jens

wodSFTP.NET - Bad packet length

by Jasmine, Friday, September 22, 2023, 12:17 (438 days ago) @ Jens Deblieck

Jens,

but problem is that this new algorithm(s) can cause trouble, that's why we need to duplcate the issue. Do you know type of the server?

Jasmine

wodSFTP.NET - Bad packet length

by Jens Deblieck, Friday, September 22, 2023, 12:25 (438 days ago) @ Jasmine

Hello,

And on an other client, we are getting "Corrupted MAC on input" exception.
Again with the v3.7.2 library.
With the v3.7.0 library it works.

If I am not mistaken, they use FileZilla Pro.

Kr,
Jens

wodSFTP.NET - Bad packet length

by Jasmine, Friday, September 22, 2023, 12:31 (438 days ago) @ Jens Deblieck

Hi.

Since we can't duplicate this for ourselves, is there any chance you can try to set


Sftp1.EncryptionList = "aes128-ctr,aes128-cbc,aes128-gcm@openssh.com,3des-cbc,blowfish-cbc,aes192-ctr,aes192-cbc,aes192-gcm@openssh.com,aes256-ctr,aes256-cbc,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,rijndael-cbc@lysator.liu.se";
Sftp1.HMacList = "hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-md5,none";
Sftp1.KeyExchangeList = "diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,
ecdh-sha2-nistp256,ecdh-sha2-nistp384,ext-info-c";


these are the values from 3.7.0. If this works we can try rearranging and adding values from 3.7.2 to see which algorithm is the problematic one.

Jasmine

wodSFTP.NET - Bad packet length

by Jens Deblieck, Friday, September 22, 2023, 15:22 (438 days ago) @ Jasmine

Hi,

The connection to the server is succesfull when adding those encryptions.
When I add 'hmac-sha2-256-etm@openssh.com' to the HMacList - then the error of 'Bad packet length' raises.

The exception with "Corrupted MAC on input" is still beeing raised.

Kr,
Jens

wodSFTP.NET - Bad packet length

by Jasmine, Sunday, September 24, 2023, 21:52 (436 days ago) @ Jens Deblieck

Jens,

hi. I tried using only HMacList = "hmac-sha2-256-etm@openssh.com" against our OpenSSH we use for testing, and it worked correctly.

Do you know which type of the server you're connecting to? Any chance we could connect there to try it out? We don't need login/pass, just the IP. You can send it to techsupport - at - weonlydo.com if it's sensitive info.

Regards,
Jasmine

wodSFTP.NET - Bad packet length

by Jens Deblieck, Tuesday, September 26, 2023, 10:08 (434 days ago) @ Jasmine

Dear Jasmine,

I've opened ticket #617282 regarding this issue.

Thank you for all the help.


Kr,
Jens

wodSFTP.NET - Bad packet length

by Jasmine, Tuesday, September 26, 2023, 10:31 (434 days ago) @ Jens Deblieck

Jens,

we got it, thank you. Just to double-check, if hmac-sha2-256-etm@openssh.com is not present in HMacList, everything is ok, right?

Jasmine

wodSFTP.NET - Bad packet length

by Jasmine, Tuesday, September 26, 2023, 22:05 (434 days ago) @ Jasmine

Hi.

Can you please request update and try it out to see if this problem is fixed? Make sure Version property returns 3.7.2.168

Let me know how it goes!

Jasmine