summaryrefslogtreecommitdiffstats
path: root/crypto/ahash.c
diff options
context:
space:
mode:
authorEric Biggers2019-02-01 08:51:40 +0100
committerHerbert Xu2019-02-08 08:30:08 +0100
commit3af349639597fea582a93604734d717e59a0e223 (patch)
treee14fbe662623df11569aa43b5a3db8b80e89b678 /crypto/ahash.c
parentcrypto: x86/morus - fix handling chunked inputs and MAY_SLEEP (diff)
downloadkernel-qcow2-linux-3af349639597fea582a93604734d717e59a0e223.tar.gz
kernel-qcow2-linux-3af349639597fea582a93604734d717e59a0e223.tar.xz
kernel-qcow2-linux-3af349639597fea582a93604734d717e59a0e223.zip
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 'crypto/ahash.c')
0 files changed, 0 insertions, 0 deletions