3 ms·
Article recommends ldd without a word of warning that you must not run that on untrusted code. It could execute malign code. Not understanding that might lead u
by usr1106 3y ago
Article recommends ldd without a word of warning that you must not run that on untrusted code. It could execute malign code. Not understanding that might lead users who try to find out whether they should trust some binary to inspect it with ldd.
- funcDropShadow 3y agoIs there an alternative to list the dependencies, that doesn't have this risk?
- ferringb 3y agolook into `readelf` and `objdump -p`; those tools work via reading data rather than (effectively) executing the target. That 'execution' approach is why ldd is problematic; libraries can have init/finalizers (__init__ and __fini__ iirc).
- usr1106 3y agoSome discussion is at https://news.ycombinator.com/item?id=36839800 https://news.ycombinator.com/item?id=36839800 Sorry, I don't remember all the details.
- arbitrandomuser 3y agoWhat happens to io when ldd is run on a program ? Why doesn't a program that modifies a file not do the same when ldd is run on it ?