logoalt Hacker News

avadodintoday at 10:20 AM1 replyview on HN

Thank you for the context. But still.

You have a desirable performance optimization feature —used in every Linux program— that happens to interfere with a lousy exploit mitigation.

No one should ever need more than 64kBs for a stack anyways.


Replies

Joker_vDtoday at 10:49 AM

> No one should ever need more than 64kBs for a stack anyways.

Well, if people would stop storing anything except than return addresses on the stack, yeah, probably even 32 KiB of stack would be enough for anyone. It'd also single-handedly stop all kinds of stack-smashing attacks, too: can't overwrite a return address on the stack if nothing stores data on the stack except the CALL/RET instructions.

Unfortunately, the current zeitgeist is still to have "writeable stacks" which are only moderately less horrible for the security than "executable stacks".

show 1 reply