diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2021-02-01 19:02:29 +0100 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2021-02-10 17:55:55 +1100 |
commit | 60ae6bc1b450d397c55fe43a6298ba3b0a168179 (patch) | |
tree | d4acdd517c0c3f2fb3f19c97cb7ddd1c4de09c93 /crypto/async_tx/async_tx.c | |
parent | d97862e8624c3ff840c64ab1f1a7c619995d9b72 (diff) | |
download | linux-crypto-60ae6bc1b450d397c55fe43a6298ba3b0a168179.tar.gz linux-crypto-60ae6bc1b450d397c55fe43a6298ba3b0a168179.zip |
crypto: michael_mic - fix broken misalignment handling
The Michael MIC driver uses the cra_alignmask to ensure that pointers
presented to its update and finup/final methods are 32-bit aligned.
However, due to the way the shash API works, this is no guarantee that
the 32-bit reads occurring in the update method are also aligned, as the
size of the buffer presented to update may be of uneven length. For
instance, an update() of 3 bytes followed by a misaligned update() of 4
or more bytes will result in a misaligned access using an accessor that
is not suitable for this.
On most architectures, this does not matter, and so setting the
cra_alignmask is pointless. On architectures where this does matter,
setting the cra_alignmask does not actually solve the problem.
So let's get rid of the cra_alignmask, and use unaligned accessors
instead, where appropriate.
Cc: <stable@vger.kernel.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/async_tx/async_tx.c')
0 files changed, 0 insertions, 0 deletions