From dfb05aafccef771e115c9ff73a15d7758fa62d86 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Thu, 23 Jun 2016 18:06:02 +0800 Subject: [PATCH] Revert "crypto: user - no parsing of CRYPTO_MSG_GETALG" This patch commit eec66c9ce25d37339ed0c30091fa834b963b538a as it is only a workaround for the real bug and the proper fix has now been applied as 5a555e1c3e50d1b61b124446edcde293788afabe ("crypto: user - re-add size check for CRYPTO_MSG_GETALG"). Signed-off-by: Herbert Xu --- crypto/crypto_user.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/crypto/crypto_user.c b/crypto/crypto_user.c index f71960dea8822..43fe85f20d577 100644 --- a/crypto/crypto_user.c +++ b/crypto/crypto_user.c @@ -516,12 +516,10 @@ static int crypto_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh) return err; } - if (type != (CRYPTO_MSG_GETALG - CRYPTO_MSG_BASE)) { - err = nlmsg_parse(nlh, crypto_msg_min[type], attrs, - CRYPTOCFGA_MAX, crypto_policy); - if (err < 0) - return err; - } + err = nlmsg_parse(nlh, crypto_msg_min[type], attrs, CRYPTOCFGA_MAX, + crypto_policy); + if (err < 0) + return err; if (link->doit == NULL) return -EINVAL; -- 2.39.5