A time-of-check to time-of-use (TOCTOU) race condition in the dynamic loader (ld.so) of the GNU C Library (glibc) versions 2.14 through 2.44 allows a...
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| Ubuntu:Pro:14.04:LTSeglibc |
All versions→ Not listed |
Not listed |
| Ubuntu:Pro:16.04:LTSglibc |
All versions→ Not listed |
Not listed |
| Ubuntu:Pro:18.04:LTSglibc |
All versions→ Not listed |
Not listed |
| Ubuntu:Pro:20.04:LTSglibc |
All versions→ Not listed |
Not listed |
| Ubuntu:22.04:LTSglibc |
< 2.35-0ubuntu3.18→ 2.35-0ubuntu3.18 |
2.35-0ubuntu3.18 |
| Ubuntu:24.04:LTSglibc |
< 2.39-0ubuntu8.12→ 2.39-0ubuntu8.12 |
2.39-0ubuntu8.12 |
| Ubuntu:26.04:LTSglibc |
< 2.43-2ubuntu2.7→ 2.43-2ubuntu2.7 |
2.43-2ubuntu2.7 |
Original description The description as published by the source.
A time-of-check to time-of-use (TOCTOU) race condition in the dynamic loader (ld.so) of the GNU C Library (glibc) versions 2.14 through 2.44 allows a local attacker to escalate privileges. When expanding $ORIGIN in DT_RPATH for setuid/setgid (AT_SECURE) programs, glibc validates the lexically normalized search path against the trusted directories but then opens the raw, un-normalized path. On systems where the Linux fs.protected_hardlinks sysctl is disabled, a local attacker who hard-links such a program into an attacker-controlled directory and wins a race to replace an intermediate path component with a symbolic link can direct the loader outside the trusted directory, causing it to load an attacker-controlled shared object and execute arbitrary code with the elevated privileges of the program. Exploitation requires an installed setuid or setgid binary whose DT_RPATH uses $ORIGIN followed by ".." traversal that normalizes into a trusted directory, and the ability to hard-link that binary and win the race by swapping a path component for a symbolic link. Major Linux-based OS distributions ship with fs.protected_hardlinks enabled by default and mitigate the vulnerability.
Source: OSV.dev (Open Source Vulnerabilities) OSV
References
- advisory ubuntu.com
- report ubuntu.com
- report cve.org
- report sourceware.org