Looney Tunables
CVE-2023-4911
Theory
CVE-2023-4911 (Looney Tunables) is a buffer overflow vulnerability in GNU C Library’s dynamic loader’s, known as ld.so
, when processing the GLIBC_TUNABLES environment variable. This issue could allow a local attacker to use maliciously crafted GLIBC_TUNABLES environment variables when launching binaries with SUID permission to execute code with elevated privileges.
This vulnerability was introduced in glibc version 2.34 through commit 2ed18c. The vulnerability affects recent versions of major Linux distributions such as RHEL, Ubuntu, Fedora , Debian, Amazon Linux, Gentoo and any other distribution that uses glibc.
The vulnerability impacts major Linux distributions, including:
Fedora 37 and 38
Ubuntu 22.04 and 23.04
Debian 12 and 13
Practice
To test directly whether the target is vulnerable, we can use the following command (vulnerable if there is a segmentation error):
If glibc version is greater or equal than 2.34, target may be vulnerable
Or we can retreive the version of glibc using the following C++ code
Compile the above code using the following command:
And execute it
Resources
Last updated