]> git.hungrycats.org Git - linux/commit
crypto: authencesn - Fix digest_null crash
authorHerbert Xu <herbert@gondor.apana.org.au>
Mon, 17 Jul 2017 07:32:30 +0000 (15:32 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Aug 2017 02:19:39 +0000 (19:19 -0700)
commit2148e9ab0cac6fc4ef6a8eadd5e9fdba32255187
tree8a6c82439f999d5d31eba4fb5cff3e15b347008c
parentc4efb7434a2ac4dfc26568e09e9b8fe91160834b
crypto: authencesn - Fix digest_null crash

commit 41cdf7a45389e01991ee31e3301ed83cb3e3f7dc upstream.

When authencesn is used together with digest_null a crash will
occur on the decrypt path.  This is because normally we perform
a special setup to preserve the ESN, but this is skipped if there
is no authentication.  However, on the post-authentication path
it always expects the preservation to be in place, thus causing
a crash when digest_null is used.

This patch fixes this by also skipping the post-processing when
there is no authentication.

Fixes: 104880a6b470 ("crypto: authencesn - Convert to new AEAD...")
Reported-by: Jan Tluka <jtluka@redhat.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
crypto/authencesn.c