]> git.ipfire.org Git - thirdparty/pdns.git/commit
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)
committeraerique <aerique@xs4all.nl>
Wed, 17 Jan 2018 08:57:09 +0000 (09:57 +0100)
commitba9200a3eac3c11230bdc3ae810b03985511cb00
tree9453ca0732fbb1782d9cdf607c46f5fcea27f1a4
parentd632f29767eefa0a9564a202ba73edc350fa311a
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.

(cherry picked from commit 4185f0895fbda41e8ffa21f39721db1f018a3466)
pdns/lwres.cc