Description
OpenBSD through 6.6 allows local users to escalate to root because a check for LD_LIBRARY_PATH in setuid programs can be defeated by setting a very small RLIMIT_DATA resource limit. When executing chpass or passwd (which are setuid root), _dl_setup_env in ld.so tries to strip LD_LIBRARY_PATH from the environment, but fails when it cannot allocate memory. Thus, the attacker is able to execute their own library code as root.
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Metasploit 1 module
-
OpenBSD Dynamic Loader chpass Privilege Escalation
exploit/openbsd/local/dynamic_loader_chpass_privesc
Exploit-DB 2
- OpenBSD - Dynamic Loader chpass Privilege Escalation (Metasploit) EDB-47803 · local · Dec 30, 2019 · verified
- OpenBSD 6.x - Dynamic Loader Privilege Escalation EDB-47780 · local · Dec 16, 2019 · verified
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
References
- https://www.openbsd.org/errata66.html
- https://www.openwall.com/lists/oss-security/2019/12/11/9
- 20191212 Local Privilege Escalation in OpenBSD's dynamic loader (CVE-2019-19726) mailing-list
- http://packetstormsecurity.com/files/155658/Qualys-Security-Advisory-OpenBSD-Dynamic-Loader-Privilege-Escalation.html
- 20191213 Local Privilege Escalation in OpenBSD's dynamic loader (CVE-2019-19726) mailing-list
- http://packetstormsecurity.com/files/155764/OpenBSD-Dynamic-Loader-chpass-Privilege-Escalation.html
- [oss-security] 20231003 CVE-2023-4911: Local Privilege Escalation in the glibc's ld.so mailing-list
- 20231005 CVE-2023-4911: Local Privilege Escalation in the glibc's ld.so mailing-list
- http://packetstormsecurity.com/files/174986/glibc-ld.so-Local-Privilege-Escalation.html