Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That’s incredible. Is there any reason not to fix ldd to just fail if the program is using a different loader?



If 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.


Different than what loader?


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?




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: