diff options
author | Andrey Ryabinin <aryabinin@virtuozzo.com> | 2017-10-16 17:51:30 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2017-11-03 14:35:34 +0100 |
commit | 5dfeaac15f2b1abb5a53c9146041c7235eb9aa04 (patch) | |
tree | 340bac4bef4a1f3f132107acdac7fc61553b2bee /crypto | |
parent | crypto: x86/chacha20 - satisfy stack validation 2.0 (diff) | |
download | linux-5dfeaac15f2b1abb5a53c9146041c7235eb9aa04.tar.xz linux-5dfeaac15f2b1abb5a53c9146041c7235eb9aa04.zip |
crypto: x86/sha256-mb - fix panic due to unaligned access
struct sha256_ctx_mgr allocated in sha256_mb_mod_init() via kzalloc()
and later passed in sha256_mb_flusher_mgr_flush_avx2() function where
instructions vmovdqa used to access the struct. vmovdqa requires
16-bytes aligned argument, but nothing guarantees that struct
sha256_ctx_mgr will have that alignment. Unaligned vmovdqa will
generate GP fault.
Fix this by replacing vmovdqa with vmovdqu which doesn't have alignment
requirements.
Fixes: a377c6b1876e ("crypto: sha256-mb - submit/flush routines for AVX2")
Reported-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: <stable@vger.kernel.org>
Acked-by: Tim Chen
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
0 files changed, 0 insertions, 0 deletions