mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 14:21:25 +02:00
BUG/MEDIUM: quic: fix crash on CC if mux not present
If a CONNECTION_CLOSE is received during handshake or after mux release, a segfault happens due to invalid dereferencement of qc->qcc. Check mux_state first to prevent this.
This commit is contained in:
parent
8524f0f779
commit
4af6595d41
@ -2448,7 +2448,8 @@ static int qc_parse_pkt_frms(struct quic_rx_packet *pkt, struct ssl_sock_ctx *ct
|
|||||||
case QUIC_FT_CONNECTION_CLOSE:
|
case QUIC_FT_CONNECTION_CLOSE:
|
||||||
case QUIC_FT_CONNECTION_CLOSE_APP:
|
case QUIC_FT_CONNECTION_CLOSE_APP:
|
||||||
/* warn the mux to close the connection */
|
/* warn the mux to close the connection */
|
||||||
qc->qcc->flags |= QC_CF_CC_RECV;
|
if (qc->mux_state == QC_MUX_READY)
|
||||||
|
qc->qcc->flags |= QC_CF_CC_RECV;
|
||||||
tasklet_wakeup(qc->qcc->wait_event.tasklet);
|
tasklet_wakeup(qc->qcc->wait_event.tasklet);
|
||||||
break;
|
break;
|
||||||
case QUIC_FT_HANDSHAKE_DONE:
|
case QUIC_FT_HANDSHAKE_DONE:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user