]> git.ipfire.org Git - thirdparty/haproxy.git/commit
DEBUG: dns: add a few more BUG_ON at sensitive places
authorWilly Tarreau <w@1wt.eu>
Wed, 20 Oct 2021 09:02:13 +0000 (11:02 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 20 Oct 2021 15:52:17 +0000 (17:52 +0200)
commit62e467c667eadcdba224d88ba57958b34a804a2c
tree93fef356be974b29a1a9d935fa8a729dd2060782
parentb56a878950c602886d018a14a974103024c8ded4
DEBUG: dns: add a few more BUG_ON at sensitive places

A few places have been caught triggering late bugs recently, always cases
of use-after-free because a freed element was still found in one of the
lists. This patch adds a few checks for such elements in dns_session_free()
before the final pool_free() and dns_session_io_handler() before adding
elements to lists to make sure they remain consistent. They do not trigger
anymore now.
src/dns.c