public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "fweimer at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug dynamic-link/26076] New: dlclose crashes when cleaning up an empty namespace after dlmopen failure
Date: Wed, 03 Jun 2020 11:43:53 +0000	[thread overview]
Message-ID: <bug-26076-131@http.sourceware.org/bugzilla/> (raw)

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

            Bug ID: 26076
           Summary: dlclose crashes when cleaning up an empty namespace
                    after dlmopen failure
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: minor
          Priority: P2
         Component: dynamic-link
          Assignee: unassigned at sourceware dot org
          Reporter: fweimer at redhat dot com
  Target Milestone: ---
             Flags: security-

If nothing has been loaded, ns->_ns_loaded is NULL and head->l_auditing
attempts to dereference a NULL pointer:

#ifdef SHARED
  /* Auditing checkpoint: we have deleted all objects.  */
  if (__glibc_unlikely (do_audit))
    {
      struct link_map *head = ns->_ns_loaded;
      /* Do not call the functions for any auditing object.  */
      if (head->l_auditing == 0)
        {
          struct audit_ifaces *afct = GLRO(dl_audit);
          for (unsigned int cnt = 0; cnt < GLRO(dl_naudit); ++cnt)
            {
              if (afct->activity != NULL)
                {
                  struct auditstate *state = link_map_audit_state (head, cnt);
                  afct->activity (&state->cookie, LA_ACT_CONSISTENT);
                }

              afct = afct->next;
            }
        }
    }
#endif

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

             reply	other threads:[~2020-06-03 11:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-03 11:43 fweimer at redhat dot com [this message]
2020-06-04 12:50 ` [Bug dynamic-link/26076] dlmopen crashes when cleaning up an empty namespace in audit mode fweimer at redhat dot com
2020-06-04 12:52 ` [Bug dynamic-link/26076] dlmopen crashes after failing to load dependencies " fweimer at redhat dot com
2020-06-04 16:20 ` fweimer at redhat dot com
2020-07-07  8:12 ` fweimer at redhat dot com
2020-07-07  8:12 ` fweimer at redhat dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-26076-131@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).