Description
Description
RFC 9000 §12.4 mandates treating a packet that contains no frames as a connection error of type PROTOCOL_VIOLATION.
However, in QuicConnRecvFrames
, if the payload is empty, the while loop (line 4444) is not entered, and the packet is processed without error. We also didn't find any relevant checking in the caller of QuicConnRecvFrames
.
Lines 4409 to 4500 in 31d2b73
Suggested Fix
At the very start of QuicConnRecvFrames
, after PayloadLength
is known, add:
if (PayloadLength == 0) {
QuicTraceEvent(
ConnError,
"[conn][%p] ERROR, %s.",
Connection,
"Packet contained no frames");
QuicConnTransportError(Connection, QUIC_ERROR_PROTOCOL_VIOLATION);
...
return FALSE;
}
This ensures packets with no frames are rejected with the required PROTOCOL_VIOLATION error, as required by RFC 9000.