[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#658278: ld.so segfaults on wrong input



severity 658278 wishlist
tags 658278 + moreinfo
quit

Goswin von Brederlow wrote:

> It has a different interpreter in its elf section. Ld.so could check
> that to determine wether the elf file is one it should care about.

A common use case is testing updated versions of ld.so by running
binaries explicitly using the ld.so binary.  I don't see how your
proposed enhancement is consistent with that.

> A segfault is never correct behaviour and needs to be fixed in ld.so.

If my program is built against one DSO and the caller uses LD_PRELOAD
or LD_LIBRARY_PATH to replace it with something completely different,
I'd expect segfaults from time to time (due to incompatible struct
layouts, for example).

However, maybe it is avoidable.  Often that kind of misconfiguration
gets caught by other checks, like the following:

	foo: symbol lookup error: foo: undefined symbol: some_symbol

Before veering too far in that direction, what is your use case?  Was
something broken by this?  Maybe there is a simpler way to accomplish
it.



Reply to: