How to secure against Glibc Ghost Vulnerability: CVE-2015-0235

CVE-2015-0235 Ghost (glibc gethostbyname buffer overflow) Vulnerability is serious cause for all Linux servers. This vulnerability leveraged to execute remote and code execution on the victim Linux server. The vulnerability found By Qualys Researcher and patched in GNU.

What is the cause ?

The bug is in __nss_hostname_digits_dots() function of function of the GNU C Library (glibc), and location of the path is file for non-reentrant version is nss/getXXbyYY.c , which is used by the gethostbyname(). The vulnerability can be exploited both via locally and remotely. In order to trigger this vulnerability attacker needs to be able to feed specially crafted ‘host name’ to the service. And service needs to process it without validating it first.

Following are the potentially exploitable services

procmail
Exim
pppd
clockdiff

You can find the list of services which are rely on the GNU C libraries by executing following command

Code:
lsof | grep libc | awk '{print $1}' | sort | uni

Fix for Centos/RHEL/Fedora 5,6,7

Code:
yum update glibc 
sudo restart

Fix for Ubuntu

Code:
sudo apt-get update
sudo apt-get dist-upgrade
sudo restart
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s