KEYS: checking the input id parameters before finding asymmetric key
Subsystems (3)
PATCH 1/1 KEYS: checking the input id parameters before finding asymmetric key
For finding asymmetric key, the input id_0 and id_1 parameters can not be NULL at the same time. This patch adds the BUG_ON checking for id_0 and id_1.
Cc David Howells <[email protected]>
Cc Herbert Xu <[email protected]>
Cc "David S. Miller" <[email protected]>
Signed-off-by "Lee, Chun-Yi" <[email protected]>
--- crypto/asymmetric_keys/asymmetric_type.c | 2 ++ 1 file changed, 2 insertions(+)
crypto/asymmetric_keys/asymmetric_type.c +2 -0
@@ -57,6 +57,8 @@ struct key *find_asymmetric_key(struct key *keyring,char *req, *p;int len; +BUG_ON (!id_0 && !id_1); +if (id_0) { lookup = id_0->data; len = id_0->len;
Signature · 1 line
2.10.2