]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
crypto: algif_aead - Require setkey before accept(2)
authorStephan Mueller <smueller@chronox.de>
Mon, 24 Apr 2017 09:15:23 +0000 (11:15 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 May 2017 12:49:43 +0000 (14:49 +0200)
commitb576fed7c831d4aeaf29029770066a8d69bef230
tree188d90b8013166af4d991249afb1ed7f050bc165
parent72a03cf8e35fbff333ecf2edaf33febd5d6fe60d
crypto: algif_aead - Require setkey before accept(2)

commit 2a2a251f110576b1d89efbd0662677d7e7db21a8 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.

Fixes: 400c40cf78da ("crypto: algif - add AEAD support")
Signed-off-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
crypto/algif_aead.c