Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Jan 2017 07:45:06 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r312863 - stable/10/crypto/openssl/crypto/evp
Message-ID:  <201701270745.v0R7j6Yk065129@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Fri Jan 27 07:45:06 2017
New Revision: 312863
URL: https://svnweb.freebsd.org/changeset/base/312863

Log:
  Backport OpenSSL commit 56336b6c7a75ed28067cadedd8ac46572348bc2f:
  
      crypto/evp: harden RC4_MD5 cipher.
  
      Originally a crash in 32-bit build was reported CHACHA20-POLY1305
      cipher. The crash is triggered by truncated packet and is result
      of excessive hashing to the edge of accessible memory (or bogus
      MAC value is produced if x86 MD5 assembly module is involved). Since
      hash operation is read-only it is not considered to be exploitable
      beyond a DoS condition.
  
      Thanks to Robert Święcki for report.
  
  This is a direct commit to stable/10.
  
  Security:	CVE-2017-3731

Modified:
  stable/10/crypto/openssl/crypto/evp/e_rc4_hmac_md5.c

Modified: stable/10/crypto/openssl/crypto/evp/e_rc4_hmac_md5.c
==============================================================================
--- stable/10/crypto/openssl/crypto/evp/e_rc4_hmac_md5.c	Fri Jan 27 05:59:26 2017	(r312862)
+++ stable/10/crypto/openssl/crypto/evp/e_rc4_hmac_md5.c	Fri Jan 27 07:45:06 2017	(r312863)
@@ -267,6 +267,8 @@ static int rc4_hmac_md5_ctrl(EVP_CIPHER_
             len = p[arg - 2] << 8 | p[arg - 1];
 
             if (!ctx->encrypt) {
+                if (len < MD5_DIGEST_LENGTH)
+                    return -1;
                 len -= MD5_DIGEST_LENGTH;
                 p[arg - 2] = len >> 8;
                 p[arg - 1] = len;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701270745.v0R7j6Yk065129>