Skip to content

[v9_11] Suppress memory leak detection in libcrypto.so

ASAN CFLAGS trickle down to configure tests where it identified a memory leak in the libcrypto.so library and thus prevented GOST, ECDSA, and EDDSA algorithm support detection on 9.11:

configure:14218: checking for OpenSSL ECDSA support
configure:14244: gcc -o conftest  -fsanitize=address,undefined -DISC_MEM_USE_INTERNAL_MALLOC=0  -D_GNU_SOURCE -fsanitize=address,undefined conftest.c -lcrypto -lpthread  >&5
configure:14244: $? = 0
configure:14244: ./conftest

=================================================================
==8076==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 160 byte(s) in 2 object(s) allocated from:
    #0 0x7f23c6367330 in __interceptor_malloc (/lib/x86_64-linux-gnu/libasan.so.5+0xe9330)
    #1 0x7f23c6123558 in CRYPTO_zalloc (/lib/x86_64-linux-gnu/libcrypto.so.1.1+0x18e558)

Indirect leak of 1968 byte(s) in 48 object(s) allocated from:
    #0 0x7f23c6367330 in __interceptor_malloc (/lib/x86_64-linux-gnu/libasan.so.5+0xe9330)
    #1 0x7f23c6123558 in CRYPTO_zalloc (/lib/x86_64-linux-gnu/libcrypto.so.1.1+0x18e558)

Indirect leak of 312 byte(s) in 3 object(s) allocated from:
    #0 0x7f23c6367330 in __interceptor_malloc (/lib/x86_64-linux-gnu/libasan.so.5+0xe9330)
    #1 0x7f23c6066406 in BN_MONT_CTX_new (/lib/x86_64-linux-gnu/libcrypto.so.1.1+0xd1406)

Indirect leak of 40 byte(s) in 2 object(s) allocated from:
    #0 0x7f23c6367330 in __interceptor_malloc (/lib/x86_64-linux-gnu/libasan.so.5+0xe9330)
    #1 0x7f23c60b252f in EC_GROUP_set_seed (/lib/x86_64-linux-gnu/libcrypto.so.1.1+0x11d52f)

SUMMARY: AddressSanitizer: 2480 byte(s) leaked in 55 allocation(s).
configure:14244: $? = 1
configure: program exited with status 1

Formerly:

  • gcc:buster:amd64 has ECDSA and EDDSA enabled
  • gcc:asan on the same buster image has ECDSA and EDDSA disabled
  • clang:asan on the same buster image has ECDSA and EDDSA disabled Now:
  • gcc:asan on the same buster image has ECDSA and EDDSA enabled
  • clang:asan on the same buster image has ECDSA and EDDSA enabled
Edited by Michal Nowak

Merge request reports