CVE-2023-4911 — GNU C Library Buffer Overflow Vulnerability

CVE-2023-4911

glibc ld.so — 'Looney Tunables' GLIBC_TUNABLES Heap Buffer Overflow for Local Root

What is GNU C Library (glibc)?

The GNU C Library (glibc) is the standard C library implementation included in virtually all Linux distributions, from enterprise RHEL/CentOS to Ubuntu, Debian, Fedora, and Alpine. Its dynamic loader (ld.so) is the component responsible for loading programs and their shared library dependencies at process startup — it runs before any application code and with special privileges because it must handle SUID binaries. Any exploitable vulnerability in ld.so that can be triggered via a SUID binary provides a direct path to root privilege escalation from a standard user account.

Overview

CVE-2023-4911, nicknamed "Looney Tunables" by its discoverers at Qualys, is a heap-based buffer overflow in glibc's dynamic loader that allows a local unprivileged user to escalate privileges to root. The vulnerability exists in how ld.so processes the GLIBC_TUNABLES environment variable. Qualys published a full technical advisory and proof-of-concept on October 3, 2023; exploits appeared in the wild within weeks, including use by the Kinsing malware/cryptomining group.

Affected Versions

Distribution Affected Versions Fixed
glibc (upstream) 2.34 – 2.38 Patch in 2.38-r1 / distro updates
Red Hat Enterprise Linux 8, 9 RHSA-2023:5453, RHSA-2023:5455
Fedora 37, 38 Updates released October 3, 2023
Ubuntu 22.04 LTS, 23.04 USN-6405-1
Debian 12 (Bookworm), 13 (Trixie) DSA-5514

Distros running glibc 2.33 and earlier (including Alpine Linux) were not affected as the vulnerable GLIBC_TUNABLES processing code was introduced in glibc 2.34.

Technical Details

The GLIBC_TUNABLES environment variable allows users to configure glibc behavior at runtime (e.g., tuning memory allocator settings). The dynamic loader processes this variable during program startup via the __tunables_init() function.

The vulnerability (CWE-122) arises when ld.so parses the value of GLIBC_TUNABLES: it calculates the length of the tunable string but in certain edge cases writes beyond the allocated heap buffer. By crafting a GLIBC_TUNABLES value that triggers this overflow, a local attacker can corrupt adjacent heap memory. When this is triggered via a SUID binary (which retains the environment variable and runs with elevated privileges), the attacker can leverage the corruption to redirect execution and achieve arbitrary code execution as root.

Qualys demonstrated reliable exploitation on Fedora 37/38, Ubuntu 22.04/23.04, and Debian 12/13. The exploit works without any special preconditions beyond having a shell — standard SUID binaries like /bin/su trigger it.

Discovery

Saeed Abbasi and the Qualys Research Team discovered and disclosed Looney Tunables on October 3, 2023, coordinating with major Linux distributions to ensure patches were available simultaneously with the advisory.

Exploitation Context

Qualys released a full proof-of-concept alongside the advisory. Within weeks, the Kinsing threat group (known for cryptocurrency mining malware targeting cloud/container environments) incorporated Looney Tunables into their toolkit. The vulnerability's broad reach — affecting virtually every modern Linux distribution running glibc 2.34+ — made it a high-priority target. Any Linux system where an attacker has a low-privilege shell (e.g., via a web application exploit, SSH with weak credentials, or container escape) is vulnerable.

CISA added CVE-2023-4911 to the KEV catalog on November 21, 2023, confirming active exploitation in targeted attacks.

Remediation

  1. Update glibc immediately — install the patched glibc package for your distribution (RHSA-2023:5453 for RHEL 8, RHSA-2023:5455 for RHEL 9, USN-6405-1 for Ubuntu, DSA-5514 for Debian, etc.).
  2. Restart services after updating — glibc is loaded at process startup, so existing processes continue to use the old version until restarted. A full system reboot is the safest approach.
  3. Check container images — container base images frequently bundle their own glibc; rebuild images using updated base images (e.g., ubuntu:22.04 with the October 2023 patch level or later).
  4. Audit SUID binaries — if patching is delayed, audit and reduce unnecessary SUID bits to limit the trigger surface, though this is a weak mitigation.
  5. Monitor for cryptomining indicators — Kinsing and similar groups actively exploit this; look for unusual CPU usage, outbound mining pool connections, and unexpected cron jobs.
  6. Update container runtimes and Kubernetes nodes — nodes and privileged containers running affected glibc versions are vulnerable even in hardened environments.

Key Details

PropertyValue
CVE ID CVE-2023-4911
Vendor / Product GNU — GNU C Library
NVD Published2023-10-03
NVD Last Modified2026-02-13
CVSS 3.1 Score7.8
CVSS 3.1 VectorCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
SeverityHIGH
CWE CWE-122 find similar ↗
CISA KEV Added2023-11-21
CISA KEV Deadline2023-12-12
Known Ransomware Use No

CVSS 3.1 Breakdown

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Required Action

CISA BOD 22-01 Deadline: 2023-12-12. Apply mitigations per vendor instructions or discontinue use of the product if mitigations are unavailable.

Timeline

DateEvent
2023-10-03Qualys Research Team discloses 'Looney Tunables' with full technical advisory and proof-of-concept
2023-10-03glibc patch committed; Red Hat, Debian, Ubuntu ship updated packages
2023-11-21Added to CISA Known Exploited Vulnerabilities catalog
2023-12-12CISA BOD 22-01 remediation deadline