diff options
author | tb <> | 2022-08-30 18:23:40 +0000 |
---|---|---|
committer | tb <> | 2022-08-30 18:23:40 +0000 |
commit | c364f0902430d04cc0655bcf6e0aea5961401575 (patch) | |
tree | 346bc1efbdad4a3b0b480be491d62f6d22289578 /src | |
parent | 5e6ff032e09d476431950fd5388af09d6621fc54 (diff) | |
download | openbsd-c364f0902430d04cc0655bcf6e0aea5961401575.tar.gz openbsd-c364f0902430d04cc0655bcf6e0aea5961401575.tar.bz2 openbsd-c364f0902430d04cc0655bcf6e0aea5961401575.zip |
Plug leak of BIO in tls13_quic_init()
If rbio and wbio are the same, SSL_free() only frees one BIO, so the
BIO_up_ref() before SSL_set_bio() leads to a leak.
ok jsing
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libssl/tls13_quic.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/libssl/tls13_quic.c b/src/lib/libssl/tls13_quic.c index 92bbb011c8..bb7317d4c5 100644 --- a/src/lib/libssl/tls13_quic.c +++ b/src/lib/libssl/tls13_quic.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tls13_quic.c,v 1.5 2022/08/27 09:12:55 jsing Exp $ */ | 1 | /* $OpenBSD: tls13_quic.c,v 1.6 2022/08/30 18:23:40 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2022 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2022 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -175,7 +175,6 @@ tls13_quic_init(struct tls13_ctx *ctx) | |||
175 | if ((bio = BIO_new(BIO_s_null())) == NULL) | 175 | if ((bio = BIO_new(BIO_s_null())) == NULL) |
176 | return 0; | 176 | return 0; |
177 | 177 | ||
178 | BIO_up_ref(bio); | ||
179 | SSL_set_bio(ctx->ssl, bio, bio); | 178 | SSL_set_bio(ctx->ssl, bio, bio); |
180 | bio = NULL; | 179 | bio = NULL; |
181 | 180 | ||