Bug 2144795
| Summary: | Memory leaks at key build | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | Norbert Pócs <npocs> |
| Component: | libssh | Assignee: | Norbert Pócs <npocs> |
| Status: | CLOSED ERRATA | QA Contact: | Stanislav Zidek <szidek> |
| Severity: | low | Docs Contact: | |
| Priority: | medium | ||
| Version: | 9.2 | CC: | jjelen |
| Target Milestone: | rc | Keywords: | Triaged |
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | libssh-0.10.4-6.el9 | Doc Type: | No Doc Update |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2023-05-09 08:15:49 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (libssh bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2023:2476 |
Description of problem: Memory leaks were introduced by openssl 3.0 support at key build functions for RSA and DSA. Version-Release number of selected component (if applicable): libssh-0.10.4-3.el9 How reproducible: run test `torture_algorithms` with `valgrind --leak-check=full` Steps to Reproduce: 1. 2. 3. Actual results: ==49166== Memcheck, a memory error detector ==49166== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al. ==49166== Using Valgrind-3.19.0 and LibVEX; rerun with -h for copyright info ==49166== Command: tests/client/torture_algorithms ==49166== [==========] Running 59 test(s). OK: SSH-2.0-OpenSSH_8.8 [ RUN ] torture_algorithms_aes128_cbc_hmac_sha1 [ OK ] torture_algorithms_aes128_cbc_hmac_sha1 [ RUN ] torture_algorithms_aes128_cbc_hmac_sha2_256 [ OK ] torture_algorithms_aes128_cbc_hmac_sha2_256 . . . [ RUN ] torture_algorithms_ecdh_sha2_nistp521 [ OK ] torture_algorithms_ecdh_sha2_nistp521 [==========] 59 test(s) run. [ PASSED ] 59 test(s). [==========] Running 3 test(s). OK: SSH-2.0-OpenSSH_8.8 OK: SSH-2.0-OpenSSH_8.8 [ RUN ] torture_algorithms_aes128_gcm_mac [ OK ] torture_algorithms_aes128_gcm_mac [ RUN ] torture_algorithms_aes256_gcm_mac [ OK ] torture_algorithms_aes256_gcm_mac [ RUN ] torture_algorithms_chacha20_poly1305_mac [ OK ] torture_algorithms_chacha20_poly1305_mac [==========] 3 test(s) run. [ PASSED ] 3 test(s). ==49166== ==49166== HEAP SUMMARY: ==49166== in use at exit: 2,856 bytes in 14 blocks ==49166== total heap usage: 97,087 allocs, 97,073 frees, 63,437,782 bytes allocated ==49166== ==49166== 560 (48 direct, 512 indirect) bytes in 2 blocks are definitely lost in loss record 2 of 4 ==49166== at 0x484586F: malloc (vg_replace_malloc.c:381) ==49166== by 0x4A634DC: CRYPTO_zalloc (mem.c:197) ==49166== by 0x4999652: BN_new (bn_lib.c:247) ==49166== by 0x466941: ssh_make_string_bn (bignum.c:77) ==49166== by 0x41BAA8: ssh_buffer_unpack_va (buffer.c:1166) ==49166== by 0x41C481: _ssh_buffer_unpack (buffer.c:1360) ==49166== by 0x46356B: ssh_packet_client_dhgex_reply (dh-gex.c:262) ==49166== by 0x438CE7: ssh_packet_process (packet.c:1494) ==49166== by 0x43869C: ssh_packet_socket_callback (packet.c:1336) ==49166== by 0x445EA6: ssh_socket_pollcallback (socket.c:336) ==49166== by 0x44324D: ssh_poll_ctx_dopoll (poll.c:720) ==49166== by 0x444C3D: ssh_handle_packets (session.c:665) ==49166== ==49166== 2,296 (120 direct, 2,176 indirect) bytes in 5 blocks are definitely lost in loss record 4 of 4 ==49166== at 0x484586F: malloc (vg_replace_malloc.c:381) ==49166== by 0x4A634DC: CRYPTO_zalloc (mem.c:197) ==49166== by 0x4999652: BN_new (bn_lib.c:247) ==49166== by 0x466941: ssh_make_string_bn (bignum.c:77) ==49166== by 0x41BAA8: ssh_buffer_unpack_va (buffer.c:1166) ==49166== by 0x41C481: _ssh_buffer_unpack (buffer.c:1360) ==49166== by 0x425270: ssh_packet_client_dh_reply (dh.c:366) ==49166== by 0x438CE7: ssh_packet_process (packet.c:1494) ==49166== by 0x43869C: ssh_packet_socket_callback (packet.c:1336) ==49166== by 0x445EA6: ssh_socket_pollcallback (socket.c:336) ==49166== by 0x44324D: ssh_poll_ctx_dopoll (poll.c:720) ==49166== by 0x444C3D: ssh_handle_packets (session.c:665) ==49166== ==49166== LEAK SUMMARY: ==49166== definitely lost: 168 bytes in 7 blocks ==49166== indirectly lost: 2,688 bytes in 7 blocks ==49166== possibly lost: 0 bytes in 0 blocks ==49166== still reachable: 0 bytes in 0 blocks ==49166== suppressed: 0 bytes in 0 blocks ==49166== ==49166== For lists of detected and suppressed errors, rerun with: -s ==49166== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0) Expected results: ==47406== Memcheck, a memory error detector ==47406== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al. ==47406== Using Valgrind-3.19.0 and LibVEX; rerun with -h for copyright info ==47406== Command: tests/client/torture_algorithms ==47406== [==========] Running 59 test(s). OK: SSH-2.0-OpenSSH_8.8 [ RUN ] torture_algorithms_aes128_cbc_hmac_sha1 [ OK ] torture_algorithms_aes128_cbc_hmac_sha1 [ RUN ] torture_algorithms_aes128_cbc_hmac_sha2_256 [ OK ] torture_algorithms_aes128_cbc_hmac_sha2_256 . . . [ RUN ] torture_algorithms_ecdh_sha2_nistp521 [ OK ] torture_algorithms_ecdh_sha2_nistp521 [==========] 59 test(s) run. [ PASSED ] 59 test(s). [==========] Running 3 test(s). OK: SSH-2.0-OpenSSH_8.8 OK: SSH-2.0-OpenSSH_8.8 [ RUN ] torture_algorithms_aes128_gcm_mac [ OK ] torture_algorithms_aes128_gcm_mac [ RUN ] torture_algorithms_aes256_gcm_mac [ OK ] torture_algorithms_aes256_gcm_mac [ RUN ] torture_algorithms_chacha20_poly1305_mac [ OK ] torture_algorithms_chacha20_poly1305_mac [==========] 3 test(s) run. [ PASSED ] 3 test(s). ==47406== ==47406== HEAP SUMMARY: ==47406== in use at exit: 0 bytes in 0 blocks ==47406== total heap usage: 97,084 allocs, 97,084 frees, 63,435,757 bytes allocated ==47406== ==47406== All heap blocks were freed -- no leaks are possible ==47406== ==47406== For lists of detected and suppressed errors, rerun with: -s ==47406== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Additional info: