glibc vulnerabilities
4 real-world CVEs in glibc. Each one is a short hands-on exercise in Hexret: find the vulnerable line, follow the exploit and learn the fix.
- CVE-2024-2961high 8.82024
glibc iconv ISO-2022-CN-EXT out-of-bounds write
Converting to a multibyte charset, one escape-sequence path skips its output-bounds check, writing up to 3 fixed bytes past the buffer.
- CVE-2023-4911high 7.82023
Looney Tunables: glibc ld.so GLIBC_TUNABLES buffer overflow
The loader's tunables parser copies each recognized name=value pair into a fixed-size buffer, but a malformed name=name=value string is parsed and appended twice, overflowing the buffer during setuid startup.
- CVE-2019-14271critical 9.82019
Docker cp container escape via untrusted libnss load (CVE-2019-14271)
The docker cp helper chroots into the container, then a routine archive walk resolves file owners and glibc's NSS facility lazily loads libnss modules from inside that container filesystem, so a trojaned libnss runs as root on the host.
- CVE-2015-0235critical 10.02015
GHOST hostname parser heap overflow
glibc under-allocated a resolver scratch buffer by one pointer slot, so a numeric hostname copy wrote four or eight bytes beyond the heap allocation.