chiark / gitweb /
SECURITY: Ignore apparent answers before first RR we found the first time
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 10 Dec 2016 23:32:49 +0000 (23:32 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 26 May 2020 19:12:25 +0000 (20:12 +0100)
commitfcf2b4e1faf22accb6184cca595aaee602839868
tree3a36eded514ff7582e044770e3ad9aa90514ce0c
parent72c6bfd77dfdb34457a792874fd1c3030fca90ac
SECURITY: Ignore apparent answers before first RR we found the first time

This way the second answer scan finds the same RRs at the first.
Otherwise, adns can be confused by interleaving answers for the CNAME
target, with the CNAME itself.

In that case the answer data structure (on the heap) can be overrun.

With this change, we prefer to look only at the answer RRs which come
after the CNAME, which is at least arguably correct.

Found by AFL 2.35b.  CVE-2017-9109.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/reply.c