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

[iOS] Fix null dereference in AppleCryptoNative_SslIsHostnameMatch #53029

Merged
merged 1 commit into from
Jun 3, 2021

Conversation

filipnavara
Copy link
Member

@ghost
Copy link

ghost commented May 20, 2021

Tagging subscribers to this area: @bartonjs, @vcsjones, @krwq, @GrabYourPitchforks
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #52120 (comment).

Author: filipnavara
Assignees: -
Labels:

area-System.Security

Milestone: -

OSStatus status = 0;
// look for first failure to keep it simple. Normally, there will be exactly one.
for (int i = 0; i < CFArrayGetCount(statusCodes); i++)
if (statusCodes != NULL)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this set some unknown pOSStatus in NULL case?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was my initial thought as well but the code ignores these private attributes if they are not present. Hence I am treating trust->TrustResultDetails->StatusCodes not present the same as trust->TrustResultDetails not present. Essentially the result is that you will get less specific error code but still a trust failure.

@steveisok
Copy link
Member

@bartonjs When you have a moment, can you please give this a review?

@bartonjs bartonjs merged commit e218d8e into dotnet:main Jun 3, 2021
@filipnavara filipnavara deleted the ios-ssl-crash branch June 3, 2021 21:40
@ghost ghost locked as resolved and limited conversation to collaborators Jul 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants