Version
v0.14.6+
Platform
All
Summary
Hyper fixed this security vulnerability in v0.4.16 by having a fixed budget for undersized DATA frames. However, this penalizes real-time streaming applications which regularly send large numbers of undersized frames and buffer them in clients. This causes legitimate streams to disconnect using v0.4.16+ that did not in v0.4.15.
Expected Behavior
Legitimate streams that worked in v0.4.15 should work in v0.4.16 without additional configuration (it's a patch version bump).
Actual Behavior
Streams with high-volume undersized DATA frames were cut off with GOAWAY ENHANCE_YOUR_CHILL in v0.4.16 that streamed fine in v0.4.15.
Additional Context
h2 PR #942 partially fixes this problem by allowing users to set the budget for undersized data frames. However, our stack is tonic -> hyper-utils -> hyper -> h2.
I'd be happy to submit PRs that plumb this code through the hyperium stack. However, I think there might be a better option here that allows h2 to infer these windows from connection_window.
As I understand it, there are two issues at play here:
- 0-byte
DATA frames are never exposed to the application. These need to be rate limited and a connection may need to be killed if too many are sent. The hard-cap is fine here - I don't think there's a legitimate use-case for non-final 0-byte DATA frames.
- Undersized
DATA frames need to be controlled in some way. This is where the configurable buffer comes in.
- I think it might be better to derive that buffer from the
connection_window.
- This will allow streams with limited requirements to break quickly, while allowing those with more memory to accumulate, buffer, and drain more bytes before breaking.
I'm happy to go down either of these paths and I'm happy to submit PRs. I'd like to know where best to direct my efforts.
- I can submit PRs to expose these configuration parameters in
hyper and hyper-utils.
- I can derive the allowed buffer from the
connection_window.
Let me know what's best here!
@seanmonstar
Version
v0.14.6+
Platform
All
Summary
Hyper fixed this security vulnerability in v0.4.16 by having a fixed budget for undersized
DATAframes. However, this penalizes real-time streaming applications which regularly send large numbers of undersized frames and buffer them in clients. This causes legitimate streams to disconnect usingv0.4.16+ that did not inv0.4.15.Expected Behavior
Legitimate streams that worked in
v0.4.15should work inv0.4.16without additional configuration (it's a patch version bump).Actual Behavior
Streams with high-volume undersized
DATAframes were cut off withGOAWAY ENHANCE_YOUR_CHILLinv0.4.16that streamed fine inv0.4.15.Additional Context
h2 PR #942 partially fixes this problem by allowing users to set the budget for undersized data frames. However, our stack is
tonic->hyper-utils->hyper->h2.I'd be happy to submit PRs that plumb this code through the
hyperiumstack. However, I think there might be a better option here that allows h2 to infer these windows fromconnection_window.As I understand it, there are two issues at play here:
DATAframes are never exposed to the application. These need to be rate limited and a connection may need to be killed if too many are sent. The hard-cap is fine here - I don't think there's a legitimate use-case for non-final 0-byteDATAframes.DATAframes need to be controlled in some way. This is where the configurable buffer comes in.connection_window.I'm happy to go down either of these paths and I'm happy to submit PRs. I'd like to know where best to direct my efforts.
hyperandhyper-utils.connection_window.Let me know what's best here!
@seanmonstar