HTTP/2: HPACK integer decoding wraps values above UINT32_MAX
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- c
- Domain
- networking
Research direction
Start at h2_decode_integer() in the HTTP/2 HPACK codec and trace every caller that consumes header indexes, string lengths and table-size updates. Check the continuation-shift bound before shifting or accumulating so the sum is rejected once it exceeds UINT32_MAX. Then extend the existing HPACK integer tests with UINT32_MAX and UINT32_MAX + 1 vectors; done means both boundary cases decode or reject correctly and the surrounding header-decode tests still pass.
Written by the indexing model from the issue text.
Description
h2_decode_integer() permits a continuation shift of 28 and adds (b & 0x7f) << 28 to a uint32 accumulator. Oversized HPACK integers therefore wrap to small values instead of failing, allowing invalid header indexes, string lengths, and table sizes to be interpreted as valid values. Reject any continuation whose value or final sum exceeds UINT32_MAX before shifting or adding, and add boundary vectors for UINT32_MAX and UINT32_MAX + 1.
- Dominant language
- C
- Stars
- 16
- Forks
- 7
- Avg merge
- 4h 17m
- Merged PRs (30d)
- 198
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from c4punks/CWIST
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
bug critical
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
GXF: heap buffer overflow in parse_ad_cdp() — unbounded cc_count in CDP cc data sectionPossibly taken @pranayr710 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
CCExtractor/ccextractor#2498 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
area: services kind: bug preview-effort: small priority: low
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Static Analysis failurePossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100