Skip to content
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

NULL-check s2n_cert_chain_and_key_get_pkey_type #3064

Merged
merged 1 commit into from
Sep 28, 2021

Conversation

phillipberndt
Copy link
Contributor

This adds POSIX_ENSURE_REF to guard the case where a certificate chain
is empty.

Resolved issues:

resolves #3063

Description of changes:

s2n_cert_chain_and_key_get_pkey_type can be called with empty certificate chains. Adding the check prevents a NULL pointer dereference.

@phillipberndt
Copy link
Contributor Author

I don't have access to the failing s2nIntegrationBatch, help or instructions how to get access would be appreciated!

crypto/s2n_certificate.c Outdated Show resolved Hide resolved
@phillipberndt phillipberndt force-pushed the fix-pkey-type branch 2 times, most recently from 7a63577 to 4be4138 Compare September 22, 2021 11:49
This adds a check to guard the case where a certificate chain
is empty. In case it is, S2N_PKEY_TYPE_UNKNOWN is returned.
@lrstewart lrstewart requested a review from toidiu September 22, 2021 16:34
@dougch dougch merged commit 32e971f into aws:main Sep 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

s2n_cert_chain_and_key_get_pkey_type can dereferences NULL pointer
4 participants