Skip to content

Source Connection ID selection on MsQuic server #3762

Open
@QUICTester

Description

@QUICTester

Describe the bug

When testing commit 5c070cd, we discovered a behavior on the MsQuic server that deviates from the specification.

As described in RFC 9000 (https://www.rfc-editor.org/rfc/rfc9000.html#name-negotiating-connection-ids), the client and server must select their Source Connection ID in their first Initial packet. This Source Connection ID must then be used by the peer as the Destination Connection ID in their subsequent messages. However, the MsQuic server deviates from this specification by selecting its Source Connection ID only when receiving a Crypto frame that carries the Client Hello message. This may cause a Connection ID mismatch on the client side if the client did not send the Client Hello as its first Initial packet to the server.

Affected OS

  • Windows
  • Linux
  • macOS
  • Other (specify below)

Additional OS information

No response

MsQuic version

Older

Steps taken to reproduce bug

(1) Client sends an Initial packet that carries a Ping frame.
(2) Client sends an Initial packet that carries a Client Hello message.

Expected behavior

The server should choose its Source Connection ID when it receives and process the first Initial packet (which may carry CRYPTO, Ping and ConnectionClose frames) from the client.

Actual outcome

The client expects the server to choose its Source Connection ID after the server receives (1). However, the server uses the Destination Connection ID from (1) as its Source Connection ID when acknowledging the client's Ping and only chooses its Source Connection ID when acknowledging the Client Hello message in (2). This will confuse the client when MsQuic chooses its Source Connection ID in (2).

Additional details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: CoreRelated to the shared, core protocol logicBug: CoreA code bug in the Core MsQuic codeexternalProposed by non-MSFT

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions