3 ms·
That’s incredible. Is there any reason not to fix ldd to just fail if the program is using a different loader?
by School-Cotton 3y ago
That’s incredible. Is there any reason not to fix ldd to just fail if the program is using a different loader?
- raggi 3y agoDifferent than what loader?
- School-Cotton 3y agoThe GNU one.
- GuB-42 3y agoBecause you may want ldd to work when the program is using a different loader. Not all nonstandard loaders are malicious. If you want to avoid this risk, use something else, like readelf or lddtree.
- eek2121 3y agoThis attitude is why this issue exists in the first place.
- planede 3y agoldd's implementation relies on the assumption that the loader respects the LD_TRACE_LOADED_OBJECTS environment variable. Do all non-malicious loaders need to respect this environment variable and implement GNU ld.so's behavior?
- xelxebar 3y agoIf you take a look at the the ldd shell script, current versions no longer run the raw executable, always executing like the author's 3rd command example.