summaryrefslogtreecommitdiff
path: root/arch/x86/crypto/aegis256-aesni-glue.c
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2019-02-01 10:51:40 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2019-02-08 10:30:08 +0300
commit3af349639597fea582a93604734d717e59a0e223 (patch)
treee14fbe662623df11569aa43b5a3db8b80e89b678 /arch/x86/crypto/aegis256-aesni-glue.c
parent2060e284e9595fc3baed6e035903c05b93266555 (diff)
downloadlinux-3af349639597fea582a93604734d717e59a0e223.tar.xz
crypto: x86/aesni-gcm - fix crash on empty plaintext
gcmaes_crypt_by_sg() dereferences the NULL pointer returned by scatterwalk_ffwd() when encrypting an empty plaintext and the source scatterlist ends immediately after the associated data. Fix it by only fast-forwarding to the src/dst data scatterlists if the data length is nonzero. This bug is reproduced by the "rfc4543(gcm(aes))" test vectors when run with the new AEAD test manager. Fixes: e845520707f8 ("crypto: aesni - Update aesni-intel_glue to use scatter/gather") Cc: <stable@vger.kernel.org> # v4.17+ Cc: Dave Watson <davejwatson@fb.com> Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'arch/x86/crypto/aegis256-aesni-glue.c')
0 files changed, 0 insertions, 0 deletions