public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "adhemerval.zanella at linaro dot org" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug dynamic-link/30186] RTLD_DEEPBIND interacts badly with LD_PRELOAD
Date: Wed, 22 Mar 2023 16:25:09 +0000	[thread overview]
Message-ID: <bug-30186-131-8OmTAB2QqM@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-30186-131@http.sourceware.org/bugzilla/>

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

--- Comment #11 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
(In reply to Siddhesh Poyarekar from comment #10)
> We just removed hooks recently because they're a common exploit primitive,
> lets not go back in the direction of adding global function pointers again.

A weak reference generates a GOTPCREL relocation, and with relro should no be
subject to same issues of malloc hook (it is either reallocated at loading, or
kept null during process execution).

> 
> The core issue here is the ordering of RTLD_DEEPBIND vs LD_PRELOAD and IMO
> the fact that LD_PRELOAD doesn't win is something that should be fixed.  I
> think it always should win but there may be reasons to have RTLD_DEEPBIND
> win that I'm unaware of.  Lets discuss fixing that ordering issue instead on
> the libc-alpha mailing list.

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

  parent reply	other threads:[~2023-03-22 16:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-01 11:33 [Bug dynamic-link/30186] New: " parky at outlook dot com
2023-03-01 11:33 ` [Bug dynamic-link/30186] " parky at outlook dot com
2023-03-06 16:17 ` adhemerval.zanella at linaro dot org
2023-03-06 16:54 ` siddhesh at sourceware dot org
2023-03-08 20:41 ` parky at outlook dot com
2023-03-10 19:20 ` adhemerval.zanella at linaro dot org
2023-03-11 11:15 ` parky at outlook dot com
2023-03-13 11:52 ` parky at outlook dot com
2023-03-22 10:52 ` parky at outlook dot com
2023-03-22 11:39 ` adhemerval.zanella at linaro dot org
2023-03-22 11:48 ` parky at outlook dot com
2023-03-22 11:57 ` adhemerval.zanella at linaro dot org
2023-03-22 15:45 ` siddhesh at sourceware dot org
2023-03-22 16:25 ` adhemerval.zanella at linaro dot org [this message]
2023-03-22 16:25 ` adhemerval.zanella at linaro dot org
2023-03-22 16:57 ` siddhesh at sourceware dot org

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-30186-131-8OmTAB2QqM@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).