mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 05:41:26 +02:00
BUG/MEDIUM: quic: error checking buffer large enought to receive the retry tag
Building a retry message, the offset of the tag was checked instead of the remaining length into the buffer. Must be backported as far as 2.6.
This commit is contained in:
parent
e12e202f6a
commit
f473eb7206
@ -6677,7 +6677,7 @@ static int send_retry(int fd, struct sockaddr_storage *addr,
|
|||||||
i += token_len;
|
i += token_len;
|
||||||
|
|
||||||
/* token integrity tag */
|
/* token integrity tag */
|
||||||
if ((&buf[i] - buf < QUIC_TLS_TAG_LEN) ||
|
if ((sizeof(buf) - i < QUIC_TLS_TAG_LEN) ||
|
||||||
!quic_tls_generate_retry_integrity_tag(pkt->dcid.data,
|
!quic_tls_generate_retry_integrity_tag(pkt->dcid.data,
|
||||||
pkt->dcid.len, buf, i, qv)) {
|
pkt->dcid.len, buf, i, qv)) {
|
||||||
TRACE_ERROR("quic_tls_generate_retry_integrity_tag() failed", QUIC_EV_CONN_TXPKT);
|
TRACE_ERROR("quic_tls_generate_retry_integrity_tag() failed", QUIC_EV_CONN_TXPKT);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user