You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Security
The client accepted a server certificate whose names RFC 9525 does not
allow to match the host: a wildcard that was only part of a label (such
as f*o.example.com), sat inside an xn-- label, or was a lone *;
and, on OTP 27 and 28, a certificate with no subjectAltName whose
subject common name matched the host. These certificates are now
rejected as a hostname mismatch. Only the DNS and IP subjectAltName
entries are matched, and a wildcard counts only as the whole leftmost
label, standing for one label (RFC 9525 Sections 2, 6.3 and 6.4). An
internationalized host name is converted to A-labels, with UTS 46
mapping, before it is matched; a name that cannot be converted
matches no certificate. A server name that is not a valid host name,
such as one with brackets, a port or an empty label, matches no
certificate and is not sent as SNI.
A client that connected to an IP address, with verification on and no server_name, did not check the server certificate's name: any
certificate that chained to the trust anchors was accepted. The
address is now checked against the certificate's IP subjectAltName
entries (RFC 9525 Section 6.4), and it is no longer sent as SNI
(RFC 6066 Section 3), including when given as server_name. An IPv6
address in brackets, such as [::1], or with a zone ID counts as the
address, whether given as the host, as server_name or through quic_h3:connect. A host in brackets that is not an IP address, such
as [localhost], is refused with {error, einval} instead of being
dialled without its brackets. A hostname, as the host or as server_name, works as before.
Crash reports, supervisor reports and sys:get_status/1 printed
private keys, PSKs, TLS secrets, packet protection keys, session
ticket secrets, QUIC-LB keys and stateless reset secrets and tokens.
These are no longer shown for connections, listeners, the server
registry, HTTP/3 connections, distribution controllers and the
distribution ticket store. The server, listener pool, top-level and
distribution supervisors no longer keep these options in their state
or child specs. The stack trace of a crash could still show them in
the arguments of the failing call; erlang_quic now adds a logger
filter, quic_redact, that removes these arguments from crash,
terminate and supervisor reports.
With the optional crypto NIF built, a protected 1-RTT packet with an
empty payload made the receive path read frames from memory past the
decrypted packet. Only the decrypted bytes are read now, so such a
packet carries no frames and is rejected.
QUIC distribution with verify_peer and no CA still started its
early-boot listener, which then checked node certificates against the
system trust store. That listener now refuses to start, as the
supervised one already did. A cacert was also ignored when the
certificate came from files, and a cacert_file when the certificate
was given inline; the CA now applies however the certificate is given.
QUIC distribution read some malformed security settings as a default:
an unrecognised verify value as verify_none, a malformed auth_callback or psk_callback as no callback, and a setting
repeated on the command line as unset. A malformed setting, a
repeated or unknown -quic_dist setting, or a certificate without
its key now stops distribution from starting, and connection setup,
with {bad_config, Reason}. One -quic_dist flag can now carry
several settings.
Added
An auth callback can return {ok, {authenticated_node, Node}};
quic_dist then refuses a peer whose dist node name differs from the
authenticated one. Before, nothing tied the node a callback had
authenticated to the name the peer then used in the dist handshake.
Other return values work as before.
Listener option alpn_handler, called with the connection and the
negotiated ALPN during the handshake, returns the connection's owner.
One listener can then hand each protocol to its own process, before
any stream data arrives. A handler that is not a fun of arity 2 is
refused when the server starts.
quic_h3:accept/2 starts the server side of HTTP/3 on a connection
the application already holds, such as one an alpn_handler picked
for h3. It takes the per-connection options of quic_h3:start_server/3.
Changed
erlang_quic now depends on idna, used to compare internationalized
host names with certificates.
The default pool_size now runs one listener, as documented. It ran
two on Linux. Set pool_size => 2 for the old behaviour.
A connection_handler that returns {error, Reason} now declines the
connection: it is stopped and the client is refused with
CONNECTION_REFUSED.
Calls on a connection whose process has stopped return {error, closed} instead of exiting with noproc.
send_data, send_data_async, reset_stream, reset_stream_at, stop_sending and set_owner return {error, badarg} for bad
arguments, and set_stream_deadline returns {error, invalid_action}
or {error, invalid_error_code}, instead of crashing the connection.
A handshake that fails with a TLS alert now tells the owner {closed, {tls_alert, Reason}}.
With idle_timeout => 0, a handshake that hears nothing from the peer
now ends after disconnect_timeout instead of never.
The owner of a connection whose handshake ends at its deadline gets {closed, handshake_timeout}. A handshake that heard nothing from the
peer for the whole idle timeout still ends with {closed, idle_timeout}.
A FIN on the peer's control or QPACK streams went unnoticed; only a
reset closed the connection. Both now close it with
H3_CLOSED_CRITICAL_STREAM (RFC 9114 Section 6.2.1, RFC 9204 Section
4.2).
More streams waiting for the QPACK encoder stream than
SETTINGS_QPACK_BLOCKED_STREAMS allows now close the connection with
QPACK_DECOMPRESSION_FAILED, for trailers as well as HEADERS. Before,
blocked HEADERS past the limit only reset their stream, and blocked
trailers were not counted at all (RFC 9204 Section 2.1.2).
DATA before HEADERS on a request stream, HEADERS or DATA after the
trailers, and HEADERS or PUSH_PROMISE on an established CONNECT tunnel
now close the connection with H3_FRAME_UNEXPECTED instead of resetting
the stream (RFC 9114 Sections 4.1 and 4.4).
A server receiving CANCEL_PUSH for a push ID it never promised now
closes the connection with H3_ID_ERROR (RFC 9114 Section 7.2.3).
PRIORITY_UPDATE on a request or push stream, or received by a client,
was ignored or applied. It now closes the connection with
H3_FRAME_UNEXPECTED. On a server, one naming a stream that is not a
request stream, or a push not yet promised, closes it with H3_ID_ERROR
(RFC 9218 Section 7.2).
quic_h3:send_data/4, quic_h3:send_trailers/3 and quic_h3:send_push_data/4 return ok and send nothing after a HEAD,
204 or 304 response, which is already complete (RFC 9110 Section
6.4.1). Before a final response, with nothing or only a 1xx sent, they
return {error, no_final_response} (RFC 9114 Section 4.1). quic_h3:respond/5 with a 1xx status returns {error, informational_status}, and status 101 given to send_response/4, respond/5 or send_push_response/4 returns {error, status_101_forbidden} (RFC 9114 Section 4.5).
TLS now follows RFC 9846, which obsoletes RFC 8446.
Reliable stream reset now follows draft-ietf-quic-reliable-stream-reset-11;
both transport parameter ids are sent and accepted.
Fixed
A client connecting to an internationalized host name sent it in
Server Name Indication as UTF-8, which servers do not match. It is now
sent as A-labels, and a name that is not a valid IDN is not sent
(RFC 6066 Section 3). A trailing dot is no longer sent, and a name
with one now matches a certificate for the same name without it.
A peer that sent a packet within each idle period kept a handshake open
for ever, holding a connection and a max_connections slot. A
handshake that has not completed within the idle timeout from its
start, or disconnect_timeout when no idle timeout is set, now ends
(RFC 9000 Section 10.1).
A CONNECTION_CLOSE sent before the handshake was confirmed went out at
one encryption level only, in 1-RTT packets once there were 1-RTT
keys, which the peer may not be able to read yet, so the peer waited
for its own timeout. This held for a local close, a transport error, a
TLS alert and the close sent when a connection stops unexpectedly. The
close now also goes out in a Handshake packet, and from a server in an
Initial packet too. Below 1-RTT an application close is sent as
APPLICATION_ERROR without its reason (RFC 9000 Section 10.2.3).
Datagrams waiting for an unvalidated address to be validated, held back
by the anti-amplification limit, were kept without a bound, so a peer
that kept sending while its new address was checked could make the
connection hold an unbounded amount of memory. At most 64 are held now;
what a dropped one carried is sent again by loss recovery (RFC 9000
Section 8.1).
A server that refused a connection, at max_connections or when the connection_handler declined it, sent nothing, so the client waited
for its handshake timeout. It now answers at once with
CONNECTION_REFUSED, or INTERNAL_ERROR when the handler fails, at a
bounded rate (RFC 9000 Section 5.2.2).
On paths with a round-trip time under 8 ms, such as a LAN or loopback,
packets were declared lost as soon as one round trip had passed since
they were sent, instead of 9/8 of it, so packets that were only slightly
late were retransmitted and cut the congestion window. The time
threshold is now rounded up, never below 9/8 of the round-trip time
(RFC 9002 Section 6.1.2).
A write to a stream whose sending side had been reset, by the
application, a stream deadline or the automatic answer to the peer's
STOP_SENDING, was still sent, at or past the final size the reset had
announced, and peers closed the connection with FINAL_SIZE_ERROR. Such
a write now fails with stream_closed, as one after the FIN does
(RFC 9000 Section 3.3).
Resetting a stream a second time sent another RESET_STREAM with a new
error code and a larger final size, and the peer closed the connection
with FINAL_SIZE_ERROR. Resetting a stream whose sending side is already
done now does nothing (RFC 9000 Section 4.5).
A RESET_STREAM the peer sent again counted the stream's unreceived
bytes against connection flow control a second time and told the owner
about the reset again. A repeated RESET_STREAM is now ignored (RFC 9000
Sections 4.5 and 13.3).
A RESET_STREAM_AT from the peer did not count the stream's final size
against connection flow control, so connection credit fell behind what
the peer had used and the peer could stall waiting for more (RFC 9000
Section 4.5, draft-ietf-quic-reliable-stream-reset-11).
After heavy packet loss left more than 64 ACK ranges, a packet number
below the ranges kept was accepted again, so a duplicated packet was
processed twice. Packet numbers below the lowest range kept are now
discarded as duplicates (RFC 9000 Sections 12.3 and 13.2.3).
An ACK frame whose ranges reached below packet number 0 was processed
instead of closing the connection with FRAME_ENCODING_ERROR (RFC 9000
Section 19.3.1).
A version 1 or 2 long-header packet with a connection ID longer than
20 bytes is now dropped (RFC 9000 Section 17.2). Before, a listener
started a connection for an Initial with such a Destination Connection
ID, and either side took such a Source Connection ID as the peer's.
Version Negotiation still accepts the longer IDs RFC 8999 allows.
A client now discards a Retry whose Source Connection ID is the
Destination Connection ID of its own Initial (RFC 9000 Section
17.2.5.1). Before, it took the Retry and restarted the handshake.
A disable_active_migration transport parameter with a value, or a
preferred_address with a connection ID longer than 20 bytes, now
closes the connection with TRANSPORT_PARAMETER_ERROR (RFC 9000
Sections 7.4 and 18.2). Before, both were accepted, and the malformed
disable_active_migration was read as allowing migration.
CRYPTO data at an encryption level the handshake had left, extending
past what had been received there, was handed to TLS: a fragment was
buffered for good, a whole message closed the connection with
unexpected_message. It is now a PROTOCOL_VIOLATION; retransmissions of
data already received are still ignored (RFC 9001 Section 4.1.3).
When the handshake moved on to a higher encryption level, CRYPTO data
left over at the previous one was ignored, or closed the connection
with unexpected_message if it held a whole message. It is now a
PROTOCOL_VIOLATION (RFC 9001 Section 4.1.3).
A Finished message that failed verification, or was shorter than 32
bytes, was ignored, leaving the handshake to time out. It now closes
the connection with decrypt_error, or decode_error when its length is
not that of the handshake hash (RFC 9846 Section 4.5.3).
A client took a ServerHello or HelloRetryRequest naming a cipher suite
it does not know for TLS_AES_128_GCM_SHA256 and carried on with the
wrong keys. It now aborts with illegal_parameter (RFC 9846
Section 4.2.3).
A packet that opened with the previous 1-RTT keys was accepted even
when a lower-numbered packet had already used the new ones. It now
closes the connection with KEY_UPDATE_ERROR (RFC 9001 Section 6.4).
Packets that failed authentication were not counted, so the AEAD
integrity limit was never enforced. The connection now closes with
AEAD_LIMIT_REACHED at the limit (RFC 9001 Section 6.6).
A connection whose handshake lost a few packets could start with its
congestion window collapsed to two packets: losses of the first flight
and its probes, all sent before any RTT sample, were taken for
persistent congestion. Only packets sent after the first RTT sample now
count towards it (RFC 9002 Section 7.6.2).
A datagram the kernel refused as too large for the interface took the
rest of its send batch with it, and the packets queued behind it came
back as losses. Only the oversized datagram is lost now (RFC 9000
Section 14.4).
On Linux, datagrams now always leave with Don't Fragment set (RFC 9000
Section 14). Before, Linux fragmented datagrams larger than its cached
path MTU, so a path MTU probe could succeed in fragments and raise the
datagram size past what the path carries unfragmented.
A 1-RTT packet the kernel refused to send outside a batch was never
sent again, so the stream data it carried was lost and the stream
stalled. It is now counted as sent, and loss detection sends its data
again (RFC 9002 Section 6).
Every datagram the listener could not parse logged a warning. It is
now logged at debug level.
The warning logged for a packet that fails to decrypt included the
peer's stateless reset tokens. It now lists only the peer's connection
IDs and their sequence numbers.
After closing a connection itself, erlang_quic ignored the peer's
packets, so when its CONNECTION_CLOSE was lost the peer kept
retransmitting until its own idle timeout. Packets from the peer's
address are now answered with the close again, at an exponentially
decreasing rate, on the socket the connection sends from, including a
server's preferred address. Nothing is sent again once the peer has
closed (RFC 9000 Sections 10.2.1 and 10.2.2).
An idle timeout after the handshake sent a CONNECTION_CLOSE to a peer
that had most likely discarded the connection already. The connection
now closes silently, as it already did during the handshake (RFC 9000
Section 10.1).
A server answered a PATH_CHALLENGE from an address the client was not
using with a full-size datagram, whatever the size of the probe. Until
that address is validated, the server now sends it at most three times
what it received from it (RFC 9000 Section 8). An answer too small for
a full-size datagram carries a PATH_CHALLENGE that validates the
address only, and the path is then challenged again at full size
(Section 8.2.1).
A client that moved twice before the handshake was confirmed was
followed to its second address without that address being validated
or the data sent to it being limited. The second address is now
validated like the first (RFC 9000 Sections 8 and 9.3).
A server kept state for every address that probed it, with no limit.
It now keeps the four most recently probed paths.
Out-of-order stream data was bounded in bytes only, not by the memory
each fragment takes, so many small fragments held far more memory than
the 32 MiB receive buffer cap counted, and a small fragment kept its
whole packet in memory. Each buffered fragment now counts against the
cap (RFC 9000 Section 21.7).
A stream that had used up its own flow-control window held back data
queued for other streams. Only a connection-level limit stops the send
queue now, and data waiting for a blocked stream no longer slows down
sending on the others (RFC 9000 Section 4.1).
quic:connect/4 returns {error, Reason} when the client socket
cannot be opened, instead of killing a caller that does not trap
exits.
API calls on a connection whose process has already stopped exited
with noproc although their specs promise an error. They return {error, closed}.
Bad arguments to send_data, send_data_async, reset_stream, reset_stream_at, stop_sending, set_stream_deadline and set_owner crashed the connection and its owner. They are refused
with an error.
The owner of a connection whose handshake failed with a TLS alert, for
example a server rejecting the client's ALPN, was not told it closed.
keep_alive_interval => auto was half the local idle timeout, and at
least 5 seconds, so a peer with a shorter timeout, or one of 5 seconds
or less, idled the connection out. It is now half the idle timeout in
force, the smaller of the two advertised, and at least one second
(RFC 9000 Section 10.1).
With idle_timeout => 0, nothing ended a handshake that heard nothing
from the peer: a server kept a connection for ever after one
unreadable Initial, and a client connecting to an address that never
answered was never told. Such a handshake is now abandoned after disconnect_timeout, and the owner gets {closed, disconnect_timeout}. With an idle timeout, the idle timeout
still bounds the handshake.
A stream deadline that fired just as it was cancelled or set again
still reset the stream. It is now ignored.
quic:handle_timeout/2 on a connection past its idle timeout did not
close it. It now does, as the idle timer does.
A connection_handler that raised, returned something other than {ok, Pid} or {error, Reason}, or named an owner for a connection
that had already stopped, crashed the listener and every connection it
served. Only the connection the handler was called for is now closed,
and the failure is logged.
A connection_handler returning {error, Reason} did not decline the
connection: the handshake completed with the listener as owner and
nothing served it. The connection is now stopped before it sees a
packet, and the handler examples in the guides return {ok, Pid} as
the listener requires.
In a server pool, a listener that stopped or crashed left its
connections registered. Packets for them went to a dead process
instead of drawing a stateless reset (RFC 9000 Section 10.3), and they
counted against max_connections until the server restarted. They are
now removed.
pool_size started one listener more than asked, with SO_REUSEPORT
always set, so another process could bind a single-listener server's
port, and on port 0 the listeners bound different ports. pool_size N
now starts N listeners, with SO_REUSEPORT only when N is above 1, and quic:get_server_connections/1 returns each connection once instead
of once per listener.
NewReno and CUBIC moved the start of the recovery period to the moment
they left recovery, so the loss of a packet sent during recovery was
ignored and, under continued overload, the next window reduction came
about one RTT late. The recovery period now keeps the time the
reduction was made (RFC 9002 Section 7.3.2 and Appendix B.6). The
100 ms minimum recovery period still keeps a burst loss from cutting
the window twice.
A server whose ciphers shared no suite with the client went ahead
with TLS_AES_128_GCM_SHA256 anyway. It now aborts the handshake with
handshake_failure (RFC 9846 Section 4.2.1).
A client did not check the cipher suite of a HelloRetryRequest against
the ones it offered, nor that the ServerHello after it named the same
suite. It now aborts the handshake with illegal_parameter in either
case (RFC 9846 Section 4.2.4).
A server that selected TLS_AES_256_GCM_SHA384 still took the client's
external PSK, which is SHA-256, so a client checking the suite against
the PSK could not complete the handshake. A known external PSK now
makes the server pick a SHA-256 suite both sides allow; when none
exists the PSK is skipped and the certificate path is used (RFC 9846
Section 4.3.11). Resumption tickets keep the server's order.
A client accepted a server that took its PSK, external or a resumption
ticket, with a cipher suite whose hash is not the PSK's. It now aborts
with illegal_parameter (RFC 9846 Section 4.3.11).
After cancel_stream, the rest of the request body was read as a new
request, so a HEADERS frame inside a body could be delivered as a
second request. A cancelled stream is now ignored until the peer ends
it, and the peer is asked to stop sending (RFC 9114 Section 4.1.1, RFC
9000 Section 3.5).
After cancel_stream on a request whose last bytes had reached the
QUIC connection but not yet the HTTP/3 one, those bytes were read as
the start of a new stream: a HEADERS frame among them became a second
request, anything else could close the connection. They are dropped
until the stream's end has been seen (RFC 9114 Section 4.1.1).
A request stream reset for an error of its own, a malformed message
for example, kept being read: only RESET_STREAM was sent, so the peer
went on sending a body nobody wanted. STOP_SENDING is sent as well, as
on cancel_stream, and the stream is forgotten once the peer has
ended it; one that failed at its FIN used to stay for the life of the
connection (RFC 9114 Section 8, RFC 9000 Section 3.5).
When several requests waiting for QPACK encoder stream data were
unblocked together and one was malformed, the others lost their state
or were never processed. Only the malformed one is reset now (RFC 9204
Section 2.1.2).
A stream reset while its HEADERS were waiting for the QPACK encoder
stream stayed blocked, and a later insertion delivered a request on
the reset stream. It is no longer blocked. Stream Cancellation now goes
to the peer for every request or push stream given up before it was
read to the end, by either side, not only for blocked ones, so the
peer's encoder can evict what that stream referred to (RFC 9204
Section 2.2.2.2).
A server remembered every push ID a client cancelled, promised or not,
so that set could grow without limit. A CANCEL_PUSH for a promised push
with no open stream is now ignored (RFC 9114 Section 7.2.3).
A server that answered requests without registering a stream handler
kept each request's unread body buffered after the exchange finished,
and eventually reset every new request with H3_EXCESSIVE_LOAD. The
buffer is released when the stream finishes.
The QPACK encoder kept an entry for every field section it sent,
including those a decoder never acknowledges, so memory grew with
every stream. Only sections that use the dynamic table are tracked,
each until the peer acknowledges it or cancels its stream, however the
stream ended, so the entries it uses are not evicted while the peer
may still need them.
Once 100 streams wait for acknowledgments, new streams are encoded
without the dynamic table, which bounds what a peer that never
acknowledges can make the encoder keep (RFC 9204 Sections 2.1.1 and
4.4.1).
The QPACK encoder could evict a dynamic table entry that a field
section still waiting for acknowledgment, or the section being
encoded, referred to, or one the peer had not yet acknowledged, and
inserted entries past the table capacity when nothing could be
evicted. The peer's decoder then failed on those sections. Such fields
are now sent as literals instead (RFC 9204 Section 2.1.1).
A Section Acknowledgment was sent for every field section received,
including those that do not use the dynamic table. A peer that checks
closes the connection with QPACK_DECODER_STREAM_ERROR. Only sections
with a non-zero Required Insert Count are acknowledged now (RFC 9204
Section 4.4.1).
The QPACK encoder encoded the Required Insert Count using our own
advertised table capacity instead of the peer's. When the two
differed, field sections stopped decoding after a few dynamic table
insertions (RFC 9204 Section 4.5.1.1).
An over-long integer on the QPACK decoder stream, or an insertion
naming a static table entry that does not exist on the encoder stream,
crashed the HTTP/3 connection process. They are now
QPACK_DECODER_STREAM_ERROR and QPACK_ENCODER_STREAM_ERROR (RFC 9204
Sections 3.1 and 6).
Huffman-encoded strings with more than 7 bits of padding, or padding
that is not all ones, were accepted. Both are decoding errors now (RFC
7541 Section 5.2, RFC 9204 Section 4.1.2).
DATA that followed HEADERS waiting for the QPACK encoder stream reset
the stream with H3_FRAME_UNEXPECTED, so a request with content failed
whenever its field section referred to a dynamic table entry that had
not arrived yet. What follows blocked HEADERS on a stream is now kept
and read in order once they decode. It counts against max_buffered_body together with request bodies waiting for a handler
(RFC 9204 Section 2.1.2).
State kept for a peer's unidirectional stream (unknown stream types,
an incomplete stream type, streams claimed by a stream_type_handler)
was only released on a reset, so each stream ended with FIN left an
entry behind. It is released at the FIN (RFC 9114 Section 6.2.3).
A request or response with less content than its Content-Length was
accepted when the stream ended with a bare FIN, with trailers, or with
the HEADERS frame itself. All are now reset with H3_MESSAGE_ERROR (RFC
9114 Section 4.1.2).
A client held the tunnel of a successful CONNECT to the response's
Content-Length, and reset it once more bytes came. A 2xx response to
CONNECT has its Content-Length ignored (RFC 9110 Section 9.3.6).
content-length: +10 and :status: +200 were accepted. Both must be
digits only (RFC 9110 Sections 8.6 and 15); anything else is a
malformed message.
Trailers were only accepted when the stream's FIN arrived together
with their HEADERS frame; with the FIN in a later packet the stream
was reset with H3_FRAME_UNEXPECTED. HEADERS after the content are the
trailer section either way, and the message ends at the FIN (RFC 9114
Section 4.1).
PUSH_PROMISE after a response's trailers reset the stream. It is not
part of the response and is now accepted (RFC 9114 Section 4.1).
A server ignored a request stream that ended with no HEADERS at all,
empty or holding only frames of unknown types, and kept an entry for
it. The stream is now reset with H3_REQUEST_INCOMPLETE and forgotten
(RFC 9114 Section 4.1).
After a push was cancelled, bytes still arriving on its stream were
read as the start of a new unidirectional stream and could close the
connection. The stream is now ignored, and a push the client cancelled
is stopped with H3_REQUEST_CANCELLED (RFC 9114 Section 7.2.3).
A pushed response that arrived whole in one packet, from the push ID
to the FIN, never completed: the client got its headers and data but
no push_complete, and kept the push for the life of the connection.
The FIN is now seen wherever it arrives (RFC 9114 Section 4.6).
Push trailers whose FIN came in a later packet closed the connection,
and a push whose FIN came after its last DATA frame never completed.
Both now complete at the FIN, and anything but the FIN after push
trailers is H3_FRAME_UNEXPECTED (RFC 9114 Section 4.1).
A client that received GOAWAY gave up every response still waiting
for the QPACK encoder stream, including those to requests the server
had said it would answer, and a server did the same on a client's
GOAWAY, which only concerns pushes. Only requests at or above the
server's GOAWAY ID are given up now (RFC 9114 Section 5.2).
HTTP datagrams for a request stream this side had reset were still
delivered, and could still be sent. They are now dropped, and quic_h3:send_datagram/3 returns {error, unknown_stream} (RFC 9297
Section 2.1).
send_trailers/3 on a stream that had finished or been reset crashed
the HTTP/3 connection process. It returns {error, unknown_stream}.
A HEAD, 204 or 304 response sent with quic_h3:send_response/4 alone
never reached the client, which waited for it, and its stream stayed
open on the server: after 100 of them the client could open no new
request. These responses now end the stream as they are sent (RFC 9110
Section 6.4.1, RFC 9114 Section 4.1).
quic_h3:respond/5 followed a HEAD, 204 or 304 response with an empty
DATA frame. It now sends the response alone.
A body or trailers sent after a HEAD, 204 or 304 response went out, and
the client delivered them. They are now dropped (RFC 9110 Section
6.4.1).
A Content-Length the application set on a 1xx or 204 response was sent,
which RFC 9110 Section 8.6 forbids. It is now left out; 304 and HEAD
responses keep theirs.
A server could send a 101 response, which HTTP/3 does not have (RFC
9114 Section 4.5). It is now refused.
A body sent before the final response went out ahead of it, and the
client closed the connection with H3_FRAME_UNEXPECTED. It is now
refused (RFC 9114 Section 4.1).
Between two erlang_quic peers the QPACK dynamic table did no good: the
decoder never told the encoder which entries it had received, so the
encoder inserted the same fields again for every response. The decoder
now sends Insert Count Increment, and later field sections refer to the
entries already in the table (RFC 9204 Section 4.4.3).
The client accepted responses HTTP/3 does not allow, and misread one:
DATA with content on a response to HEAD, or on a 204 or 304, was
delivered; a 101 was taken as an interim response; and the
Content-Length of a 1xx was applied to the final response, which then
failed. The first two now reset the stream with H3_MESSAGE_ERROR, and
a 1xx's Content-Length is ignored (RFC 9110 Sections 6.4.1, 9.3.2 and
15.2, RFC 9114 Sections 4.1.2 and 4.5). A pushed response follows the
same rules, and a pushed HEAD response with a Content-Length no longer
fails for having no body.
Resuming a session or using an external PSK failed after a
HelloRetryRequest: the server checked the PSK binder without the first
ClientHello and the HelloRetryRequest in front, and the client refused
to retry with its PSK. Both sides now bind the PSK to the whole
handshake so far, and the retried ClientHello carries no early data
(RFC 9846 Sections 4.3.10 and 4.3.11.2).
The client did not check that a ServerHello or HelloRetryRequest selects
TLS 1.3, and the server did not check that a ClientHello offers it. Such
a handshake now ends with protocol_version, or with illegal_parameter
when another version is selected (RFC 9846 Section 4.3.1, RFC 9001
Section 4.2).
A NewSessionTicket cut short crashed the client's handling of it, and
one with bytes left over was accepted. A NewSessionTicket that does not
decode now ends the connection with decode_error (RFC 9846 Section
4.7.1).
A HelloRetryRequest asking for the key share the client had already
sent, or asking for nothing, got the same ClientHello again. The client
now ends the handshake with illegal_parameter, and sends back the cookie
of a HelloRetryRequest that carries one (RFC 9846 Sections 4.2.4 and
4.3.2).
The server resumed a session ticket for a client that had not offered
psk_dhe_ke, the only mode those tickets work in, and accepted a PSK
offered without psk_key_exchange_modes. It now does a full handshake in
the first case and ends the handshake with missing_extension in the
second. The client now ends the handshake with illegal_parameter when
the server picks a key exchange mode or PSK it did not offer (RFC 9846
Sections 4.3.9 and 4.3.11).
A ClientHello with a legacy_version other than 0x0303 was dropped
without an answer. The server now ends the handshake with
protocol_version, and with illegal_parameter for a ClientHello offering
compression (RFC 9846 Section 4.2.2).
A ServerHello or HelloRetryRequest with a legacy_version other than
0x0303 was ignored, and the client waited for its timeout. The client
now ends the handshake with protocol_version, and with illegal_parameter
when the session ID echo or the compression method is not what it sent
(RFC 9846 Sections 4.2.3 and 4.2.4).
Handshake messages with bytes left over inside an extension or after the
message, odd-length lists or empty names were accepted, or dropped
without an answer. Both sides now end the handshake with decode_error,
with illegal_parameter for a duplicate extension or a pre_shared_key
that is not the last extension, and with missing_extension for a
CertificateRequest without signature_algorithms (RFC 9846 Sections 4.3,
4.3.11 and 4.4.2).
The server sent session tickets to clients that had not offered
psk_dhe_ke and so could not use them. It now sends one only to a client
that did (RFC 9846 Section 4.7.1).
The client kept using a session ticket for as long as its lifetime said,
even past 7 days. It now stops after 7 days at most (RFC 9846 Section
4.7.1).
The reset_stream_at transport parameter was sent and read only under
its draft -07 id, so peers on later drafts, which use 0x1d, could not
use RESET_STREAM_AT with erlang_quic. Both ids are now sent and either
is accepted, also for 0-RTT (draft-ietf-quic-reliable-stream-reset-11
Section 3).
A RESET_STREAM_AT could carry a final size that counted data still
waiting for flow control credit, past the limits the peer had granted,
which the peer must treat as a flow control error. The final size now
covers what was sent and the bytes kept reliable, and quic:reset_stream_at/4 returns {error, flow_control_blocked} when
even that is over the peer's limits
(draft-ietf-quic-reliable-stream-reset-11 Section 4).
A peer that changed a stream's final size in a RESET_STREAM_AT got
STREAM_STATE_ERROR instead of FINAL_SIZE_ERROR, and stream data past
the final size after a RESET_STREAM_AT, or a FIN that moved it, was
dropped without an error. Both now close the connection with
FINAL_SIZE_ERROR (draft-ietf-quic-reliable-stream-reset-11 Section
5.2).
After quic answered the peer's STOP_SENDING with RESET_STREAM, a call
to quic:reset_stream_at/4 on the stream still sent a RESET_STREAM_AT
with a reliable size above 0. It is now refused, so the answer keeps a
reliable size of 0 (draft-ietf-quic-reliable-stream-reset-11 Section
5.4). A stream given a reliable size with quic:set_stream_reliable_size/3 is still answered with
RESET_STREAM_AT, as WebTransport needs, and the bytes it keeps are now
sent even when they were still queued; they were dropped, and the peer
waited for them.
Closing a stream after quic:reset_stream_at/4 while its reliable bytes
were still on their way, or answering the peer's STOP_SENDING then,
sent a RESET_STREAM with another error code and final size, which the
peer must treat as a connection error. It now repeats those of the
RESET_STREAM_AT (draft-ietf-quic-reliable-stream-reset-11 Section 5.2).
A peer's RESET_STREAM and RESET_STREAM_AT on one stream with different
error codes were accepted, and the owner was told of the reset again
for each such frame, retransmissions included. A changed error code
now closes the connection with STREAM_STATE_ERROR, the owner hears of
the reset once, and no stream data is delivered after the peer's
RESET_STREAM (draft-ietf-quic-reliable-stream-reset-11 Section 5.2).