Google is encouraging admins to patch systems after detailing a critical bug in a function in the GNU C Library (glibc) that could put a huge number of Linux system at risk of remote exploitation.
The flaw is a stack-based buffer overflow in the getaddrinfo function in glibc. Google detailed the bug alongside a patch released by glibc’s maintainers on Tuesday.
“The glibc DNS client side resolver is vulnerable to a stack-based buffer overflow when the getaddrinfo() library function is used,” said Google engineers Fermin J. Serna and Kevin Stadmeyer.
“Software using this function may be exploited with attacker-controlled domain names, attacker-controlled DNS servers, or through a man-in-the-middle attack,” they said.
The issue affects all versions of glibc since version 2.9, which was released in May 2008.
Dr Johannes Ullrich, CTO at the SAN Internet Storm Center, said the bug likely affects Linux servers, Android phones and home routers. That is, unless they run version of glibc earlier than 2.9.
“Pretty much any Unix based system uses glibc, and getaddrinfo is typically used to resolve IP addresses,” noted Ullrich.
Linux distributions known to be affected include Red Hat Enterprise Linux (RHEL) 6, RHEL 7, Debian versions “squeeze”, “wheezy” and “jessie”.
Google wasn’t the first to discover the bug. While its engineers were investigating the issue they learned that the bug was already known and that engineers RedHat were also trying to understand its impact. The companies cooperated to develop and test the patch.
Google has developed exploit code that it has not released, however it has published a non-weaponised proof of concept that admins can use to verify whether a system is affected.
Google’s engineers believe potential attack vectors for the flaw are “diverse and widespread”.
Ullrich detailed two possible options to exploit vulnerable systems, which can be triggered by causing a vulnerable system to conduct a DNS lookup in which the response, via TCP or UDP protocols, will be larger than 2048 bytes.
“DNS lookups can be triggered in many ways: An image embedded in a web page, an email sent that is processed by a spam filter (which involves DNS lookups) are just two of many options,” he noted.
But, as Google noted, while remote code execution is possible, it still needs to bypass exploit mitigations such as Address Space Layout Randomisation (ASLR).
Join us at the CSO Perspectives Roadshow in March.
CSO is proud to present our international keynote speakers: Robert Lentz, former CISO of US Department of Defense discussing the evolution of Cyber Security and Graham Cluley, world- renown IT Security blogger and Analyst (UK) on the rise of Malware in our age. We will also be featuring our Security Awareness stream, where you will hear from the likes of NAB and ANZ, as they discuss the importance of staff and customer security awareness programs. We will have up to 18 different interactive Security Exchange discussions on a variety of different topics for you to choose from as you build your personalised agenda for the day. Join CSO for a day of networking with your peers, engaging and discussing topics relevant to you, hearing from some of the top worldwide IT Security leaders in the market and attending the exhibition floor to win some amazing prizes.Read more:US DoD targets 4m Windows 10 upgrades by 2017 to boost security