Skip to content

Commit c29e5ca

Browse files
committed
Bug #33144829: ASAN FAILURE IN AUTH_LDAP_KERBEROS_GLOBAL
The GSS plugin for SASL appears to have leaks. This causes the LDAP SASL client plugin to fail with ASAN and valgrind. Fixed by: 1. making sure sasl_client_done is called by the client's deinit method. 2. add vg and asan suppressions to cover the library leaks. Change-Id: Iceb6fbb2d9483b2fcc51c2a0f004735b288bb4f0
1 parent 5802152 commit c29e5ca

File tree

3 files changed

+46
-1
lines changed

3 files changed

+46
-1
lines changed

libmysql/authentication_ldap/auth_ldap_sasl_client.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ static int initialize_plugin(char *, size_t, int, va_list) {
624624
static int deinitialize_plugin() {
625625
delete g_logger_client;
626626
g_logger_client = nullptr;
627-
627+
sasl_client_done();
628628
return 0;
629629
}
630630

mysql-test/lsan.supp

+3
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,6 @@ leak:ldap_initialize
4141
# It seems some of the SASL plugin have leaks.
4242
# Both LSAN and Valgrind report leaks.
4343
leak:sasl_client_add_plugin
44+
45+
# The GSS API plugin for SASL has leaks.
46+
leak:gss_acquire_cred_from

mysql-test/valgrind.supp

+42
Original file line numberDiff line numberDiff line change
@@ -859,6 +859,48 @@
859859
fun:_sasl_build_mechlist
860860
}
861861

862+
# The GSS API client plugin for Sasl has leaks
863+
{
864+
cyrus libsasl2 GSS API leak 1
865+
Memcheck:Leak
866+
fun:calloc
867+
...
868+
fun:gss_init_sec_context
869+
}
870+
871+
{
872+
cyrus libsasl2 GSS API leak 1.1
873+
Memcheck:Leak
874+
fun:malloc
875+
...
876+
fun:gss_init_sec_context
877+
}
878+
879+
{
880+
cyrus libsasl2 GSS API leak 2
881+
Memcheck:Leak
882+
fun:realloc
883+
...
884+
fun:gss_acquire_cred
885+
}
886+
887+
{
888+
cyrus libsasl2 GSS API leak 3
889+
Memcheck:Leak
890+
fun:calloc
891+
...
892+
fun:gss_acquire_cred
893+
}
894+
895+
{
896+
cyrus libsasl2 GSS API leak 4
897+
Memcheck:Leak
898+
fun:malloc
899+
...
900+
fun:gss_acquire_cred
901+
}
902+
903+
# some more openssl leaks
862904
{
863905
OpenSSL still reachable.
864906
Memcheck:Leak

0 commit comments

Comments
 (0)