]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: quic: Possible crash when verifying certificates
authorFrédéric Lécaille <flecaille@haproxy.com>
Tue, 6 Sep 2022 17:37:08 +0000 (19:37 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 6 Sep 2022 18:42:02 +0000 (20:42 +0200)
commit2be0ac55e10aec6ba3eaef4ccd7d6fe3fe10633c
tree267c4c404bb54748336fc68b71f21633711a99b1
parenta9e934bbd189b7d85af454f03ec1ade692154fd5
BUG/MINOR: quic: Possible crash when verifying certificates

This verification is done by ssl_sock_bind_verifycbk() which is set at different
locations in the ssl_sock.c code . About QUIC connections, there are a lot of chances
the connection object is not initialized when entering this function. What must
be accessed is the SSL object to retrieve the connection or quic_conn objects,
then the bind_conf object of the listener. If the connection object is not found,
we try to find the quic_conn object.

Modify ssl_sock_dump_errors() interface which takes a connection object as parameter
to also passed a quic_conn object as parameter. Again this function try first
to access the connection object if not NULL or the quic_conn object if not.

There is a remaining thing to do for QUIC: store the certificate verification error
code as it is currently stored in the connection object. This error code is at least
used by the "bc_err" and "fc_err" sample fetches.

There are chances this bug is in relation with GH #1851. Thank you to @tasavis
for the report.

Must be merged into 2.6.
src/ssl_sock.c