Bug 141491 - DT_INITFIRST, DT_PREINIT_ARRAY are invisible to audit by r_debug.r_brk
DT_INITFIRST, DT_PREINIT_ARRAY are invisible to audit by r_debug.r_brk
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: glibc (Show other bugs)
3
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-12-01 11:24 EST by John Reiser
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-07-06 17:35:04 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description John Reiser 2004-12-01 11:24:09 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.2)
Gecko/20040308

Description of problem:
During module loading, functions specified in PT_DYNAMIC by
DT_INITFIRST and DT_PREINIT_ARRAY are called before r_debug.r_brk is
notified that a new module has been loaded.  [Functions specified by
DT_INIT and DT_INITARRAY are called after .r_brk has been told about
RT_ADD.]  This makes it difficult to debug and/or audit the
DT_INITFIRST and DT_PREINIT_ARRAY functions.  There should be new
RT_ADDFIRST and RT_ADDPRE values [analogous to RT_ADD], and
corresponding calls to r_debug.r_brk, so that an audit can see all
activity that results from loading a new module.

Version-Release number of selected component (if applicable):
glibc-2.3.3-74

How reproducible:
Always

Steps to Reproduce:
1.  Inspect code for _dl_init() in elf/dl-init.c
2.
3.
    

Actual Results:  Functions tagged with DT_INITFIRST and
DT_PREINIT_ARRAY are called before r_debug.r_brk is notified that a
new module has been loaded.

Expected Results:  r_debug.r_brk is notified before any instruction in
the newly-loaded modules is executed.  There should be distinguishable
notifications for DT_INITFIRST and DT_PREINIT_ARRAY, in contrast to
DT_INITARRAY.

Additional info:
Comment 2 Jakub Jelinek 2005-07-06 17:35:04 EDT
Rawhide glibc notifies the debugger far earlier.

Note You need to log in before you can comment on or make changes to this bug.