Only write to pdays/psecs if they are not null#29337
Closed
nhorman wants to merge 1 commit intoopenssl:masterfrom
Closed
Only write to pdays/psecs if they are not null#29337nhorman wants to merge 1 commit intoopenssl:masterfrom
nhorman wants to merge 1 commit intoopenssl:masterfrom
Conversation
We have a few cases in which one of the paramters passed to ASN1_TIME_diff is null (i.e. the caller doesn't care about the psec differnce and so passes NULL as that pointer parameter). However, OPENSSL_gmtime_diff assumes both pointers are valid, and so writes to them unilaterally resulting in a crash as observed here: openssl#29333 (comment) Check the pointers before writing to them.
2 tasks
t8m
approved these changes
Dec 8, 2025
andrewkdinh
approved these changes
Dec 8, 2025
paulidale
approved these changes
Dec 8, 2025
mattcaswell
approved these changes
Dec 9, 2025
Collaborator
|
This pull request is ready to merge |
Contributor
Author
|
merged to master, thank you! |
openssl-machine
pushed a commit
that referenced
this pull request
Dec 9, 2025
We have a few cases in which one of the paramters passed to ASN1_TIME_diff is null (i.e. the caller doesn't care about the psec differnce and so passes NULL as that pointer parameter). However, OPENSSL_gmtime_diff assumes both pointers are valid, and so writes to them unilaterally resulting in a crash as observed here: #29333 (comment) Check the pointers before writing to them. Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Paul Dale <[email protected]> Reviewed-by: Norbert Pocs <[email protected]> (Merged from #29337)
cxx194832
pushed a commit
to cxx194832/openssl
that referenced
this pull request
Dec 12, 2025
We have a few cases in which one of the paramters passed to ASN1_TIME_diff is null (i.e. the caller doesn't care about the psec differnce and so passes NULL as that pointer parameter). However, OPENSSL_gmtime_diff assumes both pointers are valid, and so writes to them unilaterally resulting in a crash as observed here: openssl#29333 (comment) Check the pointers before writing to them. Reviewed-by: Tomas Mraz <[email protected]> Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Paul Dale <[email protected]> Reviewed-by: Norbert Pocs <[email protected]> (Merged from openssl#29337)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We have a few cases in which one of the paramters passed to ASN1_TIME_diff is null (i.e. the caller doesn't care about the psec differnce and so passes NULL as that pointer parameter).
However, OPENSSL_gmtime_diff assumes both pointers are valid, and so writes to them unilaterally resulting in a crash as observed here: #29333 (comment)
Check the pointers before writing to them.