]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: fix risk of segfault with "show tls-keys"
authorWilliam Lallemand <wlallemand@haproxy.com>
Fri, 20 May 2016 15:28:07 +0000 (17:28 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 31 May 2016 18:30:01 +0000 (20:30 +0200)
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.

src/cfgparse.c

index fed5bd5377b577017aa5c93b6d6b2762154f3044..d9afd843f7f5105b128d82becfbea7b2df3cee45 100644 (file)
@@ -8807,6 +8807,7 @@ out_uri_auth_compat:
                        if(bind_conf->keys_ref) {
                                free(bind_conf->keys_ref->filename);
                                free(bind_conf->keys_ref->tlskeys);
+                               LIST_DEL(&bind_conf->keys_ref->list);
                                free(bind_conf->keys_ref);
                        }
 #endif /* USE_OPENSSL */