About Apple SSL_goto Vulnerability

Source: Internet
Author: User
Tags sha1 hash ssl connection

Apple released a firmware upgrade for iOS 7.0.6 recently to fix the BUG in SSL connection verification. Open the vulnerability test page with the upgraded ios system https://www.imperialviolet.org: 1266 is no longer open. The page prompts that a secure link cannot be created. Since then, it has been said that Apple has forgotten a major BUG for 18 months and has been successfully repaired. However, the macos bug is not fixed yet. The following prompt is displayed when you open the test page of the above BUG in Safari, but it will not succeed when you open the page using firefox or Chrome.


When Safari opens the page


Chrome page opening



Page opened by Firefox

This vulnerability occurs because it is located in the assumerr and triggers a BUG.


Callback (SSLContext * ctx, bool isRsa, SSLBuffer signedParams, signature * signature, UInt16 signatureLen) {OSStatus err; SSLBuffer hashOut, hashCtx, clientRandom, serverRandom; uint8_t hashes [signature + signature]; SSLBuffer signedHashes; uint8_t * dataToSign; size_tdataToSignLen; signedHashes. data = 0; hashCtx. data = 0; clientRandom. data = ctx-> clientRandom; cl IentRandom. length = SSL_CLIENT_SRVR_RAND_SIZE; serverRandom. data = ctx-> serverRandom; serverRandom. length = SSL_CLIENT_SRVR_RAND_SIZE; if (isRsa) {/* skip this if signing with DSA */dataToSign = hashes; dataToSignLen = SSL_SHA1_DIGEST_LEN + SSL_MD5_DIGEST_LEN; Hout. data = hashes; hashOut. length = SSL_MD5_DIGEST_LEN; if (err = ReadyHash (& SSLHashMD5, & hashCtx ))! = 0) goto fail; if (err = SSLHashMD5.update (& hashCtx, & clientRandom ))! = 0) goto fail; if (err = SSLHashMD5.update (& hashCtx, & serverRandom ))! = 0) goto fail; if (err = SSLHashMD5.update (& hashCtx, & signedParams ))! = 0) goto fail; if (err = SSLHashMD5.final (& hashCtx, & hashOut ))! = 0) goto fail;} else {/* DSA, ECDSA-just use the SHA1 hash */dataToSign = & hashes [SSL_MD5_DIGEST_LEN]; dataToSignLen = SSL_SHA1_DIGEST_LEN;} Hout. data = hashes + SSL_MD5_DIGEST_LEN; hashOut. length = SSL_SHA1_DIGEST_LEN; if (err = SSLFreeBuffer (& hashCtx ))! = 0) goto fail; if (err = ReadyHash (& SSLHashSHA1, & hashCtx ))! = 0) goto fail; if (err = SSLHashSHA1.update (& hashCtx, & clientRandom ))! = 0) goto fail; if (err = SSLHashSHA1.update (& hashCtx, & serverRandom ))! = 0) goto fail; if (err = SSLHashSHA1.update (& hashCtx, & signedParams ))! = 0) goto fail; // multiple goto fail if (err = SSLHashSHA1.final (& hashCtx, & hashOut ))! = 0) goto fail; err = sslRawVerify (ctx, ctx-> peerPubKey, dataToSign,/* plaintext */dataToSignLen,/* plaintext length */signature, signatureLen ); if (err) {sslErrorLog ("SSLDecodeSignedServerKeyExchange: sslRawVerify" "returned % d \ n", (int) err); goto fail;} fail: SSLFreeBuffer (& signedHashes ); SSLFreeBuffer (& hashCtx); return err ;}

Try to re-compile the program by yourself. If you don't want to missing some header files, Google will be fruitless.



-Update-

The BUG disappears after OSX10.9.2 is updated.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.