Repository navigation
fix(application): parse an HTTP/2 SETTINGS frame cut inside its settings (#2659) - #2666
Merged
Merged
Conversation
…ngs (#2659) A SETTINGS frame the capture cuts short falls back to Raw. Its settings list is sized by the frame's Length, so past the octets present a SettingPair consumes nothing, and ListField.unpack refuses it as a loop making no progress. - SettingPairListField sizes SettingsFrame.settings by the octets present: the setting the data ends inside is kept as far as it goes, and Schema.unpack records the short read. ListField is unchanged. - HTTPv2.make takes frame_length, which HTTPv2._make_data passes through. One that is no int from the frame's own Length to 0xFFFFFF, or above it before a payload, raises ProtocolError (#2617). - HTTPv2.pack has a frame made short of its Length parsed back at that Length, as the capture was, rather than refused by HTTPv2.read. - Tests: cuts at every offset through TCP and through HTTPv2, a whole frame, the next frame left alone, the field on bytes and a stream, frame_length's refusals and edges, a dict with no length, and the short-read sweep. HTTP, HTTP/2, schema, sweep, doc-claim and member-order modules pass; captures parse identically to main.
Owner
Author
|
GOOD TO GO at |
JarryShaw
added a commit
that referenced
this pull request
Nov 2, 2026
…he cut-frame fixes and GRE's bindings into 1.6.0 (#2449) - Breaking: TCP, UDP and SCTP makers (#2670) and PCAP-NG's (#2671) raise on a value a field cannot hold, where 1.5.x wrote it masked; each entry gives the old and new values. The TTL Diff wraps as before. - Changed: __index__ returns the LinkType, EtherType, TransType or AppType value, ports as ints (#2652); only Create Release waits for a deployment approval (#2658). The conventions entry records the index rule. - Fixed: a cut HTTP/2 SETTINGS frame parses and rebuilds; HTTPv2.make takes frame_length (#2666). - Folded into unreleased entries: FRAD at LinkType 107 and GRE at IP protocol 47 (#2667); cut IGMPv3 messages and num_group_records (#2662, #2672); Linux_ARPHRD (#2663); DCCP's range checks (#2670); a cut GRE frame is TRUNCATED, replacing fold-12's INVALID note, and frame_length in pcapkit.utilities.contextvars (#2668). - No entry for _make_sint's private allow_unsigned, ARP's private PAT_MAC_ADDR, or the test- and docs-only d728873, 326a6cf, fc80fb1, a37edf1 and 2766707. - CHANGELOG.md regenerated; util/changelog_md.py --check passes.
This was referenced Nov 2, 2026
Closed
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.
make pylint,make mypy,make isort)make testpasses, and a test case covers the changeWhat is the purpose of your pull request?
fix— fixes a bugDescription of your pull request and other information
An HTTP/2 SETTINGS frame cut short by the capture parses as far as its octets go, and rebuilds as captured. It used to raise a loud
FieldValueErrorfromListField's #431 guard.SettingPairListField: sizes the settings by the octets present, as fix(internet): a truncated IGMPv3 Report falls back to Raw instead of parsing what it carries #2650'sGroupRecordListFielddoes. The short read is recorded, andListFieldis unchanged.HTTPv2.maketakesframe_length, and_make_datapasses the parsed Length through, so a cut frame keeps its declared Length. Per fix(internet): the Quick-Start rate codec raises in IPv4 and clamps in TCP #2617,makeraisesProtocolErrorin two cases: the value is not anint(not abool) between the frame's own Length and0xFFFFFF, or it exceeds the frame's Length while a payload follows.A Sonnet cross-review returned GOOD TO GO after two rounds. Across its differentials (1658 cuts, 9072 whole frames, 12078 length mismatches), only SETTINGS changes. Every refusal and edge is pinned. #2665 tracks a separate defect the work found: a cut frame after the connection preface.
Closes #2659