[Devel] [PATCH RHEL7 COMMIT] ms/crypto: user - Allow get request with empty driver name

Konstantin Khorenko khorenko at virtuozzo.com
Thu Jun 15 20:06:08 MSK 2023


The commit is pushed to "branch-rh7-3.10.0-1160.90.1.vz7.200.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-1160.90.1.vz7.200.1
------>
commit 2682a36707e55f7819472f7fda7f29e5eb8a8434
Author: Herbert Xu <herbert at gondor.apana.org.au>
Date:   Thu Nov 20 12:44:32 2014 +0800

    ms/crypto: user - Allow get request with empty driver name
    
    Currently all get requests with an empty driver name fail with
    EINVAL.  Since most users actually want to supply an empty driver
    name this patch removes this check.
    
    Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
    
    https://jira.vzint.dev/browse/PSBM-147375
    
    (cherry picked from ms commit 5d4a5e770d97d87082067886e7097c920b338da5)
    Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
 crypto/crypto_user.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/crypto/crypto_user.c b/crypto/crypto_user.c
index 1591d052db3f..942820294ea4 100644
--- a/crypto/crypto_user.c
+++ b/crypto/crypto_user.c
@@ -264,10 +264,7 @@ static int crypto_report(struct sk_buff *in_skb, struct nlmsghdr *in_nlh,
 	if (!null_terminated(p->cru_name) || !null_terminated(p->cru_driver_name))
 		return -EINVAL;
 
-	if (!p->cru_driver_name[0])
-		return -EINVAL;
-
-	alg = crypto_alg_match(p, 1);
+	alg = crypto_alg_match(p, 0);
 	if (!alg)
 		return -ENOENT;
 


More information about the Devel mailing list