]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: hpack: validate idx > 0 in hpack_valid_idx()
authorWilly Tarreau <w@1wt.eu>
Tue, 28 Apr 2026 01:56:35 +0000 (03:56 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 30 Apr 2026 07:33:31 +0000 (09:33 +0200)
commit66b00543c5d7b1024fd6dea8155350793676ec8e
tree2a94d2672b35c7f3f0d1e00542a65458e61229b9
parent2464c735269816fe103a217528609e158d3a75dc
BUG/MINOR: hpack: validate idx > 0 in hpack_valid_idx()

HPACK indices start at 1, so idx=0 is invalid. The function only checked
the upper bound before, allowing idx=0 to pass as valid. This is harmless
as the code properly checks for existing name and values everywhere, but
then due to the call to hpack_idx_to_phdr(), index 0 will be taken for
:authority. Let's just make sure it's never zero.

This can be backported.
include/haproxy/hpack-tbl.h