This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to detect symbol interposition?


On 06/29/2016 04:31 AM, Mike Frysinger wrote:
On 28 Jun 2016 20:01, Florian Weimer wrote:
On 06/28/2016 07:56 PM, Mike Frysinger wrote:
On 28 Jun 2016 16:12, Florian Weimer wrote:
I need a way to detect symbol interposition from within libc.

why ?

I want to add a hardened variant of getline which uses
malloc_usable_size to check chunk size and specified size for consistency.

just getline ?  or that's just where you want to start ?

getdelim too. But there are few interfaces which take a pointer/size pair, and which must be called in such a way that the pointer, if it is not null, must point to the beginning of a heap allocation.

i guess this kind of tails into the other discussion about how we don't
document interposing memory symbols and how today, you can't just replace
a single one and have it work.  and how sometimes you can get away with
just a few, but in reality if you don't do them all, bad things happen.

It's not just about documentation, existing mallocs out there are inconsistent today, so we need to cope somehow.

Thanks,
Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]