chiark / gitweb /
SECURITY: Do not overrun reading buffer if domain ends with backslash
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 5 Dec 2016 22:47:34 +0000 (22:47 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 26 May 2020 19:11:40 +0000 (20:11 +0100)
commit278f8eee581c4c4a0ddd0f98c4dc8c2974cf6b90
tree43a9e957dc43afb9e5c0ac3cd8e7a260f88485b7
parent0457b397418afbeed72d627cda199071a633aa30
SECURITY: Do not overrun reading buffer if domain ends with backslash

If the query domain ended with \, and adns_qf_quoteok_query was
specified, qdparselabel would read additional bytes from the buffer
and try to treat them as the escape sequence.  It would depart the
input buffer and start processing many bytes of arbitrary heap data as
if it were the query domain.

Eventually it would run out of input or find some other kind of error,
and declare the query domain invalid.  But before then it might outrun
available memory and crash.

In principle this could be a denial of service attack.

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

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