From: Herbert Xu Date: Fri, 25 Dec 2015 07:40:05 +0000 (+0800) Subject: crypto: algif_skcipher - Require setkey before accept(2) X-Git-Tag: v3.2.77~20 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e249f66acd1096c07a64cf59b6add21b0edbc7f3;p=pandora-kernel.git crypto: algif_skcipher - Require setkey before accept(2) 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. Reported-by: Dmitry Vyukov Signed-off-by: Herbert Xu Tested-by: Dmitry Vyukov [bwh: Backported to 3.2: s/crypto_(alloc_|free_)?skcipher/crypto_\1ablkcipher/] Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed