Re: [PATCH] lkdtm/usercopy: Expand size of "out of frame" object

From: Muhammad Usama Anjum
Date: Fri Feb 18 2022 - 05:30:46 EST



On 2/17/22 1:17 AM, Kees Cook wrote:
> To be sufficient out of range for the usercopy test to see the lifetime
> mismatch, expand the size of the "bad" buffer, which will let it be
> beyond current_stack_pointer regardless of stack growth direction.
> Paired with the recent addition of stack depth checking under
> CONFIG_HARDENED_USERCOPY=y, this will correctly start tripping again.
>
> Reported-by: Muhammad Usama Anjum <usama.anjum@xxxxxxxxxxxxx>
> Cc: Arnd Bergmann <arnd@xxxxxxxx>
> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Kees Cook <keescook@xxxxxxxxxxxx>
Reviewed-by: Muhammad Usama Anjum <usama.anjum@xxxxxxxxxxxxx>