public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Stas Sergeev <stsp2@yandex.ru>
To: libc-alpha@sourceware.org
Cc: Stas Sergeev <stsp2@yandex.ru>
Subject: [PATCH 0/2] minimal run-time audit support
Date: Tue, 21 Feb 2023 20:33:05 +0500	[thread overview]
Message-ID: <20230221153307.548259-1-stsp2@yandex.ru> (raw)

This patch-set introduces the bare minimum functionality for working
with audit modules at run-time.

Patch1 fixes the check in dlmopen() which avoids loading solibs into
the auditing namespace. But RTLD_NOLOAD was forgotten to check, and
with that flags nothing gets loaded into auditing namespace, so dlmopen()
should succeed and return the handle for auditing object.

Patch2 adds dlload_audit_module() function and a test-case for it.

Stas Sergeev (2):
  elf/dl-open: fix audit wrt RTLD_NOLOAD [BZ #30127]
  dlfcn,elf: impl dlload_audit_module [BZ #30127]

 dlfcn/Makefile                                |   4 +-
 dlfcn/Versions                                |   3 +
 dlfcn/dlaudit.c                               |  62 ++++++++
 elf/Makefile                                  |   5 +
 elf/dl-audit.c                                |  46 +++---
 elf/dl-fini.c                                 |   2 +-
 elf/dl-load.c                                 |   4 +-
 elf/dl-object.c                               |   2 +-
 elf/dl-open.c                                 |   3 +-
 elf/dl-reloc.c                                |   4 +-
 elf/dl-runtime.c                              |   2 +-
 elf/dl-sym-post.h                             |   2 +-
 elf/do-rel.h                                  |   4 +-
 elf/rtld.c                                    |  44 ++++--
 elf/tst-loadaudit.c                           | 133 ++++++++++++++++++
 sysdeps/generic/ldsodefs.h                    |  11 +-
 sysdeps/mach/hurd/i386/libc.abilist           |   1 +
 sysdeps/unix/sysv/linux/aarch64/libc.abilist  |   1 +
 sysdeps/unix/sysv/linux/alpha/libc.abilist    |   1 +
 sysdeps/unix/sysv/linux/arc/libc.abilist      |   1 +
 sysdeps/unix/sysv/linux/arm/be/libc.abilist   |   1 +
 sysdeps/unix/sysv/linux/arm/le/libc.abilist   |   1 +
 sysdeps/unix/sysv/linux/csky/libc.abilist     |   1 +
 sysdeps/unix/sysv/linux/hppa/libc.abilist     |   1 +
 sysdeps/unix/sysv/linux/i386/libc.abilist     |   1 +
 sysdeps/unix/sysv/linux/ia64/libc.abilist     |   1 +
 .../sysv/linux/loongarch/lp64/libc.abilist    |   1 +
 .../sysv/linux/m68k/coldfire/libc.abilist     |   1 +
 .../unix/sysv/linux/m68k/m680x0/libc.abilist  |   1 +
 .../sysv/linux/microblaze/be/libc.abilist     |   1 +
 .../sysv/linux/microblaze/le/libc.abilist     |   1 +
 .../sysv/linux/mips/mips32/fpu/libc.abilist   |   1 +
 .../sysv/linux/mips/mips32/nofpu/libc.abilist |   1 +
 .../sysv/linux/mips/mips64/n32/libc.abilist   |   1 +
 .../sysv/linux/mips/mips64/n64/libc.abilist   |   1 +
 sysdeps/unix/sysv/linux/nios2/libc.abilist    |   1 +
 sysdeps/unix/sysv/linux/or1k/libc.abilist     |   1 +
 .../linux/powerpc/powerpc32/fpu/libc.abilist  |   1 +
 .../powerpc/powerpc32/nofpu/libc.abilist      |   1 +
 .../linux/powerpc/powerpc64/be/libc.abilist   |   1 +
 .../linux/powerpc/powerpc64/le/libc.abilist   |   1 +
 .../unix/sysv/linux/riscv/rv32/libc.abilist   |   1 +
 .../unix/sysv/linux/riscv/rv64/libc.abilist   |   1 +
 .../unix/sysv/linux/s390/s390-32/libc.abilist |   1 +
 .../unix/sysv/linux/s390/s390-64/libc.abilist |   1 +
 sysdeps/unix/sysv/linux/sh/be/libc.abilist    |   1 +
 sysdeps/unix/sysv/linux/sh/le/libc.abilist    |   1 +
 .../sysv/linux/sparc/sparc32/libc.abilist     |   1 +
 .../sysv/linux/sparc/sparc64/libc.abilist     |   1 +
 .../unix/sysv/linux/x86_64/64/libc.abilist    |   1 +
 .../unix/sysv/linux/x86_64/x32/libc.abilist   |   1 +
 51 files changed, 313 insertions(+), 53 deletions(-)
 create mode 100644 dlfcn/dlaudit.c
 create mode 100644 elf/tst-loadaudit.c

-- 
2.37.2


             reply	other threads:[~2023-02-21 15:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-21 15:33 Stas Sergeev [this message]
2023-02-21 15:33 ` [PATCH 1/2] elf/dl-open: fix audit wrt RTLD_NOLOAD [BZ #30127] Stas Sergeev
2023-02-21 15:33 ` [PATCH 2/2] dlfcn,elf: impl dlload_audit_module " Stas Sergeev

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=20230221153307.548259-1-stsp2@yandex.ru \
    --to=stsp2@yandex.ru \
    --cc=libc-alpha@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).