Skip to content

Commit b1a67a0

Browse files
herbertxgregkh
authored andcommitted
crypto: api - Disallow identical driver names
commit 27016f75f5ed47e2d8e0ca75a8ff1f40bc1a5e27 upstream. Disallow registration of two algorithms with identical driver names. Cc: <[email protected]> Reported-by: Ovidiu Panait <[email protected]> Signed-off-by: Herbert Xu <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent f36d200 commit b1a67a0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

crypto/algapi.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ __crypto_register_alg(struct crypto_alg *alg, struct list_head *algs_to_put)
341341
}
342342

343343
if (!strcmp(q->cra_driver_name, alg->cra_name) ||
344+
!strcmp(q->cra_driver_name, alg->cra_driver_name) ||
344345
!strcmp(q->cra_name, alg->cra_driver_name))
345346
goto err;
346347
}

0 commit comments

Comments
 (0)