The GHOST bug is a weakness in the GNU C Library (glibc) that enables malicious actors to prompt a buffer overflow on Linux gadgets.

The buffer overflow may compel the victim’s device to execute various tasks. The GHOST bug impacts the glibc library. Functions ‘gethostbyname2()’ and ‘gethostbyname()’, which sort out domain names to their IP addresses.

Note: You shouldn’t confuse the GHOST bug with ‘ghost glitches’ (ghost bugs), user-reported software issues that programmers can’t recreate.

GHOST Bug History

The GHOST bug was initially detected by a security company, Qualys, in 2015. Researchers discovered that the `_nss_hostname_digits_dots()’ feature could result in a butter overflow. The phrase ‘GHOST’ in ‘GHOST bug’ refers to the ‘GetHOST’ group of functions that trigger the weakness.

Preventing the GHOST Bug

Examples of GHOST Bug