• Simon Kelley's avatar
    Fix buffer overflow introduced in 2.73rc6. · 5d07d77e
    Simon Kelley authored
    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 b8f16556,
    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.
    5d07d77e
rfc1035.c 60.5 KB