summaryrefslogtreecommitdiffstats
path: root/virt
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2020-11-24 11:47:19 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-12-30 11:51:35 +0100
commit36a58bda87cd2aec692721a6e1398cf34680de48 (patch)
tree3e66d49820f829f7b648bfcd268a6b7ab9e9d688 /virt
parentf26f0e7770a15f80f10e0e35486e1cc038e0d88b (diff)
downloadlinux-stable-36a58bda87cd2aec692721a6e1398cf34680de48.tar.gz
linux-stable-36a58bda87cd2aec692721a6e1398cf34680de48.tar.bz2
linux-stable-36a58bda87cd2aec692721a6e1398cf34680de48.zip
crypto: ecdh - avoid unaligned accesses in ecdh_set_secret()
commit 17858b140bf49961b71d4e73f1c3ea9bc8e7dda0 upstream. ecdh_set_secret() casts a void* pointer to a const u64* in order to feed it into ecc_is_key_valid(). This is not generally permitted by the C standard, and leads to actual misalignment faults on ARMv6 cores. In some cases, these are fixed up in software, but this still leads to performance hits that are entirely avoidable. So let's copy the key into the ctx buffer first, which we will do anyway in the common case, and which guarantees correct alignment. Cc: <stable@vger.kernel.org> Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'virt')
0 files changed, 0 insertions, 0 deletions