Executive brief
A flaw in the GNU C Library's dynamic loader allows local attackers to execute arbitrary code with elevated privileges on systems with a specific kernel setting disabled. When a setuid or setgid program uses certain library search paths, an attacker can exploit a timing gap to inject a malicious library that gets loaded and executed with the program's elevated rights, leading to privilege escalation.
Technical details
A TOCTOU race condition in glibc's ld.so during $ORIGIN expansion in DT_RPATH for AT_SECURE processes allows local privilege escalation. The loader validates the normalized path against trusted directories but opens the raw, un-normalized path, permitting traversal sequences like "/tmp/a/b/../../../usr/lib". On systems with fs.protected_hardlinks disabled, an attacker can hard-link the setuid/setgid binary and race to replace path components with symlinks, redirecting the loader to load attacker-controlled shared objects.
Affected products
- GNU C Library (glibc) 2.14 through 2.44
Timeline
- 2026-07-06: disclosed
- 2026: patched: Fix included in glibc 2.45