Fixing the Ghost Vulnerability (CVE-2015-0235) on Centos

At the end of January 2015 a vulnerability was discovered which allows remote code execution in daemons/services that perform DNS host loookups. This includes Linux based system and any OS that uses the GNU C libraries . I will show you how to to this on Centos:

First of all check the changelog to see if it has already been installed:

# rpm -q --changelog glibc | grep CVE-2015-0235

If this is shows a blank output then your system needs upgrading.

# yum clean all

to eliminate any cached packages and headers. Then update theGNU C libraries:

# yum update glibc

When updated check the changelog again:

# rpm -q --changelog glibc | grep CVE-2015-0235

You should now see a one line display like below:

– Fix parsing of numeric hosts in gethostbyname_r (CVE-2015-0235, #1183533).

It is then required that the services affected be restarted but I just tend to schedule in a reboot to ensure all services have been stopped and started

# reboot