diff options
author | simon <simon@FreeBSD.org> | 2011-02-12 21:30:46 +0000 |
---|---|---|
committer | simon <simon@FreeBSD.org> | 2011-02-12 21:30:46 +0000 |
commit | 4fe7a7870a6da7d72489d152af4b1a951eb50ae4 (patch) | |
tree | 0bf16de41217d6ad2b793bfe2266614f63f33c66 /crypto/openssl | |
parent | 94b652028c56eead69d9411ef7e8179bfba9c5f2 (diff) | |
download | FreeBSD-src-4fe7a7870a6da7d72489d152af4b1a951eb50ae4.zip FreeBSD-src-4fe7a7870a6da7d72489d152af4b1a951eb50ae4.tar.gz |
Fix Incorrectly formatted ClientHello SSL/TLS handshake messages could
cause OpenSSL to parse past the end of the message.
Note: Applications are only affected if they act as a server and call
SSL_CTX_set_tlsext_status_cb on the server's SSL_CTX. This includes
Apache httpd >= 2.3.3, if configured with "SSLUseStapling On".
Security: http://www.openssl.org/news/secadv_20110208.txt
Security: CVE-2011-0014
Obtained from: OpenSSL CVS
Diffstat (limited to 'crypto/openssl')
-rw-r--r-- | crypto/openssl/ssl/t1_lib.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/crypto/openssl/ssl/t1_lib.c b/crypto/openssl/ssl/t1_lib.c index 0cc8320..92cac13 100644 --- a/crypto/openssl/ssl/t1_lib.c +++ b/crypto/openssl/ssl/t1_lib.c @@ -521,6 +521,7 @@ int ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, in } n2s(data, idsize); dsize -= 2 + idsize; + size -= 2 + idsize; if (dsize < 0) { *al = SSL_AD_DECODE_ERROR; @@ -559,9 +560,14 @@ int ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, in } /* Read in request_extensions */ + if (size < 2) + { + *al = SSL_AD_DECODE_ERROR; + return 0; + } n2s(data,dsize); size -= 2; - if (dsize > size) + if (dsize != size) { *al = SSL_AD_DECODE_ERROR; return 0; |