[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Errors after migrating from 0.6.0rc1 to 0.6.4
[Thread Prev] | [Thread Next]
- Subject: Errors after migrating from 0.6.0rc1 to 0.6.4
- From: Kevin Stewart <kstewart@xxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Mon, 06 Apr 2015 18:31:49 -0500
- To: libssh@xxxxxxxxxx
Title: Snippet
I developed a Windows-based (using VS2010) server application using
the 0.6.0rc1 version of libssh and was getting memory leaks on a per
connection basis. I decided to migrate to the latest version (0.6.4)
to see if it alleviated these leaks and ran into different issues.
The first issue is in socket.c starting at line 314.
ssh_socket_set_blocking() is failing and WSAGetLastError() is
returning 10022 (WSAEINVAL). Since sockets are initially in blocking
mode ("When a socket is created, it operates in blocking mode by
default (nonblocking mode is disabled). This is consistent with
BSD sockets." -
https://msdn.microsoft.com/en-us/library/windows/desktop/ms738573(v=vs.85).aspx),
I commented out the section of code to get passed the error. Now,
during the key exchange, clients (putty), disconnects with "Incoming
packet was garbled on decryption". Below is a log I collected. 2015-04-06 18:09:35 SYS-INF DAEMON - NEW CONNECTION FROM 192.168.1.206:16907 2015-04-06 18:09:35 ACT-INF DAEMON - ssh_socket_pollcallback(3) - ssh_socket_pollcallback: Received POLLOUT in connecting state 2015-04-06 18:09:35 ACT-INF DAEMON - ssh_socket_unbuffered_write(3) - ssh_socket_unbuffered_write: Enabling POLLOUT for socket 2015-04-06 18:09:35 ACT-INF DAEMON - callback_receive_banner(3) - callback_receive_banner: Received banner: SSH-2.0-PuTTY_Local:_Aug__7_2013_13:47:56 2015-04-06 18:09:35 ACT-INF DAEMON - ssh_server_connection_callback(1) - ssh_server_connection_callback: SSH client banner: SSH-2.0-PuTTY_Local:_Aug__7_2013_13:47:56 2015-04-06 18:09:35 ACT-INF DAEMON - ssh_analyze_banner(1) - ssh_analyze_banner: Analyzing banner: SSH-2.0-PuTTY_Local:_Aug__7_2013_13:47:56 2015-04-06 18:09:35 ACT-INF DAEMON - ssh_list_kex(4) - ssh_list_kex: kex algos: curve25519-sha256@xxxxxxxxxx,ecdh-sha2-nistp256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 2015-04-06 18:09:35 ACT-INF DAEMON - ssh_list_kex(4) - ssh_list_kex: server host key algo: ssh-dss,ssh-rsa 2015-04-06 18:09:35 ACT-INF DAEMON - ssh_list_kex(4) - ssh_list_kex: encryption client->server: aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,blowfish-cbc,3des-cbc,des-cbc-ssh1 2015-04-06 18:09:35 ACT-INF DAEMON - ssh_list_kex(4) - ssh_list_kex: encryption server->client: aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,blowfish-cbc,3des-cbc,des-cbc-ssh1 2015-04-06 18:09:35 ACT-INF DAEMON - ssh_list_kex(4) - ssh_list_kex: mac algo client->server: hmac-sha1 2015-04-06 18:09:35 ACT-INF DAEMON - ssh_list_kex(4) - ssh_list_kex: mac algo server->client: hmac-sha1 2015-04-06 18:09:35 ACT-INF DAEMON - ssh_list_kex(4) - ssh_list_kex: compression algo client->server: none,zlib,zlib@xxxxxxxxxxx 2015-04-06 18:09:35 ACT-INF DAEMON - ssh_list_kex(4) - ssh_list_kex: compression algo server->client: none,zlib,zlib@xxxxxxxxxxx 2015-04-06 18:09:35 ACT-INF DAEMON - ssh_list_kex(4) - ssh_list_kex: languages client->server: 2015-04-06 18:09:35 ACT-INF DAEMON - ssh_list_kex(4) - ssh_list_kex: languages server->client: 2015-04-06 18:09:35 ACT-INF DAEMON - ssh_socket_unbuffered_write(3) - ssh_socket_unbuffered_write: Enabling POLLOUT for socket 2015-04-06 18:09:35 ACT-INF DAEMON - packet_send2(3) - packet_send2: packet: wrote [len=460,padding=10,comp=449,payload=449] 2015-04-06 18:09:35 ACT-INF DAEMON - ssh_socket_exception_callback(1) - ssh_socket_exception_callback: Socket exception callback: 2 (10053) 2015-04-06 18:09:35 ACT-INF DAEMON - ssh_socket_exception_callback(1) - ssh_socket_exception_callback: Socket error: Unknown error 2015-04-06 18:09:35 ACT-INF DAEMON - ssh_handle_key_exchange(3) - ssh_handle_key_exchange: ssh_handle_key_exchange: current state : 9 2015-04-06 18:09:35 ACT-INF 192.168.1.206:16907 - ERROR (-1) ON KEY EXCHANGE: Socket error: Unknown error Attached is the putty log file. --
|
=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2015.04.06 18:21:36 =~=~=~=~=~=~=~=~=~=~=~= Event Log: Writing new session log (SSH raw data mode) to file: putty.log Event Log: Looking up host "192.168.1.206" Event Log: Connecting to 192.168.1.206 port 2222 Incoming raw data 00000000 53 53 48 2d 32 2e 30 2d 0a 56 41 4f 4e 45 54 20 SSH-2.0-.VAONET 00000010 49 4e 54 45 47 52 41 54 45 44 20 4d 4f 4e 49 54 INTEGRATED MONIT 00000020 4f 52 49 4e 47 20 50 52 4f 56 49 53 49 4f 4e 49 ORING PROVISIONI 00000030 4e 47 20 41 4e 44 20 52 45 50 4f 52 54 49 4e 47 NG AND REPORTING 00000040 20 53 59 53 54 45 4d 0a 55 6e 61 75 74 68 6f 72 SYSTEM.Unauthor 00000050 69 7a 65 64 20 61 63 63 65 73 73 20 74 6f 20 74 ized access to t 00000060 68 69 73 20 6e 65 74 77 6f 72 6b 20 69 73 20 70 his network is p 00000070 72 6f 68 69 62 69 74 65 64 20 62 79 20 74 69 rohibited by ti Event Log: Server version: SSH-2.0- Event Log: We claim version: SSH-2.0-PuTTY_Release_0.60 Outgoing raw data 00000000 53 53 48 2d 32 2e 30 2d 50 75 54 54 59 5f 52 65 SSH-2.0-PuTTY_Re 00000010 6c 65 61 73 65 5f 30 2e 36 30 0d 0a lease_0.60.. Outgoing packet type 20 / 0x14 (SSH2_MSG_KEXINIT) 00000000 99 e5 4d 0f 27 da 95 36 1a 2b 2e 28 6d d5 e0 e0 ..M.'..6.+.(m... 00000010 00 00 00 7e 64 69 66 66 69 65 2d 68 65 6c 6c 6d ...~diffie-hellm 00000020 61 6e 2d 67 72 6f 75 70 2d 65 78 63 68 61 6e 67 an-group-exchang 00000030 65 2d 73 68 61 32 35 36 2c 64 69 66 66 69 65 2d e-sha256,diffie- 00000040 68 65 6c 6c 6d 61 6e 2d 67 72 6f 75 70 2d 65 78 hellman-group-ex 00000050 63 68 61 6e 67 65 2d 73 68 61 31 2c 64 69 66 66 change-sha1,diff 00000060 69 65 2d 68 65 6c 6c 6d 61 6e 2d 67 72 6f 75 70 ie-hellman-group 00000070 31 34 2d 73 68 61 31 2c 64 69 66 66 69 65 2d 68 14-sha1,diffie-h 00000080 65 6c 6c 6d 61 6e 2d 67 72 6f 75 70 31 2d 73 68 ellman-group1-sh 00000090 61 31 00 00 00 0f 73 73 68 2d 72 73 61 2c 73 73 a1....ssh-rsa,ss 000000a0 68 2d 64 73 73 00 00 00 9f 61 65 73 32 35 36 2d h-dss....aes256- 000000b0 63 74 72 2c 61 65 73 32 35 36 2d 63 62 63 2c 72 ctr,aes256-cbc,r 000000c0 69 6a 6e 64 61 65 6c 2d 63 62 63 40 6c 79 73 61 ijndael-cbc@lysa 000000d0 74 6f 72 2e 6c 69 75 2e 73 65 2c 61 65 73 31 39 tor.liu.se,aes19 000000e0 32 2d 63 74 72 2c 61 65 73 31 39 32 2d 63 62 63 2-ctr,aes192-cbc 000000f0 2c 61 65 73 31 32 38 2d 63 74 72 2c 61 65 73 31 ,aes128-ctr,aes1 00000100 32 38 2d 63 62 63 2c 62 6c 6f 77 66 69 73 68 2d 28-cbc,blowfish- 00000110 63 74 72 2c 62 6c 6f 77 66 69 73 68 2d 63 62 63 ctr,blowfish-cbc 00000120 2c 33 64 65 73 2d 63 74 72 2c 33 64 65 73 2d 63 ,3des-ctr,3des-c 00000130 62 63 2c 61 72 63 66 6f 75 72 32 35 36 2c 61 72 bc,arcfour256,ar 00000140 63 66 6f 75 72 31 32 38 00 00 00 9f 61 65 73 32 cfour128....aes2 00000150 35 36 2d 63 74 72 2c 61 65 73 32 35 36 2d 63 62 56-ctr,aes256-cb 00000160 63 2c 72 69 6a 6e 64 61 65 6c 2d 63 62 63 40 6c c,rijndael-cbc@l 00000170 79 73 61 74 6f 72 2e 6c 69 75 2e 73 65 2c 61 65 ysator.liu.se,ae 00000180 73 31 39 32 2d 63 74 72 2c 61 65 73 31 39 32 2d s192-ctr,aes192- 00000190 63 62 63 2c 61 65 73 31 32 38 2d 63 74 72 2c 61 cbc,aes128-ctr,a 000001a0 65 73 31 32 38 2d 63 62 63 2c 62 6c 6f 77 66 69 es128-cbc,blowfi 000001b0 73 68 2d 63 74 72 2c 62 6c 6f 77 66 69 73 68 2d sh-ctr,blowfish- 000001c0 63 62 63 2c 33 64 65 73 2d 63 74 72 2c 33 64 65 cbc,3des-ctr,3de 000001d0 73 2d 63 62 63 2c 61 72 63 66 6f 75 72 32 35 36 s-cbc,arcfour256 000001e0 2c 61 72 63 66 6f 75 72 31 32 38 00 00 00 1f 68 ,arcfour128....h 000001f0 6d 61 63 2d 73 68 61 31 2c 68 6d 61 63 2d 73 68 mac-sha1,hmac-sh 00000200 61 31 2d 39 36 2c 68 6d 61 63 2d 6d 64 35 00 00 a1-96,hmac-md5.. 00000210 00 1f 68 6d 61 63 2d 73 68 61 31 2c 68 6d 61 63 ..hmac-sha1,hmac 00000220 2d 73 68 61 31 2d 39 36 2c 68 6d 61 63 2d 6d 64 -sha1-96,hmac-md 00000230 35 00 00 00 09 6e 6f 6e 65 2c 7a 6c 69 62 00 00 5....none,zlib.. 00000240 00 09 6e 6f 6e 65 2c 7a 6c 69 62 00 00 00 00 00 ..none,zlib..... 00000250 00 00 00 00 00 00 00 00 ........ Outgoing raw data 00000000 00 00 02 64 0a 14 99 e5 4d 0f 27 da 95 36 1a 2b ...d....M.'..6.+ 00000010 2e 28 6d d5 e0 e0 00 00 00 7e 64 69 66 66 69 65 .(m......~diffie 00000020 2d 68 65 6c 6c 6d 61 6e 2d 67 72 6f 75 70 2d 65 -hellman-group-e 00000030 78 63 68 61 6e 67 65 2d 73 68 61 32 35 36 2c 64 xchange-sha256,d 00000040 69 66 66 69 65 2d 68 65 6c 6c 6d 61 6e 2d 67 72 iffie-hellman-gr 00000050 6f 75 70 2d 65 78 63 68 61 6e 67 65 2d 73 68 61 oup-exchange-sha 00000060 31 2c 64 69 66 66 69 65 2d 68 65 6c 6c 6d 61 6e 1,diffie-hellman 00000070 2d 67 72 6f 75 70 31 34 2d 73 68 61 31 2c 64 69 -group14-sha1,di 00000080 66 66 69 65 2d 68 65 6c 6c 6d 61 6e 2d 67 72 6f ffie-hellman-gro 00000090 75 70 31 2d 73 68 61 31 00 00 00 0f 73 73 68 2d up1-sha1....ssh- 000000a0 72 73 61 2c 73 73 68 2d 64 73 73 00 00 00 9f 61 rsa,ssh-dss....a 000000b0 65 73 32 35 36 2d 63 74 72 2c 61 65 73 32 35 36 es256-ctr,aes256 000000c0 2d 63 62 63 2c 72 69 6a 6e 64 61 65 6c 2d 63 62 -cbc,rijndael-cb 000000d0 63 40 6c 79 73 61 74 6f 72 2e 6c 69 75 2e 73 65 c@xxxxxxxxxxxxxx 000000e0 2c 61 65 73 31 39 32 2d 63 74 72 2c 61 65 73 31 ,aes192-ctr,aes1 000000f0 39 32 2d 63 62 63 2c 61 65 73 31 32 38 2d 63 74 92-cbc,aes128-ct 00000100 72 2c 61 65 73 31 32 38 2d 63 62 63 2c 62 6c 6f r,aes128-cbc,blo 00000110 77 66 69 73 68 2d 63 74 72 2c 62 6c 6f 77 66 69 wfish-ctr,blowfi 00000120 73 68 2d 63 62 63 2c 33 64 65 73 2d 63 74 72 2c sh-cbc,3des-ctr, 00000130 33 64 65 73 2d 63 62 63 2c 61 72 63 66 6f 75 72 3des-cbc,arcfour 00000140 32 35 36 2c 61 72 63 66 6f 75 72 31 32 38 00 00 256,arcfour128.. 00000150 00 9f 61 65 73 32 35 36 2d 63 74 72 2c 61 65 73 ..aes256-ctr,aes 00000160 32 35 36 2d 63 62 63 2c 72 69 6a 6e 64 61 65 6c 256-cbc,rijndael 00000170 2d 63 62 63 40 6c 79 73 61 74 6f 72 2e 6c 69 75 -cbc@xxxxxxxxxxx 00000180 2e 73 65 2c 61 65 73 31 39 32 2d 63 74 72 2c 61 .se,aes192-ctr,a 00000190 65 73 31 39 32 2d 63 62 63 2c 61 65 73 31 32 38 es192-cbc,aes128 000001a0 2d 63 74 72 2c 61 65 73 31 32 38 2d 63 62 63 2c -ctr,aes128-cbc, 000001b0 62 6c 6f 77 66 69 73 68 2d 63 74 72 2c 62 6c 6f blowfish-ctr,blo 000001c0 77 66 69 73 68 2d 63 62 63 2c 33 64 65 73 2d 63 wfish-cbc,3des-c 000001d0 74 72 2c 33 64 65 73 2d 63 62 63 2c 61 72 63 66 tr,3des-cbc,arcf 000001e0 6f 75 72 32 35 36 2c 61 72 63 66 6f 75 72 31 32 our256,arcfour12 000001f0 38 00 00 00 1f 68 6d 61 63 2d 73 68 61 31 2c 68 8....hmac-sha1,h 00000200 6d 61 63 2d 73 68 61 31 2d 39 36 2c 68 6d 61 63 mac-sha1-96,hmac 00000210 2d 6d 64 35 00 00 00 1f 68 6d 61 63 2d 73 68 61 -md5....hmac-sha 00000220 31 2c 68 6d 61 63 2d 73 68 61 31 2d 39 36 2c 68 1,hmac-sha1-96,h 00000230 6d 61 63 2d 6d 64 35 00 00 00 09 6e 6f 6e 65 2c mac-md5....none, 00000240 7a 6c 69 62 00 00 00 09 6e 6f 6e 65 2c 7a 6c 69 zlib....none,zli 00000250 62 00 00 00 00 00 00 00 00 00 00 00 00 00 b6 f9 b............... 00000260 3f 37 9e 74 b8 6e 03 22 ?7.t.n." Event Log: Using SSH protocol version 2 Event Log: Incoming packet was garbled on decryption
Re: Errors after migrating from 0.6.0rc1 to 0.6.4 | Kevin Stewart <kstewart@xxxxxxxxxx> |