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

Crash when trying to release NULL #249

Closed
CraigSiemens opened this issue Apr 8, 2021 · 1 comment · Fixed by #250
Closed

Crash when trying to release NULL #249

CraigSiemens opened this issue Apr 8, 2021 · 1 comment · Fixed by #250

Comments

@CraigSiemens
Copy link
Contributor

We've got another crash coming from TrustKit

It looks like it's related to these lines.
https://github.com/datatheorem/TrustKit/blob/master/TrustKit/Pinning/ssl_pin_verifier.m#L66-L68

SecCertificateCopySubjectSummary can return NULL but nothing is checking for it before calling release.

Exception Type: EXC_BREAKPOINT (SIGTRAP)
Crashed Thread: 5

Application Specific Information:
*** CFRelease() called with NULL *** > boolValue > containsObject: > hashSubjectPublicKeyInfoFromCertificate: > objectForKeyedSubscript: > timeIntervalSinceReferenceDate

Thread 5 Crashed:
0   CoreFoundation                  0x315fb022c         CFRelease.cold.1
1   CoreFoundation                  0x315e2c534         CFRelease
2   TrustKit                        0x1045c79e0         verifyPublicKeyPin (ssl_pin_verifier.m:68)
3   TrustKit                        0x1045ced10         -[TSKPinningValidator evaluateTrust:forHostname:] (TSKPinningValidator.m:126)
4   TrustKit                        0x1045cf0e0         -[TSKPinningValidator handleChallenge:completionHandler:] (TSKPinningValidator.m:202)
@CraigSiemens
Copy link
Contributor Author

CraigSiemens commented Apr 21, 2021

One interesting thing to note, we've seen this occur for 21 users so far, and all are on iOS >= 14.4. Seeing as how we didn't start seeing this crash until recently, it appears something has changed with iOS 14.4 to make this crash start happening.

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 a pull request may close this issue.

1 participant