This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug dynamic-link/14293] New: dlopen with non-existing RUNPATH causes double free
- From: "joamaki at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Mon, 25 Jun 2012 15:07:21 +0000
- Subject: [Bug dynamic-link/14293] New: dlopen with non-existing RUNPATH causes double free
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=14293
Bug #: 14293
Summary: dlopen with non-existing RUNPATH causes double free
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: dynamic-link
AssignedTo: unassigned@sourceware.org
ReportedBy: joamaki@gmail.com
Classification: Unclassified
Created attachment 6479
--> http://sourceware.org/bugzilla/attachment.cgi?id=6479
Backtrace for test program
When calling dlopen with an executable with RUNPATH section
pointing to a non-existing path and LD_LIBRARY_PATH pointing to /lib
the application crashes due to a double free in open_path (elf/dl-load.c).
This was actually causing a production application to crash due to
some silly sod setting the LD_LIBRARY_PATH to /lib in startup scripts :-).
Attached is a backtrace for the following test program:
--
#include <dlfcn.h>
/**
* gcc dlopen_bug.c -o dlopen_bug -ldl -Wl,-rpath,/nonexisting_path
-Wl,--enable-new-dtags -g
*
* Run with:
* LD_LIBRARY_PATH=/lib ./dlopen_bug
*
* Replace /lib with path to directory containing ld.so,
* e.g. /lib/x86_64-linux-gnu on Debian/Ubuntu.
*/
int main()
{
dlopen("nonexisting.so", RTLD_LAZY);
}
--
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.