On 11/20/26 20:51, Dean Liang wrote:
> On a backend connection, quic_rx_pkt_parse() copied the server's Source
> Connection ID into qc->dcid and set QUIC_FL_CONN_SCID_RECEIVED as soon
> as the first Initial header was parsed. Header protection removal and
> AEAD decryption happen later. A packet which fails either one is
> dropped, but
> the flag stayed set, so a later Initial which does decrypt could not
> replace that CID.
> 
> RFC 9000 7.2 says the client switches its Destination Connection ID for
> the first received Initial or Retry, and only a valid Initial counts.
> Packets sent afterwards, including the ACK of that valid Initial, kept
> the CID from the discarded packet. The server cannot route them, and the
> initial_source_connection_id transport parameter no longer matches
> qc->dcid, which kills the connection. A normal retransmission uses the
> same CID, so the usual handshake is unaffected. It shows up when the
> first datagram's SCID differs from the one in the first Initial that
> decrypts, for instance after corruption of that field or an injected
> datagram on the connection socket.
> 
> Copy the SCID only once the Initial has been decrypted and its frames
> have been parsed, in qc_treat_rx_pkts(). Retry packets still update
> qc->dcid after their integrity check and still do not set the flag, so
> the first accepted Initial may replace the Retry CID as before.
> 
> This should be backported up to 3.3, where it was introduced by 2d076178c
> ("MINOR: quic-be: Store asap the DCID").

Hello Dean,

Thank you for this report and patch, which are correct, but I cannot
merge it as-is without a commit message. Please have a look at the git
format-patch command to create properly formatted patches (also see the
CONTRIBUTING file). Let me know if this is feasible on your side; if
not, I will create the patch myself.

Fred.


Reply via email to