]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: quic: fix discarding of already stored out-of-order ACK
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 9 Oct 2024 10:03:36 +0000 (12:03 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 9 Oct 2024 15:32:30 +0000 (17:32 +0200)
To properly decount out-of-order acked data range, contiguous or
overlapping ranges are first merged before their insertion in a tree.

The first step ensure that a newly reported range is not completely
covered by the existing tree ranges. However, one of the condition was
incorrect. Fix this to ensure that the final range tree does not contain
duplicated entry.

The impact of this bug is unknown. However, it may have allowed the
insertion of overlapping ranges, which could in turn cause an error in
QUIC MUX txbuf window, with a possible transfer freeze.

No need to backport.

src/quic_stream.c

index 03a32bd35aab7a1fb2b9f3529a4d602e37cba6ab..7f06d63eb377cb3729842961a9b05e8353075e2f 100644 (file)
@@ -178,7 +178,7 @@ static int qc_stream_buf_store_ack(struct qc_stream_buf *buf,
                ack_less = eb64_entry(less, struct qc_stream_ack, offset_node);
 
        /* Ensure that offset:len range has not been already acknowledged, at least partially. */
-       if ((ack_more && offset == ack_more->offset_node.key && offset + len <= ack_more->offset_node.key) ||
+       if ((ack_more && offset == ack_more->offset_node.key && offset + len <= ack_more->offset_node.key + ack_more->len) ||
            (ack_less && ack_less->offset_node.key + ack_less->len >= offset + len)) {
                newly_acked = 0;
                goto end;