Re: [PATCH v2] crypto/ecc: Actually remove stack VLA usage

From: Herbert Xu
Date: Fri Apr 20 2018 - 12:50:27 EST

On Fri, Mar 30, 2018 at 09:55:44AM -0700, Kees Cook wrote:
> On the quest to remove all VLAs from the kernel[1], this avoids VLAs
> by just using the maximum allocation size (4 bytes) for stack arrays.
> All the VLAs in ecc were either 3 or 4 bytes (or a multiple), so just
> make it 4 bytes all the time. Initialization routines are adjusted to
> check that ndigits does not end up larger than the arrays.
> This includes a removal of the earlier attempt at this fix from
> commit a963834b4742 ("crypto/ecc: Remove stack VLA usage")
> [1]
> Signed-off-by: Kees Cook <keescook@xxxxxxxxxxxx>

Patch applied. Thanks.
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page:
PGP Key: