Created
February 24, 2014 22:34
The SSL bug in Apple's code
This file contains 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
static OSStatus | |
SSLVerifySignedServerKeyExchange(SSLContext *ctx, bool isRsa, SSLBuffer signedParams, | |
uint8_t *signature, UInt16 signatureLen) | |
{ | |
OSStatus err; | |
... | |
if ((err = SSLHashSHA1.update(&hashCtx, &serverRandom)) != 0) | |
goto fail; | |
if ((err = SSLHashSHA1.update(&hashCtx, &signedParams)) != 0) | |
goto fail; | |
goto fail; | |
if ((err = SSLHashSHA1.final(&hashCtx, &hashOut)) != 0) | |
goto fail; | |
... | |
fail: | |
SSLFreeBuffer(&signedHashes); | |
SSLFreeBuffer(&hashCtx); | |
return err; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Lines 17 through 21 look like they just free the buffer and return an error. How, if at all, does that buffer freeing end up being the security hole? Like, I get that it will always go to the fail condition, but what's happening in that fail block that makes it a huge hole?