Memory leaks in SSH checks

XMLWordPrintable

    • Type: Incident report
    • Resolution: Won't fix
    • Priority: Minor
    • None
    • Affects Version/s: None
    • Component/s: Proxy (P), Server (S)
    • None
    • Environment:
      Debian 7.6
      libssh2 1.4.2-1.1, built with libgcrypt 1.5.0-5+deb7u1

      The following memory leaks happens on every SSH check:

      ...
      1919609. [00:00:41.469] malloc(24) = 0x811160
      # allocation summary: 1890 block(s) with total size 45360
              0x7f67282539a9 _gcry_malloc() at global.c:792
              0x7f6728253cef _gcry_xmalloc() at global.c:946
              0x7f672829ceba _gcry_mpi_alloc() at mpiutil.c:51
              0x7f672a0f79b7 diffie_hellman_sha1() from /usr/lib/x86_64-linux-gnu/libssh2.so.1.0.1
              0x7f672a0f9197 kex_method_diffie_hellman_group14_sha1_key_exchange() from /usr/lib/x86_64-linux-gnu/libssh2.so.1.0.1
              0x7f672a0f990b _libssh2_kex_exchange() from /usr/lib/x86_64-linux-gnu/libssh2.so.1.0.1
              0x7f672a1010a2 libssh2_session_handshake() from /usr/lib/x86_64-linux-gnu/libssh2.so.1.0.1
              0x41e855 ssh_run() at checks_ssh.c:111
              0x41f4e4 get_value_ssh() at checks_ssh.c:381
              0x4206e6 get_value() at poller.c:460
      

      Apparently it is an old bug in libgcrypt (people where complaining 4 years ago about leaks with similar backtraces).

      Using libssh2 built with openssl solves this problem.

            Assignee:
            Unassigned
            Reporter:
            Andris Zeila
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: