]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: quic: adjust address validation
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 6 Nov 2023 09:32:17 +0000 (10:32 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 9 Nov 2023 15:23:52 +0000 (16:23 +0100)
commitd38bb7f8a7170c8c89d9c02ebd472a2a69e864aa
treefc1047129eaa655a1b1848ac501df1b53ad40aea
parent3a051ca0c805a7fefb739706121cf57776992a03
MEDIUM: quic: adjust address validation

When a new QUIC connection is created, server considers peer address as
not yet validated. The server must limit its sending up to 3 times the
content already received. This is a defensive measure to avoid flooding
a remote host victim of address spoofing.

This patch adjust the condition to consider the peer address as
validated. Two conditions are now considered :
* successful handling of a received HANDSHAKE packet. This was already
  done before although implemented in a different way.
* validation of a Retry token. This was not considered prior this patch
  despite RFC recommandation.

This patch also adjusts how a connection is internally labelled as using
a validated peer address. Before, above conditions were checked via
quic_peer_validated_addr(). Now, a flag QUIC_FL_CONN_PEER_VALIDATED_ADDR
is set to labelled this. It already existed prior this patch but was
only used for quic_cc_conn. This should now be more explicit.
include/haproxy/quic_conn-t.h
src/quic_conn.c
src/quic_rx.c