|
Message-ID: <CAKsLdYyB+xeLF42O010cE6VQEWtcLPhuWRj4_mY4dJ4Vn699ZQ@mail.gmail.com>
Date: Thu, 30 May 2019 16:39:48 -0400
From: sva sva <azharivs@...il.com>
To: musl@...ts.openwall.com
Subject: Hijacking malloc called within musl libc
I am LD_PRELOADing an application my own malloc which eventually calls the
libc malloc. Everything is fine until the code hits malloc which is called
from musl's own libc which doesn't get overloaded. I want those to be
overloaded as well.
More specifically this is the part of libc for scandir code at
src/dirent/scandir.c:
tmp = realloc(names, len * sizeof *names);
I checked how this works for glibc, and apparently they use
__libc_malloc/etc. internally and have malloc as a weak alias for that
which is used every where including the rest of the standard library.
However in musl, there is no such thing as a weak alias defined for
malloc/etc.
I am kind of stuck here so would appreciate some help.
Thanks
Vahid
Content of type "text/html" skipped
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.