Skip to content

Server accepts 0-RTT with incompatible remembered state #2673

Duplicate

Description

@LiD0209

Server accepts 0-RTT with incompatible remembered state

Summary

quiche's server-side 0-RTT acceptance condition is not bound to the previous QUIC transport parameters or HTTP/3 SETTINGS. As a result, the server still accepts early data after its configuration is reduced. The client-side case where SETTINGS were not remembered is not counted as an issue here because RFC 9114 Section 7.2.4.2 permits clients to use default values in that case.

Standard Requirement

RFC 9000 Section 7.4.1:

If 0-RTT data is accepted by the server, the server MUST NOT reduce
any limits or alter any values that might be violated by the client
with its 0-RTT data.
A server MUST reject 0-RTT data if the restored values for transport
parameters cannot be supported.

initial_max_data is one of the transport parameters covered by this rule.

RFC 9114 Section 7.2.4.2:

If the server cannot determine that the settings remembered by a client are
compatible with its current settings, it MUST NOT accept 0-RTT data.

RFC 9114 Section 7.2.4.2 also permits a client that did not remember SETTINGS to use the default values.

Relevant Source Code

implementions/quiche/quiche/src/tls/mod.rs:384-395 uses a fixed context for all connections:

// TODO: the early data context should include transport parameters and
// HTTP/3 SETTINGS in wire format.
self.set_quic_early_data_context(b"quiche")?;

The pinned BoringSSL dependency only compares the ticket context with the current context (boring-sys-4.22.0/deps/boringssl/src/ssl/tls13_server.cc:349-364,438-474), and the fixed value always matches. The client restores peer transport parameters from the session blob (implementions/quiche/quiche/src/lib.rs:2400-2419), but the server does not check remembered limits against the current configuration. The HTTP/3 connection initializes local_settings only from the current configuration (implementions/quiche/quiche/src/h3/mod.rs:1033-1067).

Implementation Behavior

The server TLS layer still accepts 0-RTT after transport parameters or SETTINGS are reduced. The transport layer then advertises the smaller new limit; the HTTP/3 layer only discovers the incompatibility later while parsing the early request.

Inconsistency Reason

  • Transport: after accepting 0-RTT, the server reduces remembered initial_max_data=100 to 50, violating the explicit MUST NOT in RFC 9000 Section 7.4.1.
  • HTTP/3: with old max_field_section_size=262144 and current max_field_section_size=65, the server first accepts 0-RTT, violating RFC 9114 Section 7.2.4.2's acceptance gate.
  • Client: RFC 9114 Section 7.2.4.2 permits default SETTINGS when the client did not remember SETTINGS, so that behavior is not treated as a defect.

Runtime Evidence

The following commands were run from the workspace root:

cargo run --release --locked --manifest-path tmp/quiche_0rtt_probe/Cargo.toml
cargo run --release --locked --manifest-path tmp/quiche_h3_0rtt_settings_probe/Cargo.toml

The transport probe used the same 20-byte payload in both cases and observed:

baseline: initial_max_data=100, accepted, read=20
mismatch: remembered=100, current=50, accepted, read=20
client_observed_server_initial_max_data=50
server_closed=false, handshake_error=none

The HTTP/3 probe observed:

previous_server_max_field_section_size=262144
current_server_max_field_section_size=65
server_in_early_data=true
server_early_data_reason=2
poll_result=Err(ExcessiveLoad)

Both commands exited with status 0. The transport run showed that the server accepted and read 0-RTT data even though the current transport limit was lower than the remembered limit. The HTTP/3 run showed that the server accepted 0-RTT before later reporting Err(ExcessiveLoad) while parsing a request that exceeded the current SETTINGS value.

Impact

The server can process early requests that were legal under remembered state but incompatible with the current configuration, and only later produce flow-control or HTTP/3 errors after accepting 0-RTT.

Fix Direction

Encode the server transport-parameter and application SETTINGS compatibility state into the early-data context, or reject 0-RTT when that state cannot be restored and compared.

Activity

  1. added
    type: bugfix
    area: tls
    on Nov 24, 2026
  2. ghedo commented on Nov 25, 2026

    @ghedo
    Member

    Closing as a duplicate of #2627. Both come from the constant early-data context in tls/mod.rs, and the TODO there already calls for including the transport parameters and HTTP/3 SETTINGS. The fix for #2627 needs to cover both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: tlstype: bugfix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions