-
Notifications
You must be signed in to change notification settings - Fork 593
Fix packets with no frames being accepted instead of rejected per RFC 9000 §12.4 #5196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…compliance Co-authored-by: nibanks <[email protected]>
How are you testing this? Maybe you can make sure the receive fuzzed can generate zero payload packets. |
Co-authored-by: nibanks <[email protected]>
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 <[email protected]>
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
QuicConnRecvFrames
function 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
QuicConnRecvFrames
to check for empty packets immediately afterPayloadLength
is determined:This ensures RFC compliance by:
Testing
PayloadLength == 0
are properly rejected withQUIC_ERROR_PROTOCOL_VIOLATION
Fixes #5186.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.