]> www.infradead.org Git - users/jedix/linux-maple.git/commit
Backport fix for crypto: algif_skcipher - Require setkey before accept(2)
authorHerbert Xu <herbert@gondor.apana.org.au>
Fri, 26 Feb 2016 11:44:08 +0000 (12:44 +0100)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 26 May 2016 22:44:52 +0000 (15:44 -0700)
commit59fdb27958fa2f4f69a15f562a3b6031aeb9db8b
treeafe0803896f2fc070bd867e8b5b0927aae507929
parent1998e8f0472a76e90034caa9be049e8142a0a470
Backport fix for crypto: algif_skcipher - Require setkey before accept(2)

Orabug: stable_rc4

commit dd504589577d8e8e70f51f997ad487a4cb6c026f upstream.

Some cipher implementations will crash if you try to use them
without calling setkey first.  This patch adds a check so that
the accept(2) call will fail with -ENOKEY if setkey hasn't been
done on the socket yet.

Cc: stable@vger.kernel.org
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Tested-by: Dmitry Vyukov <dvyukov@google.com>
[backported to 4.1 by Milan Broz <gmazyland@gmail.com>]

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
(cherry picked from commit 762330b161c49c6d88ab689a0ee2a1a959dc5b6b)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
crypto/algif_skcipher.c