Skip to content

feat: accept connection ID validation in amplificationlimit test#442

Open
larseggert wants to merge 2 commits intoquic-interop:masterfrom
larseggert:fix-amplificationlimit
Open

feat: accept connection ID validation in amplificationlimit test#442
larseggert wants to merge 2 commits intoquic-interop:masterfrom
larseggert:fix-amplificationlimit

Conversation

@larseggert
Copy link
Contributor

@larseggert larseggert commented Nov 2, 2025

feat: accept connection ID validation in amplificationlimit test

Context

The amplificationlimit test failure criteria implemented by this code was too narrow.
RFC 9000 Section 8.1 paragraph 2 (https://datatracker.ietf.org/doc/html/rfc9000#section-8.1-2)
contains an additional criterion for when it's safe to stop applying the amplification limit.
The interop runner should permit that exit criterion and mark the test as passed.

The RFC states: "Additionally, an endpoint MAY consider the peer address validated if the
peer uses a connection ID chosen by the endpoint and the connection ID contains at least
64 bits of entropy."

Changes

Updated TestCaseAmplificationLimit.check() in testcases.py to accept both RFC 9000
Section 8.1 exit criteria:

  1. Original criterion: Server receives a Handshake packet from the client (existing behavior)
  2. New criterion: Client uses a server-chosen connection ID with ≥64 bits of entropy

Implementation

  • Added tracking of server-chosen connection IDs from Initial packets (lines 830-841)
  • Filter SCIDs to only include those with at least 8 bytes (64 bits) of entropy
  • Added validation check in packet processing loop (lines 864-876)
  • When client Initial packet uses a matching server-chosen CID, mark address as validated
  • Includes debug logging for visibility into which criterion triggered success

Benefits

  • More accurate RFC 9000 compliance testing
  • Accepts valid server implementations that use connection ID-based address validation
  • Reduces false negatives in interoperability testing

Note

Accept server-chosen connection ID validation with ≥64-bit entropy in TestCaseAmplificationLimit.get_paths_raw for the amplificationlimit test in testcases_quic.py

Track server Initial scid values with ≥16 hex chars, record them in a set, and mark the test as succeeded when a client Initial dcid matches, exiting early.

📍Where to Start

Start in TestCaseAmplificationLimit.get_paths_raw in testcases_quic.py.

Macroscope summarized 1deadb8.

@larseggert larseggert changed the title feat: accept connection ID validation in amplificationlimit test feat: accept connection ID validation in amplificationlimit test Nov 2, 2025
@larseggert
Copy link
Contributor Author

@marten-seemann ping?

The amplificationlimit test failure criteria implemented by this code was too narrow.
RFC 9000 Section 8.1 paragraph 2 (https://datatracker.ietf.org/doc/html/rfc9000#section-8.1-2)
contains an additional criterion for when it's safe to stop applying the amplification limit.
The interop runner should permit that exit criterion and mark the test as passed.

The RFC states: "Additionally, an endpoint MAY consider the peer address validated if the
peer uses a connection ID chosen by the endpoint and the connection ID contains at least
64 bits of entropy."

Updated `TestCaseAmplificationLimit.check()` in `testcases.py` to accept both RFC 9000
Section 8.1 exit criteria:

1. **Original criterion**: Server receives a Handshake packet from the client (existing behavior)
2. **New criterion**: Client uses a server-chosen connection ID with ≥64 bits of entropy

- Added tracking of server-chosen connection IDs from Initial packets (lines 830-841)
- Filter SCIDs to only include those with at least 8 bytes (64 bits) of entropy
- Added validation check in packet processing loop (lines 864-876)
- When client Initial packet uses a matching server-chosen CID, mark address as validated
- Includes debug logging for visibility into which criterion triggered success

- More accurate RFC 9000 compliance testing
- Accepts valid server implementations that use connection ID-based address validation
- Reduces false negatives in interoperability testing
@larseggert larseggert force-pushed the fix-amplificationlimit branch from e27136a to 1deadb8 Compare March 9, 2026 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant