-
-
Notifications
You must be signed in to change notification settings - Fork 15.8k
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
http2: writePing does not verify data.readableBytes() == 8 #3721
Comments
@ejona86 @Scottmitch @nmittler @louiscryan is this something we need to fix before 4.1.0.Final ? |
I don't think so. We seem to be conforming to the spec since we're checking the size on the inbound frame. |
@nmittler so closing ? |
@ejona86 thoughts on closing? |
wouldn't hurt to check the write size...make it harder for people to put bad stuff out on the network. |
@Scottmitch care to submit a pr ;) ? |
@normanmaurer - Will do. @nmittler - Any objections? |
@Scottmitch 😍 ;) |
pr pending |
@Scottmitch no objections ... thanks for taking care |
Motivation: The HTTP/2 spec states that the ping frame length must be 8 and is otherwise an error https://tools.ietf.org/html/rfc7540#section-6.7. The DefaultHttp2FrameReader enforces this, but the DefaultHttp2FrameWriter allows invalid frames to be written. We should not allow invalid ping frames to be written to the network. Modifications: - DefaultHttp2FrameWriter checks the frame size to be 8, or throws an exception Result: Fixes netty#3721
Motivation: The HTTP/2 spec states that the ping frame length must be 8 and is otherwise an error https://tools.ietf.org/html/rfc7540#section-6.7. The DefaultHttp2FrameReader enforces this, but the DefaultHttp2FrameWriter allows invalid frames to be written. We should not allow invalid ping frames to be written to the network. Modifications: - DefaultHttp2FrameWriter checks the frame size to be 8, or throws an exception Result: Fixes #3721
When writing the ping frame, we aren't verifying that the length is 8, as required by the spec:
The check is being performed for inbound PING frames.
The text was updated successfully, but these errors were encountered: