mbox series

[0/4] Fixes for recursive dlopen (bug 31986)

Message ID cover.1723024001.git.fweimer@redhat.com
Headers show
Series Fixes for recursive dlopen (bug 31986) | expand

Message

Florian Weimer Aug. 7, 2024, 9:54 a.m. UTC
The already-open fast path was not quite correct in all cases.  State
management for _r_debug had issues as well and did not align well with
la_activity notification of auditors.

Tested on x86_64-linux-gnu.

Thanks,
Florian

Florian Weimer (4):
  elf: Remove struct dl_init_args from elf/dl-open.c
  elf: Run constructors on cyclic recursive dlopen (bug 31986)
  elf: Signal LA_ACT_CONSISTENT to auditors after RT_CONSISTENT switch
  elf: Signal RT_CONSISTENT after relocation processing in dlopen (bug
    31986)

 elf/Makefile                       |  12 ++++
 elf/dl-close.c                     |  10 +--
 elf/dl-open.c                      |  71 ++++++++++----------
 elf/dl-support.c                   |   1 +
 elf/rtld.c                         |   6 +-
 elf/tst-dlopen-auditdup-auditmod.c | 100 +++++++++++++++++++++++++++++
 elf/tst-dlopen-auditdup.c          |  36 +++++++++++
 elf/tst-dlopen-auditdupmod.c       |  48 ++++++++++++++
 elf/tst-dlopen-recurse.c           |  34 ++++++++++
 elf/tst-dlopen-recursemod1.c       |  50 +++++++++++++++
 elf/tst-dlopen-recursemod2.c       |  66 +++++++++++++++++++
 11 files changed, 389 insertions(+), 45 deletions(-)
 create mode 100644 elf/tst-dlopen-auditdup-auditmod.c
 create mode 100644 elf/tst-dlopen-auditdup.c
 create mode 100644 elf/tst-dlopen-auditdupmod.c
 create mode 100644 elf/tst-dlopen-recurse.c
 create mode 100644 elf/tst-dlopen-recursemod1.c
 create mode 100644 elf/tst-dlopen-recursemod2.c


base-commit: d7eca2714f0da98894baa15e4c4735297ecd738d