Skip to content

Commit 388f2ae

Browse files
author
tb
committed
Plug a long standing leak in libtls CRL handling
X509_STORE_add_crl() does not take ownership of the CRL, it bumps its refcount. So nulling out the CRL from the stack will leak it. Issue reported by KS Sreeram, thanks! ok jsing
1 parent 064659c commit 388f2ae

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/lib/libtls/tls.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: tls.c,v 1.92 2021/10/21 14:31:21 tb Exp $ */
1+
/* $OpenBSD: tls.c,v 1.93 2022/01/25 21:51:24 eric Exp $ */
22
/*
33
* Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
44
*
@@ -647,7 +647,6 @@ tls_configure_ssl_verify(struct tls *ctx, SSL_CTX *ssl_ctx, int verify)
647647
tls_set_error(ctx, "failed to add crl");
648648
goto err;
649649
}
650-
xi->crl = NULL;
651650
}
652651
X509_STORE_set_flags(store,
653652
X509_V_FLAG_CRL_CHECK | X509_V_FLAG_CRL_CHECK_ALL);

0 commit comments

Comments
 (0)