aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2012-05-30 12:01:28 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2012-05-30 12:01:28 +0000
commit2e67fa5ec8b34744d209a7ede5dda7edef14a00e (patch)
tree970cd4a2a24e6972e0da6824a8a14a999df5534c
parent51b069ec20bf584b4092133eb85912316b328ab0 (diff)
downloadsrc-2e67fa5ec8b34744d209a7ede5dda7edef14a00e.tar.gz
src-2e67fa5ec8b34744d209a7ede5dda7edef14a00e.zip
Update the previous openssl fix. [12:01]
Fix a bug in crypt(3) ignoring characters of a passphrase. [12:02] Security: FreeBSD-SA-12:01.openssl (revised) Security: FreeBSD-SA-12:02.crypt Approved by: so (bz, simon)
Notes
Notes: svn path=/releng/8.1/; revision=236304
-rw-r--r--UPDATING6
-rw-r--r--crypto/openssl/crypto/buffer/buffer.c2
-rw-r--r--crypto/openssl/ssl/s3_srvr.c15
-rw-r--r--secure/lib/libcrypt/crypt-des.c2
-rw-r--r--sys/conf/newvers.sh2
5 files changed, 16 insertions, 11 deletions
diff --git a/UPDATING b/UPDATING
index ac6397a1c40e..a60c66b461cd 100644
--- a/UPDATING
+++ b/UPDATING
@@ -15,6 +15,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.x IS SLOW ON IA64 OR SUN4V:
debugging tools present in HEAD were left in place because
sun4v support still needs work to become production ready.
+20120530: p10 FreeBSD-SA-12:01.openssl (revised),
+ FreeBSD-SA-12:02.crypt
+ Update the previous openssl fix. [12:01]
+
+ Fix a bug in crypt(3) ignoring characters of a passphrase. [12:02]
+
20120503: p9 FreeBSD-SA-12:01.openssl
Fix multiple OpenSSL vulnerabilities.
diff --git a/crypto/openssl/crypto/buffer/buffer.c b/crypto/openssl/crypto/buffer/buffer.c
index 0335d48f68af..3b4c79f7048c 100644
--- a/crypto/openssl/crypto/buffer/buffer.c
+++ b/crypto/openssl/crypto/buffer/buffer.c
@@ -166,7 +166,7 @@ int BUF_MEM_grow_clean(BUF_MEM *str, int len)
/* This limit is sufficient to ensure (len+3)/3*4 < 2**31 */
if (len > LIMIT_BEFORE_EXPANSION)
{
- BUFerr(BUF_F_BUF_MEM_GROW,ERR_R_MALLOC_FAILURE);
+ BUFerr(BUF_F_BUF_MEM_GROW_CLEAN,ERR_R_MALLOC_FAILURE);
return 0;
}
n=(len+3)/3*4;
diff --git a/crypto/openssl/ssl/s3_srvr.c b/crypto/openssl/ssl/s3_srvr.c
index 7db8b31611d7..ecf6e3fc70a5 100644
--- a/crypto/openssl/ssl/s3_srvr.c
+++ b/crypto/openssl/ssl/s3_srvr.c
@@ -698,14 +698,6 @@ int ssl3_check_client_hello(SSL *s)
int ok;
long n;
- /* We only allow the client to restart the handshake once per
- * negotiation. */
- if (s->s3->flags & SSL3_FLAGS_SGC_RESTART_DONE)
- {
- SSLerr(SSL_F_SSL3_CHECK_CLIENT_HELLO, SSL_R_MULTIPLE_SGC_RESTARTS);
- return -1;
- }
-
/* this function is called when we really expect a Certificate message,
* so permit appropriate message length */
n=s->method->ssl_get_message(s,
@@ -718,6 +710,13 @@ int ssl3_check_client_hello(SSL *s)
s->s3->tmp.reuse_message = 1;
if (s->s3->tmp.message_type == SSL3_MT_CLIENT_HELLO)
{
+ /* We only allow the client to restart the handshake once per
+ * negotiation. */
+ if (s->s3->flags & SSL3_FLAGS_SGC_RESTART_DONE)
+ {
+ SSLerr(SSL_F_SSL3_CHECK_CLIENT_HELLO, SSL_R_MULTIPLE_SGC_RESTARTS);
+ return -1;
+ }
/* Throw away what we have done so far in the current handshake,
* which will now be aborted. (A full SSL_clear would be too much.)
* I hope that tmp.dh is the only thing that may need to be cleared
diff --git a/secure/lib/libcrypt/crypt-des.c b/secure/lib/libcrypt/crypt-des.c
index 9adff936f3ad..6bb9bc03c76f 100644
--- a/secure/lib/libcrypt/crypt-des.c
+++ b/secure/lib/libcrypt/crypt-des.c
@@ -606,7 +606,7 @@ crypt_des(const char *key, const char *setting)
q = (u_char *)keybuf;
while (q - (u_char *)keybuf - 8) {
*q++ = *key << 1;
- if (*(q - 1))
+ if (*key != '\0')
key++;
}
if (des_setkey((char *)keybuf))
diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh
index 541e2b168759..782069b4dfef 100644
--- a/sys/conf/newvers.sh
+++ b/sys/conf/newvers.sh
@@ -32,7 +32,7 @@
TYPE="FreeBSD"
REVISION="8.1"
-BRANCH="RELEASE-p9"
+BRANCH="RELEASE-p10"
if [ "X${BRANCH_OVERRIDE}" != "X" ]; then
BRANCH=${BRANCH_OVERRIDE}
fi