Re: Stack size limit
* Kevin Chadwick:
> My research has led me to believe that limiting stack size is unfair to
> languages like Ada and Rust that prioritise security. Whilst there are a
> number of invalid reasons posted online for limiting it more than the heap.
> The real reason was limited virtual address space which is not an issue on
> 64-bit systems. The stack is also faster generally (the heap is useful for
> some data structures of course) and so discouraging it's use so heavily for
> programs without root seems sub optimal?
>
> Even if the kernel probably shouldn't. There might be an issue of the kernel
> expecting it to be limited even though it probably shouldn't. Does anyone
> know if that is true?
What prompts your concern? I don't think Debian sets a hard stack
limit.
Unlimited stack tends to trigger less-tested ASLR code paths and breaks
things. It's also not great from an overall system robustness
perspective because unbounded recursion seems to be more common than
rapid, unbounded allocation. So the current setting (lower limit by
default that can be increased if needed) seems reasonable.
Thanks,
Florian
Reply to: