criu
criu copied to clipboard
restorer: allocate a stack guard page
An accidental overflow could corrupt the area located below a stack, so let's map an extra page there without read-write permissions.
I guess, there are still two issues I see:
-
bootstrap_len
is a continuous block so we might fail to find this large amount for restorer - may be worth to split it on multiple vmas (though, it may be not a problem on 64-bit systems). - Now the redzone is one page, but in the original failure, it was an array that has a couple of kilobytes size, which means 4Kb maybe not enough for structures used on restorer's stack.
Anyway, the patch seems good to me and is a nice start that may catch new issues.
With a minor nit, you can add my Reviewed-by: Dmitry Safonov <[email protected]>
or which way is now preferred :)
(I don't have a button that would mark PR as reviewed)
@avagin ping? :)
A friendly reminder that this PR had no activity for 30 days.