-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
asn1: add ASN1_STRING_set() check result #21587
Conversation
This pull request is ready to merge |
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.
other places do a ERR_raise(ERR_LIB_ASN1, ERR_R_MALLOC_FAILURE);
suggest to do the same here
In the master branch is always done a What is better to done in such a case? |
oh, thanks for pointing that out, |
I can remove the (openssl-3.0) and (openssl-3.1) tags, and merge this just to |
yes this is certainly okay for master |
This will be merged to master
only; @nv-dmd will make a new PR for 3.1/3.0
Adding (tests: exempted) because the external-tests are failing for master. |
Merged to |
Reviewed-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Todd Short <todd.short@me.com> (Merged from #21587)
Function
asn1_str2type()
(crypto\asn1\asn1_gen.c) uses functionASN1_STRING_set()
to set the ASN1 string (line 702), but the result ofASN1_STRING_set()
execution is not checked, although it may fail.In the same function
asn1_str2type()
on line 648 the result ofASN1_STRING_set()
is checked.Added ASN1_STRING_set() check result.
Found by Linux Verification Center (linuxtesting.org) with SVACE.