Skip to content

Commit 96403ca

Browse files
committed
BUG/MINOR: quic: Malforme probing packet with already acked frames
If a packet building was asked to probe the peer with frames which have just been acked, the frames building run by qc_build_frms() could be cancelled returning 0 by qc_stream_frm_is_acked() which ckeck that these frames have been already acknowledged. In this case the packet building run by qc_do_build_pkt() is not interrupted, leading to the build of an empty packet which should be ack-eliciting. This is a bug detected by the BUG_ON() statement in qc_do_build_pk(): BUG_ON(qel->pktns->tx.pto_probe && !(pkt->flags & QUIC_FL_TX_PACKET_ACK_ELICITING)); Thank you to @Tristan971 for having reported this issue in GH #2709 This is an old bug which must be backported as far as 2.6.
1 parent a7e5180 commit 96403ca

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/quic_tx.c

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2010,7 +2010,20 @@ static int qc_do_build_pkt(unsigned char *pos, const unsigned char *end,
20102010
goto comp_pkt_len;
20112011
}
20122012

2013-
if (!ack_frm_len && !qel->pktns->tx.pto_probe)
2013+
if (qel->pktns->tx.pto_probe) {
2014+
/* If a probing packets was asked and could not be built,
2015+
* this is not because there was not enough room, but due to
2016+
* its frames which were already acknowledeged.
2017+
* (see qc_stream_frm_is_acked()) called by qc_build_frms().
2018+
*
2019+
* That said, the consequence must be the same: cancelling
2020+
* the packet building as if there was not enough room.
2021+
*/
2022+
qel->pktns->tx.pto_probe--;
2023+
goto no_room;
2024+
}
2025+
2026+
if (!ack_frm_len)
20142027
goto no_room;
20152028
}
20162029
}

0 commit comments

Comments
 (0)