#186: libssh gets stuck at kex_method_diffie_hellman_groupGP_sha1_key_exchange.
CPU utilization goes upto 100%
--------------------------------------------------------------------------------------+
Reporter: www.google.com/accounts/o8/id?id=aitoawlhggg_yplkl7grwwpbbum-omtqud4rmna | Owner:
Type: defect | Status: new
Priority: normal | Milestone: 1.2.6
Component: crypto | Version: 1.2.2
Keywords: | Blocks:
Blocked By: |
--------------------------------------------------------------------------------------+
Hello,
We are using libssh2 to programatically ssh into routers. Overall the
experience with the library has been very good. However intermittently our
processes get stuck while trying to login to a Juniper (running Junos
8.1R4.3) routers. Doing a backtrace we get
(gdb) bt
#0 0x00002b9d4f8f7262 in gcry_mpi_copy () from /usr/lib64/libgcrypt.so.11
#1 0x00002b9d4f8f4f84 in gcry_mpi_scan () from /usr/lib64/libgcrypt.so.11
#2 0x00002b9d4f8f2d41 in gcry_mpi_powm () from /usr/lib64/libgcrypt.so.11
#3 0x00002b9d4b6c76e7 in
kex_method_diffie_hellman_groupGP_sha1_key_exchange
(session=0x156d770, g=0x1282050, p=0x11b0640, group_order=129,
packet_type_init=32 ' ', packet_type_reply=33 '!', midhash=0x14f2a51
"",
midhash_len=138, exchange_state=0x1571b70) at kex.c:108
#4 0x00002b9d4b6c8e9c in
kex_method_diffie_hellman_group_exchange_sha1_key_exchange
(session=0x156d770,
key_state=0x1571b58) at kex.c:886
#5 0x00002b9d4b6c9b00 in libssh2_kex_exchange (session=0x156d770,
reexchange=<value optimized out>, key_state=0x1571b40) at kex.c:1766
#6 0x00002b9d4b6d140e in libssh2_session_startup (session=0x156d770,
sock=22)
at session.c:594
#7 0x00000000004d8243 in SSHSession::setupSession ()
#8 0x00000000004e4678 in QuerySession::doWrite ()
#9 0x00000000004d9985 in QuerySession::fdWriteReady ()
#10 0x00000000007a2d15 in Scheduler::run ()
#11 0x00000000005230c8 in main ()
(gdb)
We have looked quite thoroughly at our code to determine any memory
corruptions and the like, but we couldn't find any. The error occurs only
for this particular platform and s/w version. This makes us think that
there may be a condition in the library code which could be causing this
problem. Please advise on the best way to address this concern.
Thanks,
Jasmeet
-- Ticket URL: <http://trac.libssh2.org/ticket/186> libssh2 <http://trac.libssh2.org/> C library for writing portable SSH2 clients _______________________________________________ libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-develReceived on 2010-09-24