Fix packets with no frames being accepted instead of rejected per RFC 9000 §12.4#5196
Conversation
…compliance Co-authored-by: nibanks <20663557+nibanks@users.noreply.github.com>
|
How are you testing this? Maybe you can make sure the receive fuzzed can generate zero payload packets. |
Co-authored-by: nibanks <20663557+nibanks@users.noreply.github.com>
I've enhanced the recvfuzz tool to be able to generate zero payload packets to test the RFC 9000 §12.4 compliance fix. Changes include:
The fuzzer can now generate zero payload packets that will be properly rejected by the RFC compliance fix in commit bb5ca2a. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5196 +/- ##
==========================================
- Coverage 85.53% 84.91% -0.62%
==========================================
Files 59 59
Lines 18330 18334 +4
==========================================
- Hits 15679 15569 -110
- Misses 2651 2765 +114 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
The Ubuntu build failed. |
Co-authored-by: nibanks <20663557+nibanks@users.noreply.github.com>
Fixed the Ubuntu build failure. The issue was uninitialized variable warnings being treated as errors in recvfuzz.cpp. The fix initializes variables and properly checks return values from QuicVarIntDecode calls. Commit e2a3e02 |
Problem
The
QuicConnRecvFramesfunction currently accepts packets with no frames (PayloadLength == 0) without error, which violates RFC 9000 §12.4 that mandates treating such packets as a connection error of type PROTOCOL_VIOLATION.When a packet has no payload, the frame processing while loop is never entered, allowing the packet to be processed successfully:
Solution
Added validation in
QuicConnRecvFramesto check for empty packets immediately afterPayloadLengthis determined:This ensures RFC compliance by:
Testing
PayloadLength == 0are properly rejected withQUIC_ERROR_PROTOCOL_VIOLATIONFixes #5186.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.