]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - crypto/sha3_generic.c
crypto: sha3-generic - fixes for alignment and big endian operation
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 19 Jan 2018 12:04:33 +0000 (12:04 +0000)
committerSeth Forshee <seth.forshee@canonical.com>
Sat, 3 Feb 2018 17:40:41 +0000 (18:40 +0100)
commitf7df26401d81dd6d95759ce9622fdd5c513fa4dd
tree6471faf438bc3ff02b072734bbf9fd62571ac8b6
parent15395803238ac9856193bd310b98f6aa1af58882
crypto: sha3-generic - fixes for alignment and big endian operation

BugLink: http://bugs.launchpad.net/bugs/1747169
commit c013cee99d5a18aec8c71fee8f5f41369cd12595 upstream.

Ensure that the input is byte swabbed before injecting it into the
SHA3 transform. Use the get_unaligned() accessor for this so that
we don't perform unaligned access inadvertently on architectures
that do not support that.

Fixes: 53964b9ee63b7075 ("crypto: sha3 - Add SHA-3 hash algorithm")
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
crypto/sha3_generic.c