mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: Hijacking malloc called within musl libc
Date: Mon, 3 Jun 2019 16:18:59 -0400	[thread overview]
Message-ID: <20190603201859.GC1506@brightrain.aerifal.cx> (raw)
In-Reply-To: <CAKsLdYwQYZ0t1xooGy98FFF8LS9GHv3tHdsaZAanDze8x_5sng@mail.gmail.com>

On Mon, Jun 03, 2019 at 02:46:01PM -0400, sva sva wrote:
> I am in fact using version 1.1.19 and don't have the option to upgrade to
> 1.1.20. My config.mak file also contains the option -Bsymbolic-functions in
> the LDFLAGS_AUTO variable.

1.1.20 was the first version that supported malloc interposition, and
some related bugs were fixed in the next 1 or 2 versions. Just
removing -Bsymbolic-functions is not sufficient to make it safe.

Rich


> On Fri, May 31, 2019 at 9:34 AM Rich Felker <dalias@libc.org> wrote:
> 
> > On Fri, May 31, 2019 at 01:43:17PM +0200, Szabolcs Nagy wrote:
> > > * sva sva <azharivs@gmail.com> [2019-05-31 00:13:27 -0400]:
> > > > I am interposing all malloc/calloc/realloc/free/memalign but still the
> > > > realloc in scandir gets called from musl's libc. Does that make sense?
> > >
> > > no.
> > >
> > > it works for me as expected.
> > >
> > > you need to write down what you did, what you expected and what you got
> > instead.
> > > (how did you verify that the musl internal realloc gets called?
> > > it can be a bug in your interposer, in your static linker, in ...)
> >
> > It's almost certainly a matter of using a pre-1.1.20 version of musl,
> > or having an old config.mak from pre-1.1.20 musl (with
> > -Bsymbolic-functions) rather than re-running configure with the
> > current version.


      reply	other threads:[~2019-06-03 20:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-30 20:39 sva sva
2019-05-30 22:29 ` Szabolcs Nagy
2019-05-31  4:13   ` sva sva
2019-05-31 11:43     ` Szabolcs Nagy
2019-05-31 13:34       ` Rich Felker
2019-06-03 18:46         ` sva sva
2019-06-03 20:18           ` Rich Felker [this message]

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=20190603201859.GC1506@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=musl@lists.openwall.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).