crypto: algif_skcipher - Require setkey before accept(2)
authorHerbert Xu <herbert@gondor.apana.org.au>
Fri, 25 Dec 2015 07:40:05 +0000 (15:40 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 18 Jan 2016 10:16:07 +0000 (18:16 +0800)
commitdd504589577d8e8e70f51f997ad487a4cb6c026f
treeaee0252230997a1e6d2244b69f2f6494aeba3ced
parentc597b6bcd5c624534afc3df65cdc42bb05173bca
crypto: algif_skcipher - Require setkey before accept(2)

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>
crypto/algif_skcipher.c