]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: resolvers: Detach query item on response error
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 1 Dec 2021 09:18:08 +0000 (10:18 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 1 Dec 2021 10:47:08 +0000 (11:47 +0100)
commit80b2e34b18b805d28a9569d8157c7bcf088eef8f
tree78298869eedc7263d0a6a8eee94d137f1235676e
parent4ab2679689c02882d9ea743ab0c458cd0c3b5388
BUG/MEDIUM: resolvers: Detach query item on response error

When a new response is parsed, it is unexpected to have an old query item
still attached to the resolution. And indeed, when the response is parsed
and validated, the query item is detached and used for a last check on its
dname. However, this is only true for a valid response. If an error is
detected, the query is not detached. This leads to undefined behavior (most
probably a crash) on the next response because the first element in the
query list is referencing an old response.

This patch must be backported as far as 2.0.
src/resolvers.c