Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Sep 2012 11:27:50 GMT
From:      Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   bin/171604: LD_PRELOAD set to not absolute path crashes rtld
Message-ID:  <201209131127.q8DBRofM060921@red.freebsd.org>
Resent-Message-ID: <201209131130.q8DBU8sm021296@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         171604
>Category:       bin
>Synopsis:       LD_PRELOAD set to not absolute path crashes rtld
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 13 11:30:08 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Andrey Simonenko
>Release:        9.1-PRELEASE
>Organization:
>Environment:
>Description:
Recent RELENEG_9 got some changes that crash rtld if LD_PRELOAD is not absolute pathname.
>How-To-Repeat:
# env LD_PRELOAD=libz.so.6 ls
Segmentation fault (core dumped)
# gdb /bin/ls ls.core
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...(no debugging symbols found)...
Core was generated by `ls'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols found)...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x000000080060d819 in dlinfo () from /libexec/ld-elf.so.1
(gdb) bt
#0  0x000000080060d819 in dlinfo () from /libexec/ld-elf.so.1
#1  0x000000080060fed1 in dlsym () from /libexec/ld-elf.so.1
#2  0x0000000800608fa9 in .text () from /libexec/ld-elf.so.1
#3  0x0000000000000000 in ?? ()
#4  0x0000000000000000 in ?? ()
....
Previous frame inner to this frame (corrupt stack?)
# env LD_PRELOAD=/lib/libz.so.6 ls
....

>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209131127.q8DBRofM060921>