BUG/MEDIUM: quic: Non initialized CRYPTO data stream deferencing
authorFrédéric Lécaille <flecaille@haproxy.com>
Mon, 13 Nov 2023 08:06:59 +0000 (09:06 +0100)
committerFrédéric Lécaille <flecaille@haproxy.com>
Mon, 13 Nov 2023 15:00:25 +0000 (16:00 +0100)
commit840af0928b15bd398c3e945cb7c44f50f7c38780
treeaf0c717b44e349800e4f8339ac243c280462008d
parent59b313832af476377aaba40ecc7ee4e166c922d8
BUG/MEDIUM: quic: Non initialized CRYPTO data stream deferencing

This bug arrived with this commit:
   BUG/MINOR: quic: Useless use of non-contiguous buffer for in order CRYPTO data

Before this commit qc->cstream was tested before entering qc_treat_rx_crypto_frms().
This patch restablishes this behavior. Furthermore, it simplyfies
qc_ssl_provide_all_quic_data() which is a little bit ugly: the CRYPTO data
frame may be freed asap in the list_for_each_entry_safe() block after
having store its data pointer and length in local variables.
Also interrupt the CRYPTO data process as soon as qc_ssl_provide_quic_data()
or qc_treat_rx_crypto_frms() fail.

No need to be backported.
src/quic_ssl.c