CVE-2017-16997: Critical severity GNU glibc vulnerability
elf/dl-load.c in the GNU C Library (aka glibc or libc6) 2.19 through 2.26 mishandles RPATH and RUNPATH containing $ORIGIN for a privileged (setuid or ATSECURE) program, which allows local users to gain privileges via a Trojan horse library in the current working directory, related to the fillinrpath and decomposerpath functions. This is associated with misinterpretion of an empty RPATH/RUNPATH token as the "./" directory. NOTE: this configuration of RPATH/RUNPATH for a privileged program is apparently very uncommon; most likely, no such program is shipped with any common Linux distribution.
Other sources
Incorrect handling of RPATH (or RUNPATH) in elf/dl-load.c could be used to run executables with libraries loaded from the current directory. Executables with ATSECURE or SETUID that contain '$ORIGIN' in RPATH/RUNPATH could be used to run arbitrary code and lead to escalation of privileges.
This vulnerability was introduced in glibc version 2.19.
References: https://sourceware.org/bugzilla/showbug.cgi?id=22625 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=884615 http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-16997
— Red Hat
Affected Software
Remediation
Patch Available
Patch Available
Patch Available
Event History
Frequently Asked Questions
What is CVE-2017-16997?
CVE-2017-16997 is a vulnerability in the GNU C Library (glibc or libc6) that mishandles RPATH and RUNPATH, allowing local users to gain privileges via a Trojan horse library.
How severe is CVE-2017-16997?
CVE-2017-16997 has a severity rating of 7.8 (Critical).
Which software versions are affected by CVE-2017-16997?
Versions of glibc from 2.19 to 2.26 are affected by CVE-2017-16997.
How can I fix CVE-2017-16997?
Update glibc to version 2.28-10+deb10u1 or later, 2.31-13+deb11u6 or later, or 2.36-9+deb12u2 or later.
Where can I find more information about CVE-2017-16997?
More information about CVE-2017-16997 can be found at the following references: [SecurityFocus](http://www.securityfocus.com/bid/102228), [Red Hat Advisory RHBA-2019:0327](https://access.redhat.com/errata/RHBA-2019:0327), [Red Hat Advisory RHSA-2018:3092](https://access.redhat.com/errata/RHSA-2018:3092).