Packet size is invalid

Discussion of open issues, suggestions and bugs regarding network security and data protection solution - SecureBridge
Post Reply
marshman13
Posts: 6
Joined: Tue 10 Jan 2012 20:49
Location: United States

Packet size is invalid

Post by marshman13 » Tue 10 Jan 2012 21:28

Most current release of SecureBridge with Delphi XE2

I have a setup for SFTP with all necessary components. Authentication seems to be working but just after I am getting an error: Packet Size is Invalid!

Any thoughts?

thx
m

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Thu 12 Jan 2012 13:04

I can not reproduce the problem.
Please specify the exact version of SSH server and SFTP server you are using.
Also specify the exact message of the error.

marshman13
Posts: 6
Joined: Tue 10 Jan 2012 20:49
Location: United States

additional information

Post by marshman13 » Thu 12 Jan 2012 13:54

This is an NC Medicaid Server
I can connect using WinSCP and basically want to eliminate that requirement by using SecureBridge.

Relevant errors from Delphi Application:

[120E0C16]{sbridge160.bpl} Scssh2datahandler.TSsh2DataHandler.ConstructPacket + $232
[120E086B]{sbridge160.bpl} Scssh2datahandler.TSsh2DataHandler.ProcessData + $F
[120F2E3E]{sbridge160.bpl} Scssh2connection.TSsh2Connection.SyncReceivePacket + $42
[120F0FA9]{sbridge160.bpl} Scssh2connection.TSsh2Connection.Connect + $211
[120F1704]{sbridge160.bpl} Scssh2connection.TSsh2Connection.UserAuthentication + $3C
[120F0E65]{sbridge160.bpl} Scssh2connection.TSsh2Connection.Connect + $CD
[120E1CDA]{sbridge160.bpl} Scclient.TSshClientForwarder.Connect + $1A6
[120E4451]{sbridge160.bpl} Scsshclient.TScSSHClient.DoConnect + $3AD
[120E458E]{sbridge160.bpl} Scsshclient.TScSSHClient.SetConnected + $86


** WinSCP CONFIGURATION INFORMATION THAT MAY BE HELPFUL.

Protocol: SFTP

Preferred SFTP protocol version: 5
Server does not use UTF-8: Auto

Detection of known bugs in SFTP servers
Reverses order of symlink command arguments: Auto
Misinterprets file timestamps prior to 1970: Auto

Enable compression option: Not Checked
SSH Version: 2
Encryption cipher selection policy order:
AES
Blowfish
3DES

** MORE SPECIFIC WinsSCP CONNECTED SESSION INFORMATION

SSH:
SSH protocol version = SSH-2
SSH implementation = VShell_3_8_1_188 VShell
Encryption algorithm = aes
Compression = No
File transfer protocol = SFTP (v5)

Protocol:
SSH protocol version = SSH-2
SSH implementation = VShell_3_8_1_188 VShell
Encryption algorithm = aes
Compression = No
File transfer protocol = SFTP (v5)

Additional Protocol Information:
The server supports these SFTP extensions:
[email protected]=0x000000020D0A
newline=0x0D0A
[email protected]=0x0000000A506F73744F66666963650700000000
[email protected]=0x00000001052476172652C20496E632E00000006565368656C6C00000011332E382E3120286275696C64203138382900030008000000BC
versions=3,4,5,6,[email protected],[email protected]
[email protected]=2

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Thu 12 Jan 2012 16:00

SecureBridge generates error, where the invalid packet size is specified. Please specify this size.

Can I get access to your SSH server?

marshman13
Posts: 6
Joined: Tue 10 Jan 2012 20:49
Location: United States

Post by marshman13 » Thu 12 Jan 2012 16:27

Packet size reported as invalid is all over during each connection attempt.

2089168307
1856233983
-1877401136

Sorry but the server is a North Carolina Medicaid provision. I do not have authorization to allow you access.

SSH is definitely not my area of expertise and I will gladly provide anything possible to attempt a resolve. I did google posts regarding packet size issues with SSH/SFTP and am curious how WinSCP handles this error condition.

thx
marshall

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Thu 12 Jan 2012 16:42

Please specify the exact version of your SSH server. You can see it in the TScSSHClient.ClientInfo.Version property after trying to establish connection.

marshman13
Posts: 6
Joined: Tue 10 Jan 2012 20:49
Location: United States

Post by marshman13 » Thu 12 Jan 2012 17:35

Here is a connect/disconnect log from WinSCP.
I have removed the username.
I has the server information and possibly more that could be of use.

2012-01-12 12:31:40.158 --------------------------------------------------------------------------
. 2012-01-12 12:31:40.158 WinSCP Version 3.8.2 (Build 330) (OS 6.1.7601 Service Pack 1)
. 2012-01-12 12:31:40.158 Login time: Thursday, January 12, 2012 12:31:40 PM
. 2012-01-12 12:31:40.158 --------------------------------------------------------------------------
. 2012-01-12 12:31:40.158 Session name: [email protected]
. 2012-01-12 12:31:40.158 Host name: claims.ncmedicaid.com (Port: 22)
. 2012-01-12 12:31:40.159 User name: xxxx (Password: Yes, Key file: No)
. 2012-01-12 12:31:40.159 Transfer Protocol: SFTP
. 2012-01-12 12:31:40.159 SSH protocol version: 2; Compression: No
. 2012-01-12 12:31:40.159 Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2012-01-12 12:31:40.159 Ciphers: aes,blowfish,3des,WARN,des; Ssh2DES: No
. 2012-01-12 12:31:40.159 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2012-01-12 12:31:40.159 SSH Bugs: -,-,-,-,-,-,-,-
. 2012-01-12 12:31:40.159 SFTP Bugs: -,-,-
. 2012-01-12 12:31:40.159 Proxy: none
. 2012-01-12 12:31:40.159 Return code variable: Autodetect; Lookup user groups: Yes
. 2012-01-12 12:31:40.159 Shell: default, EOL: 0
. 2012-01-12 12:31:40.159 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2012-01-12 12:31:40.159 Cache directory changes: Yes, Permanent: Yes
. 2012-01-12 12:31:40.159 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2012-01-12 12:31:40.159 Alias LS: No, Ign LS warn: Yes, Scp1 Comp: No
. 2012-01-12 12:31:40.159 --------------------------------------------------------------------------
. 2012-01-12 12:31:40.164 Looking up host "claims.ncmedicaid.com"
. 2012-01-12 12:31:40.234 Connecting to 66.193.222.143 port 22
. 2012-01-12 12:31:40.292 Server version: SSH-2.0-VShell_3_8_1_188 VShell
. 2012-01-12 12:31:40.292 We claim version: SSH-2.0-WinSCP_release_3.8.2
. 2012-01-12 12:31:40.292 Using SSH protocol version 2
. 2012-01-12 12:31:40.323 Doing Diffie-Hellman group exchange
. 2012-01-12 12:31:40.475 Doing Diffie-Hellman key exchange
. 2012-01-12 12:31:40.746 Host key fingerprint is:
. 2012-01-12 12:31:40.746 ssh-dss 1024 6c:b2:98:da:8a:1b:94:fd:1d:09:50:89:55:b2:15:4f
. 2012-01-12 12:31:40.747 Initialised AES-256 client->server encryption
. 2012-01-12 12:31:40.747 Initialised HMAC-SHA1 client->server MAC algorithm
. 2012-01-12 12:31:40.747 Initialised AES-256 server->client encryption
. 2012-01-12 12:31:40.747 Initialised HMAC-SHA1 server->client MAC algorithm
! 2012-01-12 12:31:40.880 Using username "xxxx".
. 2012-01-12 12:31:40.911 Session password prompt ([email protected]'s password: )
. 2012-01-12 12:31:40.911 Using stored password.
! 2012-01-12 12:31:40.916 Authenticating with pre-entered password.
. 2012-01-12 12:31:40.916 Sent password
. 2012-01-12 12:31:40.965 Access granted
. 2012-01-12 12:31:40.993 Opened channel for session
. 2012-01-12 12:31:41.021 Started a shell/command
. 2012-01-12 12:31:41.021 --------------------------------------------------------------------------
. 2012-01-12 12:31:41.022 Using SFTP protocol.
. 2012-01-12 12:31:41.023 Doing startup conversation with host.
> 2012-01-12 12:31:41.025 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2012-01-12 12:31:41.079 Type: SSH_FXP_VERSION, Size: 1227, Number: -1
. 2012-01-12 12:31:41.079 SFTP version 5 negotiated.
. 2012-01-12 12:31:41.080 Unknown server extension [email protected]=0x000000020D0A
. 2012-01-12 12:31:41.080 Server requests EOL sequence 0x0D0A.
. 2012-01-12 12:31:41.080 File system roots:
. 2012-01-12 12:31:41.080 Unknown server extension [email protected]=0x00000001000000095C2F3A2A3F223C3E7C0000001700000004434F4D3100000004434F4D3200000004434F4D3300000004434F4D3400000004434F4D3500000004434F4D3600000004434F4D3700000004434F4D3800000004434F4D39000000044C505431000000044C505432000000044C505433000000044C505434000000044C505435000000044C505436000000044C505437000000044C505438000000044C5054390000000350524E00000003434F4E00000003415558000000034E554C00000006434C4F434B24
. 2012-01-12 12:31:41.080 Server support information:
. 2012-01-12 12:31:41.080 Attribute mask: 800003F9, Attribute bits: 17, Open flags: 83F
. 2012-01-12 12:31:41.080 Access mask: 1F01FF, Open block masks: 0, Block masks: 0, Max read size: 32768
. 2012-01-12 12:31:41.080 Attribute extensions (0)
. 2012-01-12 12:31:41.080 Extensions (14)
. 2012-01-12 12:31:41.080 space-available
. 2012-01-12 12:31:41.080 [email protected]
. 2012-01-12 12:31:41.080 [email protected]
. 2012-01-12 12:31:41.080 [email protected]
. 2012-01-12 12:31:41.080 text-seek
. 2012-01-12 12:31:41.080 vendor-id
. 2012-01-12 12:31:41.080 version-select
. 2012-01-12 12:31:41.080 home-directory
. 2012-01-12 12:31:41.080 copy-file
. 2012-01-12 12:31:41.080 get-temp-folder
. 2012-01-12 12:31:41.080 make-temp-folder
. 2012-01-12 12:31:41.081 check-file-handle
. 2012-01-12 12:31:41.081 check-file-name
. 2012-01-12 12:31:41.081 [email protected]
. 2012-01-12 12:31:41.081 Server support information:
. 2012-01-12 12:31:41.081 Attribute mask: 800003F9, Attribute bits: 17, Open flags: 83F
. 2012-01-12 12:31:41.081 Access mask: 1F01FF, Open block masks: FFFFFFFF, Block masks: 0, Max read size: 32768
. 2012-01-12 12:31:41.081 Attribute extensions (0)
. 2012-01-12 12:31:41.081 Extensions (14)
. 2012-01-12 12:31:41.081 space-available
. 2012-01-12 12:31:41.081 [email protected]
. 2012-01-12 12:31:41.081 [email protected]
. 2012-01-12 12:31:41.081 [email protected]
. 2012-01-12 12:31:41.081 text-seek
. 2012-01-12 12:31:41.081 vendor-id
. 2012-01-12 12:31:41.081 version-select
. 2012-01-12 12:31:41.081 home-directory
. 2012-01-12 12:31:41.081 copy-file
. 2012-01-12 12:31:41.081 get-temp-folder
. 2012-01-12 12:31:41.081 make-temp-folder
. 2012-01-12 12:31:41.081 check-file-handle
. 2012-01-12 12:31:41.081 check-file-name
. 2012-01-12 12:31:41.081 [email protected]
. 2012-01-12 12:31:41.081 Server software: VShell 3.8.1 (build 188) (188) by VanDyke Software, Inc.
. 2012-01-12 12:31:41.081 SFTP versions supported by the server: 3,4,5,6,[email protected],[email protected]
. 2012-01-12 12:31:41.082 Unknown server extension [email protected]=2
> 2012-01-12 12:31:41.082 Type: SSH_FXP_EXTENDED, Size: 63, Number: 200
. 2012-01-12 12:31:41.082 We will use UTF-8 strings when appropriate
. 2012-01-12 12:31:41.084 Getting current directory name.
. 2012-01-12 12:31:41.084 Getting real path for '.'
> 2012-01-12 12:31:41.084 Type: SSH_FXP_REALPATH, Size: 10, Number: 272
< 2012-01-12 12:31:41.109 Type: SSH_FXP_STATUS, Size: 57, Number: 200
. 2012-01-12 12:31:41.109 Discarding reserved response
< 2012-01-12 12:31:41.140 Type: SSH_FXP_NAME, Size: 78, Number: 272
. 2012-01-12 12:31:41.140 Real path is 'PostOffice:/'
. 2012-01-12 12:31:41.140 Listing directory "PostOffice:".
> 2012-01-12 12:31:41.140 Type: SSH_FXP_OPENDIR, Size: 20, Number: 523
< 2012-01-12 12:31:41.173 Type: SSH_FXP_HANDLE, Size: 13, Number: 523
> 2012-01-12 12:31:41.173 Type: SSH_FXP_READDIR, Size: 13, Number: 780
< 2012-01-12 12:31:41.201 Type: SSH_FXP_NAME, Size: 428, Number: 780
> 2012-01-12 12:31:41.201 Type: SSH_FXP_READDIR, Size: 13, Number: 1036
< 2012-01-12 12:31:41.228 Type: SSH_FXP_STATUS, Size: 44, Number: 1036
< 2012-01-12 12:31:41.228 Status/error code: 1
> 2012-01-12 12:31:41.228 Type: SSH_FXP_CLOSE, Size: 13, Number: 1284
. 2012-01-12 12:31:41.229 Startup conversation with host finished.
. 2012-01-12 12:31:41.876 Detected incoming data while idle
. 2012-01-12 12:31:46.807 Closing connection.

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Fri 13 Jan 2012 12:58

I still cannot reproduce the problem with this server. This error arises when the encrypted data is decrypted incorrectly.
I can not resolve the problem not having access to this or similar server.

marshman13
Posts: 6
Joined: Tue 10 Jan 2012 20:49
Location: United States

Post by marshman13 » Fri 13 Jan 2012 13:26

Thank you for the quick response efforts to resolve this issue.
I understand that without having access to the server that this would be a limited effort.

Should I find my resolve then I will post an update.

Thanks again
Marshall

"Love all the Devart components"

marshman13
Posts: 6
Joined: Tue 10 Jan 2012 20:49
Location: United States

All is working fine

Post by marshman13 » Sun 29 Jan 2012 23:15

Wanted to post my closing remark about this issue.

I was able to get more detail on the server in question "Medicaid" and was able to connect with no problems. I'm not sure just yet how programs like WinSCP fine tune their internals during connections without settings to the nth detail but I am able to connect and do everything with SecureBridge.

Devart components are great. I also use UniDAC.

Thanks to all
Marshall

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Mon 30 Jan 2012 08:45

Feel free to contact us if you have any further questions about SecureBridge.

Post Reply