summaryrefslogtreecommitdiffstats
path: root/crypto/tcrypt.c
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2021-02-01 19:02:29 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2021-02-10 17:55:55 +1100
commite1b2d980f03b833442768c1987d5ad0b9a58cfe7 (patch)
treee881b7294b210236c2d198a729e1f8f0dd859613 /crypto/tcrypt.c
parente145f5565dc48ccaf4cb50b7cfc48777bed8c100 (diff)
downloadlinux-e1b2d980f03b833442768c1987d5ad0b9a58cfe7.tar.bz2
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/tcrypt.c')
0 files changed, 0 insertions, 0 deletions