Re: [PATCH v3] crypto: x86/polyval - Fix crashes when keys are not 16-byte aligned

Eric Biggers
2022-10-18T23:13:07Z

On Tue, Oct 18, 2022 at 04:04:12PM -0700, Nathan Huckleberry wrote:
> crypto_tfm::__crt_ctx is not guaranteed to be 16-byte aligned on x86-64.
> This causes crashes due to movaps instructions in clmul_polyval_update.
>
> Add logic to align polyval_tfm_ctx to 16 bytes.
>
> Fixes: 34f7f6c30112 ("crypto: x86/polyval - Add PCLMULQDQ accelerated implementation of POLYVAL")
> Reported-by: Bruno Goncalves <bgoncalv@redhat.com>
> Signed-off-by: Nathan Huckleberry <nhuck@google.com>

Reviewed-by: Eric Biggers <ebiggers@google.com>

Please add 'Cc: stable@vger.kernel.org' as well. (Herbert can do it when
applying this patch, if you don't happen to send another version.)

- Eric