Skip to content

Commit c4ec6bb

Browse files
committed
"flush ssl" ASAN warnings with yassl
avoid calling SSL_get_verify_mode() and SSL_get_verify_depth(), since yassl implementation of the function accesses the acceptor context, which can be freed on FLUSH SSL command.
1 parent 0ce7f6b commit c4ec6bb

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

sql/mysqld.cc

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7551,18 +7551,6 @@ static int show_ssl_get_version(THD *thd, SHOW_VAR *var, char *buff,
75517551
return 0;
75527552
}
75537553

7554-
static int show_ssl_session_reused(THD *thd, SHOW_VAR *var, char *buff,
7555-
enum enum_var_type scope)
7556-
{
7557-
var->type= SHOW_LONG;
7558-
var->value= buff;
7559-
if( thd->vio_ok() && thd->net.vio->ssl_arg )
7560-
*((long *)buff)= (long)SSL_session_reused((SSL*) thd->net.vio->ssl_arg);
7561-
else
7562-
*((long *)buff)= 0;
7563-
return 0;
7564-
}
7565-
75667554
static int show_ssl_get_default_timeout(THD *thd, SHOW_VAR *var, char *buff,
75677555
enum enum_var_type scope)
75687556
{
@@ -7580,10 +7568,14 @@ static int show_ssl_get_verify_mode(THD *thd, SHOW_VAR *var, char *buff,
75807568
{
75817569
var->type= SHOW_LONG;
75827570
var->value= buff;
7571+
#ifndef HAVE_YASSL
75837572
if( thd->net.vio && thd->net.vio->ssl_arg )
75847573
*((long *)buff)= (long)SSL_get_verify_mode((SSL*)thd->net.vio->ssl_arg);
75857574
else
75867575
*((long *)buff)= 0;
7576+
#else
7577+
*((long *)buff) = 0;
7578+
#endif
75877579
return 0;
75887580
}
75897581

@@ -7592,10 +7584,15 @@ static int show_ssl_get_verify_depth(THD *thd, SHOW_VAR *var, char *buff,
75927584
{
75937585
var->type= SHOW_LONG;
75947586
var->value= buff;
7587+
#ifndef HAVE_YASSL
75957588
if( thd->vio_ok() && thd->net.vio->ssl_arg )
75967589
*((long *)buff)= (long)SSL_get_verify_depth((SSL*)thd->net.vio->ssl_arg);
75977590
else
75987591
*((long *)buff)= 0;
7592+
#else
7593+
*((long *)buff)= 0;
7594+
#endif
7595+
75997596
return 0;
76007597
}
76017598

0 commit comments

Comments
 (0)