]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/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)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Tue, 22 Aug 2017 09:57:58 +0000 (06:57 -0300)
commitce6a971cfbecc65dfe1eef56d9d3bc0291f88458
tree2f5640f5f7c25fe8e597ca0f7b0a7fce4d1f0b15
parente36ef9fd00b651cf742403392d98bbe982adba81
crypto: authencesn - Fix digest_null crash

BugLink: http://bugs.launchpad.net/bugs/1710646
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>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
crypto/authencesn.c