]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
crypto: algif_hash - Require setkey before accept(2)
authorHerbert Xu <herbert@gondor.apana.org.au>
Fri, 8 Jan 2016 13:31:04 +0000 (21:31 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Feb 2016 20:31:03 +0000 (12:31 -0800)
commit017db8bc9a1d62710af99b0eec605ee1f0285277
treed2b5c62963d95106aaffb12a9761bd84d00de258
parentf2e274ce8bfe8ab928ab1968a82a3b7eec27a69b
crypto: algif_hash - Require setkey before accept(2)

commit 6de62f15b581f920ade22d758f4c338311c2f0d4 upstream.

Hash implementations that require a key may crash if you use
them without setting a key.  This patch adds the necessary checks
so that if you do attempt to use them without a key that we return
-ENOKEY instead of proceeding.

This patch also adds a compatibility path to support old applications
that do acept(2) before setkey.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
crypto/algif_hash.c