[Ssh-sftp-perl-users] Net::SSH2 segfault on connect
Brought to you by:
dbrobins
From: Courtlyn M. <cmc...@gm...> - 2009-03-03 22:00:10
|
I've been using Net::SSH2 0.18 with libssh2 1.0 on Solaris 5.10 to pull back log files from remote servers for a couple of weeks now. I recently added some Red Hat servers into the client list and I ran into a segfault right after I issued the connect statement. I was able to back trace the core and it showed an out of bounds problem with the default aes256-cbc crypt. After I declared a crypt I was able to connect to these servers without a problem. The trace is below for those that are interested, I can also include a snippet of the code if needed. I'm now passing a list of crypts without aes256-cbc, but I've tested and if aes256-cbc is the first choice in the lineup it won't be gracefully passed over. Does anyone know of a way I can either test for incompatibilities before the segfault or at least capture the failure and retry with a different crypt rather then core dumping? Thanks, Cory Program terminated with signal 11, Segmentation fault. #0 0x00000000 in ?? () (gdb) bt #0 0x00000000 in ?? () #1 0xfee2b4a4 in _libssh2_cipher_init (h=0x228bc8, algo=0x228bc8, iv=0xfffffff8 <Address 0xfffffff8 out of bounds>, secret=0xffffffff <Address 0xffffffff out of bounds>, encrypt=0) at openssl.c:171 #2 0xfee17e70 in _libssh2_init (session=0x57900, method=0xfee3f584, iv=0x2a180 "¬Úátò226ú¤P:ô", free_iv=0xffbff51c, secret=0x229858 "æ07\005P+Ç®\177 \226\2054\230\001\223Y&ö020\031_+\234ÿ\035Â\034[\215´'ߺ\fã", free _secret=0xffbff518, encrypt=1, abstract=0xfee2b494) at crypt.c:87 #3 0xfee195a0 in libssh2_kex_method_diffie_hellman_groupGP_sha1_key_exchange ( session=0x57900, g=0x36d8a0, p=0x36d880, group_order=172416, packet_type_init=76 'L', packet_type_reply=196 'Ä, midhash=0xffbff520 "\020\031_+\234ÿ\035Â\034[\215´'ߺ\fã", midhash_len=0, exchange_state=0x58bb4) at kex.c:494 #4 0xfee19930 in libssh2_kex_method_diffie_hellman_group14_sha1_key_exchange ( session=0x57900, key_state=0x58ba8) at kex.c:785 #5 0xfee1a500 in libssh2_kex_exchange (session=0x57900, reexchange=2259352, key_state=0x58b9c) at kex.c:1770 #6 0xfee21b60 in libssh2_session_startup (session=0x57900, sock=358656) at session.c:588 #7 0xfee58e88 in XS_Net__SSH2__startup () from /usr/perl5/site_perl/5.8.4/sun4-solaris-64int/auto/Net/SSH2/SSH2.so #8 0xff2a757c in Perl_pp_entersub () from /usr/perl5/5.8.4/lib/sun4-solaris-64int/CORE/libperl.so.1 #9 0xff2e28dc in Perl_runops_standard () from /usr/perl5/5.8.4/lib/sun4-solaris-64int/CORE/libperl.so.1 #10 0xff268ab4 in S_run_body () from /usr/perl5/5.8.4/lib/sun4-solaris-64int/CORE/libperl.so.1 #11 0xff268610 in perl_run () from /usr/perl5/5.8.4/lib/sun4-solaris-64int/CORE/libperl.so.1 #12 0x00011038 in main () (gdb) |