Skip to content

Tests: QPACK field section prefix with oversized delta_base.#36

Open
devnexen wants to merge 1 commit intonginx:masterfrom
devnexen:h3-qpack-delta-base-overflow
Open

Tests: QPACK field section prefix with oversized delta_base.#36
devnexen wants to merge 1 commit intonginx:masterfrom
devnexen:h3-qpack-delta-base-overflow

Conversation

@devnexen
Copy link

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:

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant