]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: resolvers: accept fields at the response boundary
authorManu Nicolas <e.nicolas@criteo.com>
Tue, 18 Aug 2026 17:24:45 +0000 (17:24 +0000)
committerWilly Tarreau <w@1wt.eu>
Wed, 19 Aug 2026 09:19:51 +0000 (11:19 +0200)
commitfd9570f30319b2e845576fdd089e519e57b906e9
tree29dbf52247474c432c802908124ab8517415020c
parentba12b6c83f482785d2bd2ed98cdcfa814f16e42e
BUG/MINOR: resolvers: accept fields at the response boundary

resolv_validate_dns_response() treats <bufend> as an exclusive end
pointer. Its fixed-width field checks nevertheless reject
"reader + 2 == bufend", although reader[0] and reader[1] are both
within the response.

Use a strict greater-than comparison for every two-byte DNS header and
question field. No complete successful answer is affected, but this
corrects the parser contract and lets later checks classify minimal
responses instead of rejecting them early as invalid.

This may be backported as far as 2.4.
src/resolvers.c