]> git.ipfire.org Git - thirdparty/pdns.git/commit - pdns/lwres.cc
rec: Pass the correct buffer size to arecvfrom()
authorRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 12 Dec 2017 13:56:03 +0000 (14:56 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 12 Dec 2017 13:56:03 +0000 (14:56 +0100)
commit4185f0895fbda41e8ffa21f39721db1f018a3466
treeb55a6c9edfed2552c21859a5b0cb30bce587d980
parentd4d05f8982c5ab7d5a42ff55cd610fa077ca4e28
rec: Pass the correct buffer size to arecvfrom()

The size we used to pass to arecvfrom() along with our buffer was off by
one byte, resulting in the last byte of our buffer to be uninitialized for
answers exactly matching our outgoing buffer size. Since we passed the
correct size to MOADNSParser, we were reading one bye of unitialized
memory for such answers.
This caused issue with some authoritative servers sending an answer of our
exact buffer size, causing a parsing error. We would then retry without EDNS,
causing DNSSEC validation failures for some domains on such authoritative
servers.
pdns/lwres.cc