Re:Never run ldd on unknown executables
by umanwizard on Sunday July 23, 2023 @07:32PM
(#36841144)
That’s incredible. Is there any reason not to fix ldd to just fail if the program is using a different loader?
[ Parent
| on HN ]
Different than what loader?
Re:Never run ldd on unknown executables
by umanwizard on Sunday July 23, 2023 @08:04PM
(#36841385)
The GNU one.
Because 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.
This attitude is why this issue exists in the first place.
ldd'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?