This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug dynamic-link/25157] New: Audit cookie for the dynamic loader is not initialized correctly


https://sourceware.org/bugzilla/show_bug.cgi?id=25157

            Bug ID: 25157
           Summary: Audit cookie for the dynamic loader is not initialized
                    correctly
           Product: glibc
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: dynamic-link
          Assignee: unassigned at sourceware dot org
          Reporter: fw at deneb dot enyo.de
  Target Milestone: ---

load_audit_module attempts to initialize the GL (dl_rtld_map).l_audit array,
but uses the unrelated audit function index cnt for that, not the slot index
for the audit module.

      /* Store the pointer.  */
      if (err_str == NULL && largs.result != NULL)
        {
          newp->fptr[cnt] = largs.result;

          /* The dynamic linker link map is statically allocated,
             initialize the data now.  */
          GL(dl_rtld_map).l_audit[cnt].cookie = (intptr_t) &GL(dl_rtld_map);
        }
      else
        newp->fptr[cnt] = NULL;
      ++cnt;

Found while trying to fix bug 25097, but not actually related to the l_audit
zero-length array. I think this is a bug present in the original
implementation. It was not introduced in the load_audit_module refactoring.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]