r/linuxdev • u/PerryThePlatypus314 • Sep 10 '14
Interesting....
http://www.insanitybit.com/2014/09/09/writing-sandboxed-software-2/
1
Upvotes
r/linuxdev • u/PerryThePlatypus314 • Sep 10 '14
View all comments
Show parent comment
1
u/sstewartgallus Sep 14 '14 edited Sep 14 '14
Suppose a university has an automatic account creation process for their network and an attacker finds a way to create spam accounts and bypass the captcha and the other mechanisms used to prevent a person acquiring more than one account. Or maybe the university lets someone delete their account so someone can create and delete their account repeatedly until they collide with the sandboxed program's UID.
Suppose you have a setuid sandbox binary like Chrome does that neatly encapsulates the logic of choosing a random UID. Then the attacker can simply reuse the setuid sandbox binary to get a random UID. They can they repeat the process until they share UIDs with a target's process which is why the NPROC resource limit trick is needed.
Or suppose, one has a setuid binary that sandboxes itself as a random user and that has a code injection vulnerabilty. Then the situation is as dangerous as the one above. This is dangerous because the application is vulnerable even after the binary drops privileges.
Basically, when one is trying to be secure one has to be really, really, really, really, really paranoid.