BUG/MEDIUM: fix risk of segfault with "show tls-keys"

The reference to the tls_keys_ref was not deleted from the
tlskeys_reference linked list.

When the SSL is malconfigured, it can lead to an access to freed memory
during a "show tls-keys" on the admin socked.
This commit is contained in:
William Lallemand 2016-05-20 17:28:07 +02:00 committed by Willy Tarreau
parent d55bd7a6a9
commit 7bba4ccfb6
1 changed files with 1 additions and 0 deletions

View File

@ -8807,6 +8807,7 @@ int check_config_validity()
if(bind_conf->keys_ref) { if(bind_conf->keys_ref) {
free(bind_conf->keys_ref->filename); free(bind_conf->keys_ref->filename);
free(bind_conf->keys_ref->tlskeys); free(bind_conf->keys_ref->tlskeys);
LIST_DEL(&bind_conf->keys_ref->list);
free(bind_conf->keys_ref); free(bind_conf->keys_ref);
} }
#endif /* USE_OPENSSL */ #endif /* USE_OPENSSL */