Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-59124

Valgrind finds leaks in ALPN in ppc64le

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • rhel-9.5
    • openssl
    • None
    • No
    • Low
    • rhel-sst-security-crypto
    • ssg_security
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • Hide

      AC1) Openssl server under valgrind with ALPN enabled doesn't report any memory leaks after we run tlsfuzzer/scripts/test-alpn-negotiation.py against it.

      Show
      AC1) Openssl server under valgrind with ALPN enabled doesn't report any memory leaks after we run tlsfuzzer/scripts/test-alpn-negotiation.py against it.
    • Pass
    • Not Needed
    • Automated
    • ppc64le
    • None

      What were you trying to do that didn't work?

      When running an OpenSSL server with ALPN enabled there are memory leaks from the server.

      Valgrind report:

      ==73399== Memcheck, a memory error detector
      ==73399== Copyright (C) 2002-2024, and GNU GPL'd, by Julian Seward et al.
      ==73399== Using Valgrind-3.23.0 and LibVEX; rerun with -h for copyright info
      ==73399== Command: /openssl/BUILD/openssl-3.2.2//apps/openssl s_server -cert server/cert.pem -key server/key.pem -accept 4433 -www -client_renegotiation -alpn http/1.1 -client_renegotiation -legacy_renegotiation
      ==73399== Parent PID: 19687
      ==73399== 
      ==73399== 
      ==73399== Process terminating with default action of signal 15 (SIGTERM)
      ==73399==    at 0x50C9534: accept (in /usr/lib64/libc.so.6)
      ==73399==    by 0x4B23387: BIO_accept_ex (in /usr/lib64/libcrypto.so.3.2.2)
      ==73399==    by 0x21B127: UnknownInlinedFun (s_socket.c:415)
      ==73399==    by 0x21B127: s_server_main (s_server.c:2319)
      ==73399==    by 0x1F3133: do_cmd (openssl.c:426)
      ==73399==    by 0x1CA1FB: main (openssl.c:307)
      ==73399== 
      ==73399== HEAP SUMMARY:
      ==73399==     in use at exit: 1,048,284 bytes in 18,076 blocks
      ==73399==   total heap usage: 61,559 allocs, 43,483 frees, 11,227,425 bytes allocated
      ==73399== 
      ==73399== 80 (32 direct, 48 indirect) bytes in 1 blocks are definitely lost in loss record 751 of 1,119
      ==73399==    at 0x48A5618: malloc (vg_replace_malloc.c:446)
      ==73399==    by 0x4C645C7: CRYPTO_malloc (in /usr/lib64/libcrypto.so.3.2.2)
      ==73399==    by 0x4C64693: CRYPTO_zalloc (in /usr/lib64/libcrypto.so.3.2.2)
      ==73399==    by 0x4CE156B: OPENSSL_sk_new_reserve (in /usr/lib64/libcrypto.so.3.2.2)
      ==73399==    by 0x4CE15FF: OPENSSL_sk_new_null (in /usr/lib64/libcrypto.so.3.2.2)
      ==73399==    by 0x21962F: s_server_main (s_server.c:1315)
      ==73399==    by 0x1F3133: do_cmd (openssl.c:426)
      ==73399==    by 0x1CA1FB: main (openssl.c:307)
      ==73399== 
      ==73399== 112 bytes in 1 blocks are definitely lost in loss record 785 of 1,119
      ==73399==    at 0x48A5618: malloc (vg_replace_malloc.c:446)
      ==73399==    by 0x4C645C7: CRYPTO_malloc (in /usr/lib64/libcrypto.so.3.2.2)
      ==73399==    by 0x4C64693: CRYPTO_zalloc (in /usr/lib64/libcrypto.so.3.2.2)
      ==73399==    by 0x4D30BB7: X509_VERIFY_PARAM_new (in /usr/lib64/libcrypto.so.3.2.2)
      ==73399==    by 0x21708F: s_server_main (s_server.c:1098)
      ==73399==    by 0x1F3133: do_cmd (openssl.c:426)
      ==73399==    by 0x1CA1FB: main (openssl.c:307)
      ==73399== 
      ==73399== LEAK SUMMARY:
      ==73399==    definitely lost: 144 bytes in 2 blocks
      ==73399==    indirectly lost: 48 bytes in 1 blocks
      ==73399==      possibly lost: 0 bytes in 0 blocks
      ==73399==    still reachable: 1,048,092 bytes in 18,073 blocks
      ==73399==         suppressed: 0 bytes in 0 blocks
      ==73399== Reachable blocks (those to which a pointer was found) are not shown.
      ==73399== To see them, rerun with: --leak-check=full --show-leak-kinds=all
      ==73399== 
      ==73399== For lists of detected and suppressed errors, rerun with: -s
      ==73399== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0) 

      What is the impact of this issue to you?

      very low

      Please provide the package NVR for which the bug is seen:

      openssl-3.2.2-6.el9_5.ppc64le

      How reproducible is this bug?:

      Always

      Steps to reproduce

      1. run openssl server under valgrid: "valgrind --leak-check=full --free-fill=0 --log-file=valgrind.log --error-exitcode=11 openssl s_server -cert cert.pem -key key.pem -www -client_renegotiation -alpn 'http/1.1'-client_renegotiation -legacy_renegotiation"
      2. run tlsfuzzer/scripts/test-alpn-negotiation.py against the server
      3. read valgrind.log file

      Expected results

      No memory leaks are present

      Actual results

      There are memory leaks

              dbelyavs@redhat.com Dmitry Belyavskiy
              rh-ee-gpantela George Pantelakis
              Dmitry Belyavskiy Dmitry Belyavskiy
              George Pantelakis George Pantelakis
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: