4 ms·
I don't consider this "arbitrary code execution." To me, that implies that someone not logged into the system was able to exploit a vulnerability in an external
by scott_s 17y ago
I don't consider this "arbitrary code execution." To me, that implies that someone not logged into the system was able to exploit a vulnerability in an externally facing application.
In this case, the author assumes a login. That's like explaining how to break into someone's house and starting with "Okay, you're on the other side of someone's door. Now you can do what you want!" It just turns out that the semantics of ldd are to run the program. This is no more arbitrary code execution than tricking someone on Windows to run your program by saying "Download this file and double-click it."
- niyazpk 17y agoExactly my thought. The arbitrary code is executed only when the user tells to do so. This is not a bug, it is a feature. Computers are supposed to work like that. Raymond Chen observes: (link: http://blogs.msdn.com/oldnewthing/archive/2008/05/16/8510192.aspx http://blogs.msdn.com/oldnewthing/archive/2008/05/16/8510192...) It is not a security vulnerability that users with permission to shut down the computer can shut down the computer. This is another example of people getting excited that they were able to do something unusual. But just because you can do something unusual doesn’t mean that you’ve found a security vulnerability.
- scott_s 17y agoI thought of Raymond Chen, too! I Googled until I found the entry you found, but also this one (http://blogs.msdn.com/oldnewthing/archive/2006/05/08/592350.aspx http://blogs.msdn.com/oldnewthing/archive/2006/05/08/592350....), which has the observation: Code injection doesn't become a security hole until you have elevation of privilege. Chen's the one who originally made me realize the distinction between tricking someone into running a program, and an actual security vulnerability.
- deleted 17y ago[deleted]
- DannoHung 17y agoYeah, I'm real glad that the Unix permission scheme is actually worthless because of non user intended code execution in core utilities.
- ajross 17y agoI'm not sure that snark is warranted. This is a development tool. You use ldd when you're curious what libraries a binary links against; more or less by definition that's because you're planning to run said binary at some point in the future. The only path to a security vulnerability here is to fool the user into linking against untrusted binaries and libraries. But that's protected by the default link paths already. So you'd first have to fool them into setting their LD_LIBRARY_PATH properly, and then get the bad binary on the system. So how is this easier than just fooling them into opening a shell for you?
- viraptor 17y ago> The only path to a security vulnerability here is to fool the user into linking against untrusted binaries and libraries. Not quite. You fool someone into checking what libraries is your file linked against, which most people would assume - is a safe operation (just reading some info, right?) It doesn't need any lookup path modification, because rpath can be compiled into the binary itself. Basically you can prepare anything you need in your home directory. The only part that someone else has to do is to run `ldd your_file`. It's not only a development tool. It's also a sysadmin and packaging tool. Some parts of .deb and .rpm automation depend on that ldd (you don't have to use that, but it's nice when the dependencies are found automatically)
- ajross 17y agoI think we agree on the facts, just not the interpretation. Once more, it requires getting an untrusted binary into the target user's environment such that they can be fooled into running it. How is that different from any of the four million other ways of fooling users into running untrusted binaries?
- bajsejohannes 17y agoThe main difference between saying "Download this file and double-click it" and saying "run ldd on this file" is that it is surprising to at least the author (and me) that ldd does in fact execute code in that file.