Tests: QPACK field section prefix with oversized delta_base.#36
Open
devnexen wants to merge 1 commit intonginx:masterfrom
Open
Tests: QPACK field section prefix with oversized delta_base.#36devnexen wants to merge 1 commit intonginx:masterfrom
devnexen wants to merge 1 commit intonginx:masterfrom
Conversation
Added raw_prefix parameter to HTTP3 test module to allow crafting arbitrary QPACK field section prefix bytes. Added test for oversized delta_base value in QPACK field section prefix, verifying nginx properly rejects the stream. The test exercises a uint64_t to ngx_uint_t truncation in the QPACK parser that can silently wrap to a valid dynamic table index on 32-bit platforms. A corresponding fix will follow in nginx.
devnexen
added a commit
to devnexen/nginx
that referenced
this pull request
Mar 16, 2026
Added bounds checks for insert_count and delta_base values parsed from QPACK field section prefix integers. The prefix integer parser produces uint64_t values which are assigned to ngx_uint_t fields without validation. On 32-bit platforms, this truncation can silently wrap a crafted delta_base to a valid dynamic table index, causing incorrect header lookups. Also added an overflow check for the base computation (insert_count + delta_base), mirroring the existing underflow check in the negative base case. Test: nginx/nginx-tests#36
2 tasks
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.
Added raw_prefix parameter to HTTP3 test module to allow crafting arbitrary QPACK field section prefix bytes.
Added test for oversized delta_base value in QPACK field section prefix, verifying nginx properly rejects the stream. The test exercises a uint64_t to ngx_uint_t truncation in the QPACK parser that can silently wrap to a valid dynamic table index on 32-bit platforms. A corresponding fix will follow in nginx.
Proposed changes
Describe the use case and detail of the change. If this PR addresses an issue on GitHub, make sure to include a link to that issue using one of the supported keywords in this PR's description or commit message.
Checklist
Before creating a PR, run through this checklist and mark each as complete:
README.mdand/orCHANGELOG.md).