Repository navigation
Conversation
91e2538 to
96acd02
Compare
96acd02 to
8a6c39f
Compare
PR HealthPublish ✔️
Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation. This check can be disabled by tagging the PR with Changelog Entry ✔️
Changes to files need to be accounted for in their respective changelogs. This check can be disabled by tagging the PR with Breaking changes ✔️
This check can be disabled by tagging the PR with API leaks ✔️The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.
This check can be disabled by tagging the PR with Unused Dependencies ✔️
For details on how to fix these, see dependency_validator. This check can be disabled by tagging the PR with License Headers ✔️
All source files should start with a license header. Unrelated files missing license headers
This check can be disabled by tagging the PR with
Coverage
|
| File | Coverage |
|---|---|
| pkgs/http2/lib/src/flowcontrol/connection_queues.dart | 💔 93 % ⬇️ 1 % |
| pkgs/http2/lib/src/flowcontrol/queue_messages.dart | 💚 46 % ⬆️ 5 % |
| pkgs/http2/lib/src/flowcontrol/stream_queues.dart | 💔 90 % ⬇️ 0 % |
| pkgs/http2/lib/src/frames/frame_writer.dart | 💚 93 % |
| pkgs/http2/lib/src/streams/stream_handler.dart | 💚 92 % ⬆️ 0 % |
This check for test coverage is informational (issues shown here will not fail the PR).
This check can be disabled by tagging the PR with skip-coverage-check.
c75d1f3 to
9ea8305
Compare
9ea8305 to
09beab0
Compare
7d9d064 to
7cd9c35
Compare
7cd9c35 to
1840312
Compare
1840312 to
4048b49
Compare
4048b49 to
438a9fb
Compare
438a9fb to
36ef5b9
Compare
78fc4d8 to
f22d9f4
Compare
9e9429b to
3de579d
Compare
…W_UPDATE cost Propagate connection-level send-window and transport backpressure to StreamMessageQueueOut so outgoing stream producers pause instead of buffering unbounded DATA inside ConnectionMessageQueueOut (CVE-2019-9517), count WINDOW_UPDATE replies toward FrameWriter.maxQueuedReplyFrames, and normalize larger non-Uint8List DataMessage payloads once so small-window fragmentation uses O(1) Uint8List views instead of O(N^2) sublist copies (CVE-2019-9511).
3de579d to
ff978ae
Compare
Note
This PR was generated by an AI coding agent (Jetski) on behalf of @mosuem.
Summary
Fixes three outbound buffering and fragmentation vulnerabilities:
StreamMessageQueueOutchecked onlystreamWindow.peerWindowSizebefore draining all outgoingDataMessages intoConnectionMessageQueueOut._messagesand markingstream.outgoingQueue.bufferIndicatorunbuffered. A peer advertising a hugeSETTINGS_INITIAL_WINDOW_SIZE(2^31 - 1) while withholding connectionWINDOW_UPDATEs (or not reading from its TCP socket) causedstream.outgoingMessages.addStream(...)to never pause, buffering arbitrary response data in memory.WINDOW_UPDATEreply accumulation:FrameWriter.writeWindowUpdatebypassed_writeReplyFrame, so a peer sendingDATAframes on a drained stream without reading from the socket could queueWINDOW_UPDATEreplies pastFrameWriter.maxQueuedReplyFrames.List.sublistcopying on Data Dribble (CVE-2019-9511): When an application passed a non-Uint8ListList<int>tosendDataand a peer granted 1-byteWINDOW_UPDATEincrements,viewOrSublistfell back toList.subliston every byte, copyingO(N^2)elements.Why this is right
Per RFC 9113 §10.5:
Propagating
ConnectionMessageQueueOut.dataBufferIndicatortoStreamMessageQueueOutpausesstream._outgoingCSubscriptionas soon as the connection send window or underlying transport sink blocks, count-limiting unreadWINDOW_UPDATEreplies enforcesmaxQueuedReplyFrames, and normalizing larger non-Uint8ListDataMessagepayloads once toUint8Listmakes every subsequentviewOrSublistslice anO(1)Uint8List.view.Changes
lib/src/flowcontrol/connection_queues.dart,lib/src/flowcontrol/stream_queues.dart,lib/src/streams/stream_handler.dartConnectionMessageQueueOut.dataBufferIndicatorand hold non-emptyDataMessages inStreamMessageQueueOutwhile connection-level sending would buffer, propagating pause/resume signals tostream.outgoingMessages.lib/src/frames/frame_writer.dartwriteWindowUpdatethrough_writeReplyFrame.lib/src/flowcontrol/queue_messages.dartUint8ListDataMessagebyte lists (length > 64) once intoUint8List.test/server_test.dart,test/src/flowcontrol/stream_queues_test.dart,test/src/flowcontrol/mocks.mocks.dart,CHANGELOG.mdWINDOW_UPDATE, and linear-dribble tests plus3.2.1-wipchangelog entry.Test Verification (Fails Before → Passes After)
Before fix:
After fix:
Full
package:http2suite at this point of the stack:+294 ~7: All tests passed!(dart formatanddart analyze --fatal-infosare clean.)Stack
Stacked on #2105. Followed by #2107–#2110 and #2111 (prepare to release 3.2.1).