BUG/MINOR: quic: Possible crash when acknowledging Initial v2 packets

The memory allocated for TLS cipher context used to encrypt/decrypt QUIC v2
packets should not be released as soon as possible. Indeed, even if
after having received an client Handshake packet one may drop the Initial
TLS cipher context, one has often to used it to acknowledged Initial packets.

No need to backport.
This commit is contained in:
Frédéric Lécaille 2023-07-22 11:46:15 +02:00
parent 454c372b60
commit 8d19366832

View File

@ -3390,8 +3390,6 @@ static int qc_parse_pkt_frms(struct quic_conn *qc, struct quic_rx_packet *pkt,
qc_set_timer(qc);
qc_el_rx_pkts_del(qc->iel);
qc_release_pktns_frms(qc, qc->ipktns);
/* Also release the negotiated Inital TLS context. */
quic_nictx_free(qc);
}
if (qc->state < QUIC_HS_ST_SERVER_HANDSHAKE)
qc->state = QUIC_HS_ST_SERVER_HANDSHAKE;