]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: ssl: bind_conf is uncorrectly accessed when using QUIC
authorWilliam Lallemand <wlallemand@haproxy.org>
Thu, 10 Nov 2022 15:45:24 +0000 (16:45 +0100)
committerWilliam Lallemand <wlallemand@haproxy.org>
Thu, 10 Nov 2022 15:56:21 +0000 (16:56 +0100)
Since commit 9b2598 ("BUG/MEDIUM: ssl: Verify error codes can exceed
63"), the ca_ignerr_bitfield and crt_ignerr_bietfield are incorrecly
accessed from __objt_listener(conn->target)->bind_conf which is not
avaiable from QUIC. The bind_conf variable was mistakenly replaced.

This patch fixes the issue by using again the bind_conf variable.

Must be backported where 9b2598 was backported.

src/ssl_sock.c

index 811b3d8ea1b66333da223e933ae8541170e77d23..8dba5010a2ae7ead78871321c4cd58ba1a9c33fe 100644 (file)
@@ -1778,7 +1778,7 @@ int ssl_sock_bind_verifycbk(int ok, X509_STORE_CTX *x_store)
                }
 
                if (err <= SSL_MAX_VFY_ERROR_CODE &&
-                   cert_ignerr_bitfield_get(__objt_listener(conn->target)->bind_conf->ca_ignerr_bitfield, err))
+                   cert_ignerr_bitfield_get(bind_conf->ca_ignerr_bitfield, err))
                        goto err_ignored;
 
                /* TODO: for QUIC connection, this error code is lost */
@@ -1792,7 +1792,7 @@ int ssl_sock_bind_verifycbk(int ok, X509_STORE_CTX *x_store)
 
        /* check if certificate error needs to be ignored */
        if (err <= SSL_MAX_VFY_ERROR_CODE &&
-           cert_ignerr_bitfield_get(__objt_listener(conn->target)->bind_conf->crt_ignerr_bitfield, err))
+           cert_ignerr_bitfield_get(bind_conf->crt_ignerr_bitfield, err))
                goto err_ignored;
 
        /* TODO: for QUIC connection, this error code is lost */