mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
libseckey: Fix length check in sk_cca_get_public_from_rsa_key()
Check for the size of struct cca_rsa_pub_key_section, instead of struct cca_ec_pub_key_section. Assisted-by: IBM Bob:2.0.0 Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com> Reviewed-by: Finn Callies <fcallies@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
cf51aa1421
commit
5ab3473442
@@ -1394,7 +1394,7 @@ static int sk_cca_get_public_from_rsa_key(const unsigned char *key_token,
|
||||
return -EINVAL;
|
||||
}
|
||||
if (rsa_pub_section->section_header.section_length <
|
||||
sizeof(struct cca_ec_pub_key_section)) {
|
||||
sizeof(struct cca_rsa_pub_key_section)) {
|
||||
sk_debug(debug, "ERROR: invalid RSA public key section length");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user