-
Notifications
You must be signed in to change notification settings - Fork 19
[noup] zephyr: crypto: fix coverity issue #87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[noup] zephyr: crypto: fix coverity issue #87
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes are good. There seems to be two separate issues here, could you split the commit to two pieces and resubmit the PR?
This also needs a manifest update in zephyr side so that this fix is taken into use, please create a PR in zephyr which updates west.yml file. |
0c16dc6
to
de2aff1
Compare
@@ -2650,6 +2650,7 @@ struct wpabuf *crypto_ec_key_get_subject_public_key(struct crypto_ec_key *key) | |||
/* algorithm AlgorithmIdentifier */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and the other
[noup] zephyr: crypto: Fix coverity issue when getting public/private key
de2aff1
to
b423a92
Compare
b423a92
to
2d8f54f
Compare
Fix INTEGER_OVERFLOW coverity issue. crypto_ecdh_set_peerkey: The decrement operator on the unsigned variable len might result in an underflow. Check value of the unsigned variable len before decrement. Signed-off-by: Qingling Wu <qingling.wu@nxp.com>
… key Fix INTEGER_OVERFLOW coverity issue. crypto_ec_key_get_subject_public_key/crypto_ec_key_get_ecprivate_key: tainted_data_return: Called function mbedtls_asn1_write_len, and a possible return value is known to be less than zero. overflow: The expression len is considered to have possibly overflowed. Check return value of mbedtls_asn1_write_len and mbedtls_asn1_write_tag, if less than zero, return NULL. Signed-off-by: Qingling Wu <qingling.wu@nxp.com>
2d8f54f
to
8c816c4
Compare
Fix INTEGER_OVERFLOW coverity issue.
crypto_ecdh_set_peerkey:
Check value of the unsigned variable len before decrement. crypto_ec_key_get_subject_public_key/crypto_ec_key_get_ecprivate_key: Check return value of mbedtls_asn1_write_len and mbedtls_asn1_write_tag, if less than zero, return NULL.