Skip to content

Commit

Permalink
Issue proftpd#859, proftpd#861: Fix handling of CRL lookups by proper…
Browse files Browse the repository at this point in the history
…ly using issuer for

lookups, and guarding against null pointers.
  • Loading branch information
Castaglia authored and alexandr nedvedicky - Sun Microsystems - Prague Czech Republic committed Dec 16, 2019
1 parent 9a18af0 commit 36b6bdf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions NEWS
Expand Up @@ -28,6 +28,7 @@
for symlinks (CVE-2017-7418).
- Bug 4299 - TimeoutLogin not working for SFTP connections.
- Issue 846 - Remote denial-of-service due to issue in network IO handling.
- Issue 859 - Improper handling of TLS CRL lookups.

1.3.6rc4 - Released 15-Jan-2017
--------------------------------
Expand Down
7 changes: 5 additions & 2 deletions contrib/mod_tls.c
Expand Up @@ -8972,10 +8972,10 @@ static int tls_verify_crl(int ok, X509_STORE_CTX *ctx) {

#if OPENSSL_VERSION_NUMBER >= 0x10100000L && \
!defined(HAVE_LIBRESSL)
crls = X509_STORE_CTX_get1_crls(store_ctx, subject);
crls = X509_STORE_CTX_get1_crls(store_ctx, issuer);
#elif OPENSSL_VERSION_NUMBER >= 0x10000000L && \
!defined(HAVE_LIBRESSL)
crls = X509_STORE_get1_crls(store_ctx, subject);
crls = X509_STORE_get1_crls(store_ctx, issuer);
#else
/* Your OpenSSL is before 1.0.0. You really need to upgrade. */
crls = NULL;
Expand All @@ -8994,6 +8994,9 @@ static int tls_verify_crl(int ok, X509_STORE_CTX *ctx) {
ASN1_INTEGER *sn;

revoked = sk_X509_REVOKED_value(X509_CRL_get_REVOKED(crl), j);
if (revoked == NULL) {
continue;
}
#if OPENSSL_VERSION_NUMBER >= 0x10100000L && \
!defined(HAVE_LIBRESSL)
sn = X509_REVOKED_get0_serialNumber(revoked);
Expand Down

0 comments on commit 36b6bdf

Please sign in to comment.