Patch-ID# 106950-24
Keywords: security ld.so setuid dlclose memory leak register r_sparc_ua cpu99
Synopsis: SunOS 5.7: Linker Patch
Date: Oct/22/2003


Install Requirements: Additional instructions may be listed below                      
                      Install in Single User Mode                      
                      Reboot after installation                      
                      
Solaris Release: 7

SunOS Release: 5.7

Unbundled Product: 

Unbundled Release: 

Xref: This patch available for x86 as patch 106951

Topic: SunOS 5.7: Linker Patch

Relevant Architectures: sparc

BugId's fixed with this patch: 4040628 4077245 4103449 4159122 4165487 4173576 4174468 4176579 4179880 4187211 4188527 4188843 4194264 4204447 4205087 4210412 4213100 4214649 4215164 4215587 4219652 4225937 4234657 4235241 4235315 4238071 4239213 4243097 4248250 4248290 4250694 4254171 4255943 4256518 4267980 4270931 4287274 4289232 4291384 4292238 4295613 4297563 4300018 4300120 4303609 4306415 4309212 4310324 4310901 4311226 4312449 4313765 4316531 4318162 4321634 4322528 4322581 4324134 4324324 4324775 4327653 4329785 4334617 4335801 4336102 4336980 4338812 4340878 4341496 4343417 4343801 4344528 4346001 4346144 4346615 4349137 4349563 4351197 4352233 4352330 4354500 4356879 4357805 4358751 4358862 4366905 4367118 4367405 4368846 4369068 4371114 4372554 4377735 4377941 4381116 4381783 4385402 4390308 4393044 4394212 4394698 4401232 4401815 4402861 4404547 4413168 4413322 4418274 4421842 4429371 4432224 4433643 4446115 4446564 4447560 4448531 4450225 4450433 4453241 4453398 4455802 4460230 4461340 4461760 4461890 4462245 4462748 4465871 4467068 4468779 4469031 4469400 4469566 4469684 4470493 4475174 4475514 4481851 4482035 4485320 4491434 4492883 4496718 4496963 4497270 4499413 4503457 4503625 4503731 4503748 4503768 4504895 4505289 4506164 4510264 4513842 4515913 4516434 4518079 4518966 4519569 4521931 4522999 4523798 4524008 4524512 4524735 4524767 4526745 4526752 4529912 4532729 4533195 4546416 4587441 4619282 4620846 4621122 4621479 4622472 4624658 4630224 4633860 4638070 4642829 4651493 4651709 4654406 4655066 4662575 4664855 4668517 4669582 4671493 4696204 4698800 4701749 4706503 4707808 4710814 4714146 4715815 4716929 4728822 4730110 4730433 4731174 4731183 4733317 4733697 4735165 4736951 4739660 4743413 4744337 4744411 4745129 4745932 4746231 4753066 4754751 4755674 4765536 4766815 4770484 4770494 4772927 4774727 4775738 4778247 4778418 4779976 4783869 4787579 4790194 4793721 4802194 4804328 4806476 4811951 4811969 4816378 4817314 4824026 4825065 4825151 4825296 4826315 4830584 4830889 4831544 4831650 4834784 4838226 4845764 4845829 4865418 4868300 4870260 4872634 4900684 4906062

Changes incorporated in this version: 4461340 4504895 4698800 4714146 4715815 4728822 4730110 4731183 4744411 4745129 4753066 4765536 4766815 4770484 4770494 4775738 4778247 4778418 4779976 4783869 4787579 4790194 4793721 4802194 4804328 4806476 4811951 4811969 4816378 4817314 4824026 4825065 4825151 4825296 4826315 4830584 4830889 4831544 4831650 4834784 4838226 4845764 4845829 4865418 4868300 4870260 4872634 4900684 4906062

Patches accumulated and obsoleted by this patch: 

Patches which conflict with this patch: 

Patches required with this patch: 

Obsoleted by: 

Files included with this patch: 

/etc/lib/ld.so.1
/etc/lib/libdl.so.1
/usr/bin/crle
/usr/bin/ldd
/usr/bin/pvs
/usr/bin/sotruss
/usr/bin/sparcv9/pvs
/usr/bin/whocalls
/usr/ccs/bin/ar
/usr/ccs/bin/dump
/usr/ccs/bin/elfdump
/usr/ccs/bin/gprof
/usr/ccs/bin/ld
/usr/ccs/bin/lorder
/usr/ccs/bin/mcs
/usr/ccs/bin/nm
/usr/ccs/bin/size
/usr/ccs/bin/sparcv9/dump
/usr/ccs/bin/sparcv9/elfdump
/usr/ccs/bin/sparcv9/ld
/usr/ccs/bin/sparcv9/mcs
/usr/ccs/bin/sparcv9/nm
/usr/ccs/bin/sparcv9/size
/usr/ccs/bin/sparcv9/strip
/usr/ccs/bin/strip
/usr/demo/ELF/Makefile
/usr/demo/ELF/README
/usr/demo/ELF/acom.c
/usr/demo/ELF/dcom.c
/usr/demo/ELF/dispsyms.c
/usr/demo/ELF/pcom.c
/usr/demo/librtld_db/common/rdb.h
/usr/demo/librtld_db/sparc/rdb_mach.h
/usr/demo/librtld_db/sparcv9/rdb_mach.h
/usr/include/dlfcn.h
/usr/include/gelf.h
/usr/include/libelf.h
/usr/include/link.h
/usr/include/rtld_db.h
/usr/include/sys/auxv.h
/usr/include/sys/debug/debug.h
/usr/include/sys/elf.h
/usr/include/sys/elf_386.h
/usr/include/sys/elf_M32.h
/usr/include/sys/elf_SPARC.h
/usr/include/sys/elf_notes.h
/usr/include/sys/elftypes.h
/usr/include/sys/link.h
/usr/include/sys/machelf.h
/usr/include/sys/note.h
/usr/lib/0@0.so.1
/usr/lib/ld.so
/usr/lib/ld.so.1
/usr/lib/ld/map.bssalign
/usr/lib/ld/map.default
/usr/lib/ld/map.noexstk
/usr/lib/lddstub
/usr/lib/libcrle.so.1
/usr/lib/libdl.so
/usr/lib/libdl.so.1
/usr/lib/libelf.a
/usr/lib/libelf.so
/usr/lib/libelf.so.1
/usr/lib/libld.so.2
/usr/lib/libld.so.3
/usr/lib/liblddbg.so.4
/usr/lib/libldfeature.a
/usr/lib/libldstab.so.1
/usr/lib/librtld.so.1
/usr/lib/librtld_db.so
/usr/lib/librtld_db.so.1
/usr/lib/link_audit/32
/usr/lib/link_audit/64
/usr/lib/link_audit/ldprof.so.1
/usr/lib/link_audit/sparcv9/ldprof.so.1
/usr/lib/link_audit/sparcv9/truss.so.1
/usr/lib/link_audit/sparcv9/who.so.1
/usr/lib/link_audit/truss.so.1
/usr/lib/link_audit/who.so.1
/usr/lib/secure/32
/usr/lib/secure/64
/usr/lib/sparcv9/0@0.so.1
/usr/lib/sparcv9/ld.so.1
/usr/lib/sparcv9/lddstub
/usr/lib/sparcv9/libcrle.so.1
/usr/lib/sparcv9/libdl.so.1
/usr/lib/sparcv9/libelf.so.1
/usr/lib/sparcv9/libld.so.2
/usr/lib/sparcv9/libld.so.3
/usr/lib/sparcv9/liblddbg.so.4
/usr/lib/sparcv9/libldstab.so.1
/usr/lib/sparcv9/librtld.so.1
/usr/lib/sparcv9/librtld_db.so.1

Problem Description:

4730110 ld.so.1 list implementation could scale better
4728822 restrict the objects dlsym() searches.
4714146 crle: 64-bit secure pathname is incorrect.
4504895 dlclose() does not remove all objects
4698800 Wrong comments in /usr/lib/ld/sparcv9/map.*
4745129 dldump is inconsistent with .dynamic processing errors.
4753066 LD_SIGNAL isn't very useful in a threaded environment
4765536 crle: symbolic links can confuse alternative object configuration info
4766815 ld -r of object the TLS data fails
4770484 elfdump can not handle stripped archive file
4770494 The ld command gives improper error message handling broken archive file
4775738 overwriting output relocation table when 'ld -zignore' is used
4778247 elfdump -e of core files fails
4779976 elfdump dies on bad relocation entries
4787579 invalid SHT_GROUP entries can cause linker to seg fault
4783869 dlclose: filter closure exhibits hang/failure - introduced with 4504895
4778418 ld.so.1: there be nits out there
4461340 sgs: ugly build output while suppressing ia64 (64-bit) build on Intel
4790194 dlopen(..., RTLD_GROUP) has an odd interaction with interposition
4804328 auditing of threaded applications results in deadlock
4806476 building relocatable objects with SHF_EXCLUDE loses relocation information
4731183 compiler creates .tlsbss section instead of .tbss as documented
4816378 TLS: a tls test case dumps core with C and C++ compilers
4817314 TLS_GD relocations against local symbols do not reference symbol...
4811951 non-default symbol visibility overridden by definition in shared object
4802194 relocation error of mozilla built by K2 compiler
4715815 ld should allow linking with no output file (or /dev/null)
4793721 Need a way to null all code in ISV objects enabling ld performance tuning
4830584 mmap for the padding region doesn't get freed after dlclose
4831650 ld.so.1 can walk off the end of it's call_init() array...
4831544 ldd using .so modules compiled with FD7 compiler caused a core dump
4834784 Accessing members in a TLS structure causes a core dump in Oracle
4824026 segv when -z combreloc is used with -xlinkopt
4825296 typo in elfdump
4744411 Bloomberg wants a faster linker
4811969 64-bit links can be much slower than 32-bit
4825065 ld(1) should ignore consecutive empty sections.
4838226 unrelocated shared objects may be erroneously collected for init firing
4830889 TLS: testcase coredumps with -xarch=v9 and -g
4845764 filter removal can leave dangling filtee pointer
4826315 Link editors need to be pre- and post- Unified Process Model aware
4868300 interposing on direct bindings can fail
4900684 shared libraries with more then 32768 plt's fail for sparc ELF64
4870260 The elfdump command should produce more warning message on invalid move entries.
4865418 empty PT_TLS program headers cause problems in TLS enabled applications
4825151 compiler core dumped with a -mt -xF=%all test
4845829 The runtime linker fails to dlopen() long path name.
4906062 Makefiles under usr/src/cmd/sgs needs to be updated
 
(from 106950-23)
 
4872634 Large LD_PRELOAD values can cause SEGV of process
 
(from 106950-22)
 
4772927 strip core dumps on an archive library
4774727 direct-binding can fail against copy-reloc symbols
 
(from 106950-21)
 
4755674 Patch 109147-18 results in coredump.
4739660 Threads deadlock in schedlock and dynamic linker lock.
4743413 ld.so.1 doesn't terminate argv with NULL pointer when invoked directly
4746231 linker core-dumps when SECTION relocations are made against discarded sections
4730433 ld.so.1 wastes time repeatedly opening dependencies
4744337 missing RD_CONSISTENT event with dlmopen(LD_ID_NEWLM, ...)
4745932 strip utility doesn't strip out Dwarf2 debug sections
4754751 "strip" command doesn't remove comdat stabs sections.
 
(from 106950-20)
 
4736951 The mcs broken when the target file is an archive file
4731174 strip(1) does not fixup SHT_GROUP data
4733697 -zignore with gcc may exclude C++ exception sections
4733317 R_SPARC_*_HIX22 calculations are wrong with 32bit LD building ELF64 binaries
4735165 fatal linker error when compiling C++ programs with -xlinkopt
 
(from 106950-19)
 
4546416 add help messages to ld.so mdbmodule
4526752 we should build and ship ld.so's mdb module
4624658 update 386 TLS relocation values
4622472 LA_SYMB_DLSYM not set for la_symbind() invocations
4638070 ldd/ld.so.1 could aid in detecting unreferenced dependencies
4633860 Optimization for unused static global variables
4642829 ld.so.1 mprotect()'s text segment for weak relocations (it shouldn't)
4621479 'make' in $SRC/cmd/sgs/tools tries to install things in the proto area
4529912 purge ia64 source from sgs
4651709 dlopen(RTLD_NOLOAD) can disable lazy loading
4655066 crle: -u with nonexistent config file doesn't work
4654406 string tables created by the link-editor could be smaller...
4651493 RTLD_NOW can result in binding to an object prior to its init being run.
4662575 linker displacement relocation checking introduces significant linker overhead
4533195 ld interposes on malloc()/free() preventing support library from freeing memory
4630224 crle get's confused about memory layout of objects...
4664855 crle on application failed with ld.so.1 encountering mmap() returning ENOMEM err
4669582 latest dynamic linker causes libthread _init to get skipped
4671493 ld.so.1 inconsistently assigns PATHNAME() on primary objects
4668517 compile with map.bssalign doesn't copy _iob to bss
4701749 On Solaris 8 + 109147-16 ld crashes when building a dynamic library.
4707808 The ldd command is broken in the latest Solaris 8 linker patch.
4710814 add "official" support for the "symbolic" keyword in linker map-file
4716929 updating of local register symbols in dynamic symtab busted...
4706503 linkers need to cope with EF_SPARCV9_PSO/EF_SPARCV9_RMO
4696204 enable extended section indexes in relocatable objects
 
(from 106950-18)
 
4522999 Solaris linker one order of magnitude slower than GNU linker
4532729 tentative definition of TLS variable causes linker to dump core
4526745 fixup ld error message about duplicate dependencies/needed names
4518966 dldump undoes existing relocations with no thought of alignment or size.
4587441 Certain libraries have race conditions when setting error codes
4523798 linker option to align bss to large pagesize alignments.
4524008 ld can improperly set st_size of symbols named "_init" or "_fini"
4619282 ld cannot link a program with the option -sb
4620846 Perl Configure probing broken by ld changes
4621122 multiple ld '-zinitarray=' on a commandline fails
 
(from 106950-17)
 
4485320 ld needs to support more the 32768 PLTs
4291384 ld -M with a map file does not properly align Fortran REAL*8 data
4413322 SunOS 5.9 librtld_db doesn't show dlopened ".o" files anymore?
4429371 librtld_db busted on ia32 with SC6.x compilers...
4418274 elfdump dumps core on invalid input
4432224 libelf xlate routines are out of date
4433643 Memory leak using dlopen()/dlclose() in Solaris 8
4446564 ldd/lddstub - core dump conditions
4446115 translating SUNW_move sections is broken
4450225 The rdb command can fall into an infinite loop
4448531 Linker Causes Segmentation Fault
4453241 Regression in 4291384 can result in empty symbol table.
4453398 invalid runpath token can cause ld to spin.
4460230 ld (for OS 5.8 and 5.9) loses error message
4462245 ld.so.1 core dumps when executed directly...
4455802 need more flexibility in establishing a support library for ld
4467068 dyn_plt_entsize not properly initialized in ld.so.1
4468779 elf_plt_trace_write() broken on i386 (link-auditing)
4465871 -zld32 and -zld64 does not work the way it should
4461890 bad shared object created with -zredlocsym
4469400 ld.so.1: is_so_loaded isn't as efficient as we thought...
4469566 lazy loading fallback can reference un-relocated objects
4470493 libelf incorrectly translates NOTE sections across architectures...
4469684 rtld leaks dl_handles and permits on dlopen/dlclose
4475174 ld.so.1 prematurely reports the failure to load an object...
4475514 ld.so.1 can core dump in memory allocation fails (no swap)
4481851 Setting ld.so.1 environment variables globally would be useful
4482035 setting LD_PROFILE & LD_AUDIT causes ping command to issue warnings on 5.8
4377735 segment reservations cause sbrk() to fail
4491434 ld.so.1 can leak file-descriptors when loading same named objects
4289232 some of warning/error/debugging messages from libld.so can be revised
4462748 Linker Portion of TLS Support
4496718 run-time linkers mutex_locks not working with ld_libc interface
4497270 The -zredlocsym option should not eliminate partially initialized local symbols.
4496963 dumping an object with crle(1) that uses $ORIGIN can lose its dependencies
4499413 Sun linker orders of magnitude slower than gnu linker
4461760 lazy loading libXm and libXt can fail.
4469031 The partial initialized (local) symbols for intel platform is not working.
4492883 Add link-editor option to multi-pass archives to resolve unsatisfied symbols
4503731 linker-related commands misspell "argument"
4503768 whocalls(1) should output messages to stderr, not stdout
4503748 whocalls(1) usage message and manpage could be improved
4503625 nm should be taught about TLS symbols
4300120 segment address validation is too simplistic to handle segment reservations
4404547 krtld/reloc.h could have better error message, has typos
4270931 R_SPARC_HIX22 relocation is not handled properly
4516434 sotruss can not watch libc_psr.so.1
4213100 sotruss could use more flexible pattern matching
4503457 ld seg fault with comdat
4510264 sections with SHF_TLS can come in different orders...
4518079 link-editor support library unable to modify section header flags
4515913 ld.so.1 can incorrectly decrement external reference counts on dlclose()
4519569 ld -V does not return an interesting value...
4524512 ld.so.1 should allow alternate termination signals
4524767 elfdump dies on bogus sh_name fields...
4524735 ld getopt processing of '-' changed
4521931 subroutine in a shared object as LOCL instead of GLOB
 
(from 106950-16)
 
4505289 incorrect handling of _START_ and _END_
4506164 mcs does not recognize #linkbefore or #linkafter qualifiers
4447560 strip is creating unexecutable files...
4513842 library names not in ld.so string pool cause corefile bugs
 
(from 106950-15)
 
4450433 problem with liblddbg output on -Dsection,detail when processing SHF_LINK_ORDER
4421842 fixups in SHT_GROUP processing required...
4368846 ld(1) fails to version some interfaces given in a mapfile
4077245 dump core dump on null pointer.
4372554 elfdump should demangle symbols (like nm, dump)
4371114 dlclose may unmap a promiscuous object while it's still in use.
4204447 elfdump should understand SHN_AFTER/SHN_BEFORE macro
4377941 initialization of interposers may not occur
4381116 ldd/ld.so.1 could aid in detecting unused dependencies
4381783 dlopen/dlclose of a libCrun+libthread can dump core
4385402 linker & run-time linker must support gABI ELF updates
4394698 ld.so.1 does not process DF_SYMBOLIC - not gABI conforming
4394212 the link editor quietly ignores missing support libraries
4390308 ld.so.1 should provide more flexibility LD_PRELOAD'ing 32-bit/64-bit objects
4401232 crle(1) could provide better flexibility for alternatives
4401815 fix misc nits in debugging output...
4402861 cleanup /usr/demo/link_audit & /usr/tmp/librtld_db demo source code...
4393044 elfdump should allow raw dumping of sections
4413168 SHF_ORDERED bit causes linker to generate a separate section
 
(from 106950-14)
 
4369068 ld(1)'s weak symbol processing is inefficient (slow and doesn't scale).
4210412 versioning a static executable causes ld to core dump
4219652 Linker gives misleading error about not finding
4103449 ld command needs a command line flag to force 64-bits
4187211 problem with RDISP32 linking in copy-relocated objects
4287274 dladdr, dlinfo do not provide the full path name of a
4297563 dlclose still does not remove all objects
4250694 rtld_db needs a new auxvec entry
4235315 new features for rtld_db (DT_CHECKSUM, dynamic
4303609 64bit libelf.so.1 does not properly implement
4310901 su.static fails when OSNet build with lazy-loading
4310324 lf_errno() causes Bus Error(coredump) in 64-bit
4306415 ld core dump
4316531 BCP: possible failure with
4313765 LD_BREADTH should be shot
4318162 crle uses automatic strings in putenv.
4255943 Description of -t option incomplete.
4322528 sgs message test infrastructure needs improvement
4239213 Want an API to obtain linker's search path
4324134 use of extern mapfile directives can contribute unused
4322581 ELF data structures could be laid out more
4040628 Unnecessary section header symbols should be removed
4300018 rtld: bindlock should be freed before calling
4336102 dlclose with non-deletable objects can mishandle
4329785 mixing of SHT_SUNW_COMDAT & SHF_ORDERED causes ld to
4334617 COPY relocations should be produces for references to
4248250 relocation of local ABS symbols incorrect
4335801 For complimentary alignments eliminate ld: warning:
4336980 ld.so.1 relative path processing revisited
4243097 dlerror(3DL) is not affected by setlocale(3C).
4344528 dump should remove -D and -l usage message
4352330 LD_PRELOAD cannot use absolute path for privileged program
4346144 link-auditing: plt_tracing fails if LA_SYMB_NOPLTENTER given after being bound
4346001 The ld should support mapfile syntax to generate PT_SUNWSTACK segment
4349137 rtld_db: A third fallback method for locating the linkmap
4343417 dladdr interface information inadequate
4343801 RFE: crle(1): provide option for updating configuration files
4346615 ld.so.1 attempting to open a directory gives: No such device
4352233 crle should not honor umask
4357805 RFE: man page for ld(1) does not document all -z or -B options in Solaris 8 9/00
4358751 ld.so.1: LD_XXX environ variables and LD_FLAGS should be synchronized.
4358862 link-editors should reference "64" symlinks instead of sparcv9 (ia64).
4356879 PLTs could use faster code sequences in some cases
4367118 new fast baplt's fail when traversed twice in threaded application
4366905 Need a way to determine path to a shared library
4351197 nfs performance problem by 103627-13
4367405 LD_LIBRARY_PATH_64 not being used
4354500 SHF_ORDERED ordered sections does not properly sort sections
 
(from 106950-13)
 
4349563 auxiliary filter error handling regression introduced in 4165487
 
(from 106950-12)
 
4340878 rtld should treat $ORIGIN like LD_LIBRARY_PATH in security issues
4338812 crle(1) omits entries in the directory cache
4341496 RFE: provide a static version of /usr/bin/crle
 
(from 106950-11)
 
4324775 non-PIC code & -zcombreloc don't mix very well...
4327653 run-time linker should preload tables it will process (madvise)
4324324 shared object code can be referenced before .init has fired
4321634 .init firing of multiple INITFIRST objects can fail
 
(from 106950-10)
 
4311226 rejection of preloading in secure apps is inconsistent
4309212 dlsym can't find symbol
4312449 dlclose: invalid deletion of dependency can occur using RTLD_GLOBAL
 
(from 106950-09)
 
4292238 linking a library which has a static char ptr invokes mprotect() call
4295613 COMMON symbol resolution can be incorrect
 
(from 106950-08)
 
4256518 miscalculated calloc() during dlclose/tsorting can result in segv
4254171 DT_SPARC_REGISTER has invalid value associated with it.
4267980 INITFIRST flag of the shared object could be ignored.
 
(from 106950-07)
 
4248290 inetd dumps cpre upon bootup - failure in dlclose() logic
4238071 dlopen() leaks file descriptor under low memory condition
 
(from 106950-06)
 
4215587 using ld and the -r option on solaris 7 with compiler option -xarch=v9 causes link errors
4234657 103627-08 breaks purify 4.2 (plt padding should not be enabled for 32-bit)
4235241 dbx no longer gets dlclose notification.
4215164 shf_order flag handling is broken
4225937 i386 linker emits sparc specific warning messages
 
(from 106950-05)
 
4194264 Gprof segmentation fault with CPU99 code
 
(from 106950-04)
 
4214649 cyclic dependencies within tsorted inits can fail with lazy loading
4165487 lazy loading updates required
 
(from 106950-03)
 
4173576 Segmentation Fault on register-symbol declaration building a.out
4174468 scratch register symbol has multiple entries in .dynamic for same register
4179880 DT_RELASZ in .dynamic incorrectly calculated when .rela for reg-sym present
4188527 lorder output incorrect for v9 objects with global register ELF records
4188843 nm -p produces key letter of 13 for global register records
4205087 linker patch 103627-08 breaks viewpathing
 
(from 106950-02)
 
4159122 UNIX98:  dlclose() to invalid handle may dump core
 
(from 106950-01)
 
4176579 problem loading dynamically linked libraries with setuid root

Patch Installation Instructions:
--------------------------------
 
For Solaris 2.0-2.6 releases, refer to the Install.info file and/or
the README within the patch for instructions on using the generic
'installpatch' and 'backoutpatch' scripts provided with each patch.
 
For Solaris 7-9 releases, refer to the man pages for instructions
on using 'patchadd' and 'patchrm' scripts provided with Solaris.
Any other special or non-generic installation instructions should be
described below as special instructions.  The following example
installs a patch to a standalone machine:
 
       example# patchadd /var/spool/patch/104945-02
 
The following example removes a patch from a standalone system:
 
       example# patchrm 104945-02
 
For additional examples please see the appropriate man pages.

Special Install Instructions:
-----------------------------
Reboot system after patch installation.

README -- Last modified date:  Wednesday, October 22, 2003

