mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-26 21:31:01 +01:00
BUG/MEDIUM: quic: Missing AEAD TAG check after removing header protection
After removing the packet header protection, we can check the packet is long enough to contain a 16 bytes length AEAD TAG (at this end of the packet). This test was missing. Must be backported to 2.6.
This commit is contained in:
parent
adc7641536
commit
ffde3168fc
@ -4628,6 +4628,11 @@ static inline int qc_try_rm_hp(struct quic_conn *qc,
|
||||
|
||||
/* The AAD includes the packet number field found at <pn>. */
|
||||
pkt->aad_len = pn - beg + pkt->pnl;
|
||||
if (pkt->len - pkt->aad_len < QUIC_TLS_TAG_LEN) {
|
||||
TRACE_PROTO("Too short packet", QUIC_EV_CONN_TRMHP, qc);
|
||||
goto err;
|
||||
}
|
||||
|
||||
qpkt_trace = pkt;
|
||||
}
|
||||
else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user