From nobody  Wed Feb 10 09:37:14 1999
Received: (from nobody@localhost)
          by hub.freebsd.org (8.8.8/8.8.8) id JAA24892;
          Wed, 10 Feb 1999 09:37:14 -0800 (PST)
          (envelope-from nobody)
Message-Id: <199902101737.JAA24892@hub.freebsd.org>
Date: Wed, 10 Feb 1999 09:37:14 -0800 (PST)
From: deraison@cybercable.fr
To: freebsd-gnats-submit@freebsd.org
Subject: dlopen will crash when opening some stripped shared libs
X-Send-Pr-Version: www-1.0

>Number:         10009
>Category:       misc
>Synopsis:       dlopen will crash when opening some stripped shared libs
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    jdp
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 10 09:40:00 PST 1999
>Closed-Date:    Tue Oct 3 20:46:43 PDT 2000
>Last-Modified:  Tue Oct 03 20:48:23 PDT 2000
>Originator:     Renaud Deraison
>Release:        3.0-RELEASE
>Organization:
>Environment:
FreeBSD prof.nain.org 3.0-RELEASE FreeBSD 3.0-RELEASE #0: Sat Oct 17 17:45:06 GMT 1998     jkh@kickme.freebsd.org:/usr/src/sys/compile/GENERIC  i386
>Description:
The dlopen() function will crash when opening stripped 
shared libraries which are linked against some other
shared librairies.
Linking shared libs against shared libs is a useful
way to make modules for an application.

gdb output :
#0  0x400048d0 in reloc_plt ()
(gdb) bt
#0  0x400048d0 in reloc_plt ()
#1  0x4000306b in find_symdef ()
#2  0x4000339d in dlopen ()

And the program dies with a signal 10 received.

>How-To-Repeat:
This is non-trivial. The easiest way is to download nessus-990201
(see http://www.nessus.org/download/unix.html for the locations)
to compile it, to install it, and to run the nessus daemon (nessusd)
which will happily crash when loading _some_ of those shared libs
(this is apparently random).
>Fix:
Do not use stripped out shared libraries with dlopen().
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->jdp 
Responsible-Changed-By: jdp 
Responsible-Changed-When: Thu Feb 11 09:13:56 PST 1999 
Responsible-Changed-Why:  
Thanks for the report.  I'll take a look. 
State-Changed-From-To: open->closed 
State-Changed-By: jdp 
State-Changed-When: Tue Oct 3 20:46:43 PDT 2000 
State-Changed-Why:  
I wasn't able to duplicate this problem, and the test case 
nessus-990201 is no longer available.  There are more up-to-date 
nessus ports in the FreeBSD ports collection which, as far as I 
know, work correctly.  If this problem can be duplicated in recent 
versions of FreeBSD I will be happy to re-open this PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=10009 
>Unformatted:
