]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MAJOR: dns: fix null pointer dereference in snr_update_srv_status
authorJerome Magnin <jerome@layaute.net>
Tue, 28 Jul 2020 11:38:22 +0000 (13:38 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 29 Jul 2020 10:05:55 +0000 (12:05 +0200)
commit012261ab34e2423df983c502b43b304f84b71c9e
treed53e90653eef69645bf1d76a5a57a8bb08f2d3f8
parent471425f51d71d1214abeee40439a51a2a3217102
BUG/MAJOR: dns: fix null pointer dereference in snr_update_srv_status

Since commit 13a9232eb ("MEDIUM: dns: use Additional records from SRV
responses"), a struct server can have a NULL dns_requester->resolution,
when SRV records are used and DNS answers contain an Additional section.

This is a problem when we call snr_update_srv_status() because it does
not check that resolution is NULL, and dereferences it. This patch
simply adds a test for resolution being NULL. When that happens, it means
we are using SRV records with Additional records, and an entry was removed.

This should fix issue #775.
This should be backported to 2.2.
src/server.c