Repository navigation
fix(http2): delete malformed framing-related headers from responses - #548
Open
duongynhi000005-oss wants to merge 1 commit into
Open
duongynhi000005-oss wants to merge 1 commit into
duongynhi000005-oss wants to merge 1 commit into
Conversation
Sync upstream Go CVE-2026-78660 fix (commit ffc306b): - Strip connection-specific headers (Connection, Keep-Alive, Proxy-Connection, Transfer-Encoding, Upgrade) from HTTP/2 responses per RFC 9113 §8.2.2. - Collapse identical duplicate Content-Length headers per RFC 9110 §8.6, and drop Content-Length when duplicates conflict or cannot be parsed as valid non-negative integers. - Add regression tests covering stripped framing headers and strict Content-Length handling. Fixes imroc#542 Signed-off-by: duongynhi000005-oss <duongynhi000005@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR synchronizes the upstream Go security fix for CVE-2026-78660 (ffc306b) into the inlined HTTP/2 transport (
internal/http2/transport.go).What this fixes
Connection,Keep-Alive,Proxy-Connection,Transfer-Encoding, andUpgradeare connection-specific and prohibited by RFC 9113 §8.2.2. If forwarded by a client/reverse-proxy to an HTTP/1 endpoint, they could lead to response smuggling. These are now stripped from incoming response headers.Content-Lengthheaders are now deleted (settingContentLength = -1), while identical duplicateContent-Lengthheaders are collapsed into a single value per RFC 9110 §8.6.transport_response_test.goverifying that connection headers are purged and malformed/conflictingContent-Lengthvalues are cleanly dropped.Fixes #542
Signed-off-by: duongynhi000005-oss duongynhi000005@gmail.com