ArchLinux: 201710-28: musl: arbitrary code execution
Summary
A stack-based buffer overflow has been found in the DNS response parsing code of musl libc <= 1.1.16. When an application makes a request via getaddrinfo for both IPv4 and IPv6 results (AF_UNSPEC), an attacker who controls or can spoof the nameservers configured in resolv.conf can reply to both the A and AAAA queries with A results. Since A records are smaller than AAAA records, it's possible to fit more addresses than the precomputed bound, and a buffer overflow occurs.
Resolution
Upgrade to 1.1.17-1.
# pacman -Syu "musl>=1.1.17-1"
The problem has been fixed upstream in version 1.1.17.
References
https://seclists.org/oss-sec/2017/q4/107 https://security.archlinux.org/CVE-2017-15650
Workaround
Using a local, trusted DNS resolver mitigates the issue.