Fix buffer overflow introduced in 2.73rc6. v2.73rc8
authorSimon Kelley <simon@thekelleys.org.uk>
Fri, 15 May 2015 17:13:06 +0000 (18:13 +0100)
committerSimon Kelley <simon@thekelleys.org.uk>
Fri, 15 May 2015 17:13:06 +0000 (18:13 +0100)
commit5d07d77e75e0f02bc0a8f6029ffbc8b371fa804e
tree36a65c02a79c59e1bfce269315e22f46cf446b13
parent62018e1f720fa11e83879111a4b1b3753b5c25bb
Fix buffer overflow introduced in 2.73rc6.

Fix off-by-one in code which checks for over-long domain names
in received DNS packets. This enables buffer overflow attacks
which can certainly crash dnsmasq and may allow for arbitrary
code execution. The problem was introduced in commit b8f16556d,
release 2.73rc6, so has not escaped into any stable release.
Note that the off-by-one was in the label length determination,
so the buffer can be overflowed by as many bytes as there are
labels in the name - ie, many.

Thanks to Ron Bowes, who used lcmatuf's afl-fuzz tool to find
the problem.
src/rfc1035.c