public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug dynamic-link/28062] New: Suppress audit calls when a (new) namespace is empty
@ 2021-07-07 13:29 adhemerval.zanella at linaro dot org
  2021-07-07 13:29 ` [Bug dynamic-link/28062] " adhemerval.zanella at linaro dot org
  2021-11-18 20:18 ` adhemerval.zanella at linaro dot org
  0 siblings, 2 replies; 3+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2021-07-07 13:29 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 28062
           Summary: Suppress audit calls when a (new) namespace is empty
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: dynamic-link
          Assignee: unassigned at sourceware dot org
          Reporter: adhemerval.zanella at linaro dot org
  Target Milestone: ---

For a new Lmid_t the namespace link_map list are empty, so it requires to check
if before using it. This can happen for when audit module is used along with
dlmopen:

$ cat auditor.c 
#define _GNU_SOURCE
#include <link.h>

unsigned int
la_version (unsigned int version)
{
  return LAV_CURRENT;
}

char *
la_objsearch (const char *name, uintptr_t *cookie, unsigned int flag)
{
  return (char *) name;
}

void
la_activity (uintptr_t *cookie, unsigned int flag)
{
}
$ cat foo.c 
int foo (void)
{
  return 1;
}
$ cat main.c 
#define _GNU_SOURCE
#include <assert.h>
#include <dlfcn.h>
#include <stddef.h>

int main (int argc, char *argv[])
{
  void *h = dlmopen (LM_ID_NEWLM, "libfoo.so", RTLD_NOW);
  assert (h != NULL);
  return 0;
}
$ gcc main.c -o main -ldl
$ gcc -fpic -shared foo.c -o libfoo.so
$ gcc -fpic -shared auditor.c -o auditor.so
$ LD_AUDIT=./auditor.so LD_LIBRARY_PATH=. ./main 
Segmentation fault (core dumped)

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug dynamic-link/28062] Suppress audit calls when a (new) namespace is empty
  2021-07-07 13:29 [Bug dynamic-link/28062] New: Suppress audit calls when a (new) namespace is empty adhemerval.zanella at linaro dot org
@ 2021-07-07 13:29 ` adhemerval.zanella at linaro dot org
  2021-11-18 20:18 ` adhemerval.zanella at linaro dot org
  1 sibling, 0 replies; 3+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2021-07-07 13:29 UTC (permalink / raw)
  To: glibc-bugs

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

Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at sourceware dot org   |adhemerval.zanella at linaro dot o
                   |                            |rg

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug dynamic-link/28062] Suppress audit calls when a (new) namespace is empty
  2021-07-07 13:29 [Bug dynamic-link/28062] New: Suppress audit calls when a (new) namespace is empty adhemerval.zanella at linaro dot org
  2021-07-07 13:29 ` [Bug dynamic-link/28062] " adhemerval.zanella at linaro dot org
@ 2021-11-18 20:18 ` adhemerval.zanella at linaro dot org
  1 sibling, 0 replies; 3+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2021-11-18 20:18 UTC (permalink / raw)
  To: glibc-bugs

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

Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
   Target Milestone|---                         |2.35
             Status|NEW                         |RESOLVED

--- Comment #1 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
Fixed on 2.35.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-11-18 20:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-07 13:29 [Bug dynamic-link/28062] New: Suppress audit calls when a (new) namespace is empty adhemerval.zanella at linaro dot org
2021-07-07 13:29 ` [Bug dynamic-link/28062] " adhemerval.zanella at linaro dot org
2021-11-18 20:18 ` adhemerval.zanella at linaro dot org

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).