diff options
author | Viktor Dukhovni <openssl-users@dukhovni.org> | 2018-02-09 18:34:33 -0500 |
---|---|---|
committer | Viktor Dukhovni <openssl-users@dukhovni.org> | 2018-02-09 21:06:18 -0500 |
commit | 4e0752535eb87b9aab4cf193f4422b5801ab7b32 (patch) | |
tree | ebf8a82e930f8c885563fc05040b587b78a96fcd /crypto/bio | |
parent | ebc20cfa746cb7dec91aff1e241063d785644fe3 (diff) |
Avoid leaking peername data via accept BIOs
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/bio')
-rw-r--r-- | crypto/bio/bss_acpt.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crypto/bio/bss_acpt.c b/crypto/bio/bss_acpt.c index e426ecd7fd..72ad6a19a9 100644 --- a/crypto/bio/bss_acpt.c +++ b/crypto/bio/bss_acpt.c @@ -275,6 +275,11 @@ static int acpt_state(BIO *b, BIO_ACCEPT *c) BIO_clear_retry_flags(b); b->retry_reason = 0; + OPENSSL_free(c->cache_peer_name); + c->cache_peer_name = NULL; + OPENSSL_free(c->cache_peer_serv); + c->cache_peer_serv = NULL; + s = BIO_accept_ex(c->accept_sock, &c->cache_peer_addr, c->accepted_mode); |