Dear Spender,
first of all - thank you a lot for the really great job.
but could you please place Openwall feature back to the grsec patch ?
Thank you beforehand
Vovik
DMZ wrote:Does the openwall non-exec stack function in applications like java where PaX needs to be disabled, or does it silently fail? If it does function as expected, that alone is an undeniable case for enabling it as an additional layer of protection.
As an aside, any thoughts on the performance hit of enforcing a non-write policy beneath the current stack frame?
PaX Team wrote:what do you mean by 'function'? if you mean whether it can catch code execution attempts on the stack, then it certainly does work, just like PaX.
if you mean whether such attempts occur with java, then the answer is that 'i don't know' as i never tried it (all i know is that with PaX enabled it will be killed because of a code execution attempt in the data segment during some early initialization, so god knows what it would do later on the stack).
if the problem is that you and vovik would like to get a non-exec stack only feature (and leave the heap/etc executable) then it is possible to create with PaX as well, but we're not going to do it because it is against our design. if you or someone else wants to work on it, i can tell you where to look though.
why would you want to write protect the stack *below* the current frame? if you meant protecting the current frame (presumably to catch write attempts to the saved EIP and all the other goodies),
the answer is what Brad told you: big impact because every write attempt would enter the kernel (page fault) and the offending instruction would have to be analyzed and then emulated. a better approach (at least performance-wise) would be something similar to the DynamoRIO project which operates entirely in userland and has much less impact (although they don't do this kind of stack write checking).
DMZ wrote:If you look back over the USENIX archives, for example, you'll find yet more ideas for protecting the stack from this form attack - like encrypting the EIP using an XOR cookie. I wouldn't expect the speed to be anything other than glacial. Again, the point has already been covered, though.