summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndrey Ryabinin <aryabinin@virtuozzo.com>2017-10-16 15:51:30 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-11-15 14:53:18 (GMT)
commit2822bbb53269eec5d2cc1b39c236ca5c5e20c59e (patch)
treedac4953a5842dd413624c8f3972170194d1d0a47 /lib
parentca6c028e2fe40488b28e7776f99a5d06f454a4a4 (diff)
downloadlinux-2822bbb53269eec5d2cc1b39c236ca5c5e20c59e.tar.xz
crypto: x86/sha256-mb - fix panic due to unaligned access
commit 5dfeaac15f2b1abb5a53c9146041c7235eb9aa04 upstream. 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> Acked-by: Tim Chen Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions