summaryrefslogtreecommitdiffstats
path: root/crypto/af_alg.c
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2014-07-25 19:40:20 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2014-07-28 22:01:02 +0800
commitf960d2093f29f0bc4e1df1fcefb993455620c0b5 (patch)
tree3f30e4258e76c6fe1a0feabdb54372e9602b9a1b /crypto/af_alg.c
parente052dbf554610e2104c5a7518c4d8374bed701bb (diff)
downloadlinux-f960d2093f29f0bc4e1df1fcefb993455620c0b5.tar.gz
linux-f960d2093f29f0bc4e1df1fcefb993455620c0b5.tar.bz2
linux-f960d2093f29f0bc4e1df1fcefb993455620c0b5.zip
crypto: arm64-aes - fix encryption of unaligned data
cryptsetup fails on arm64 when using kernel encryption via AF_ALG socket. See https://bugzilla.redhat.com/show_bug.cgi?id=1122937 The bug is caused by incorrect handling of unaligned data in arch/arm64/crypto/aes-glue.c. Cryptsetup creates a buffer that is aligned on 8 bytes, but not on 16 bytes. It opens AF_ALG socket and uses the socket to encrypt data in the buffer. The arm64 crypto accelerator causes data corruption or crashes in the scatterwalk_pagedone. This patch fixes the bug by passing the residue bytes that were not processed as the last parameter to blkcipher_walk_done. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/af_alg.c')
0 files changed, 0 insertions, 0 deletions