Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=a41c8c1a61f9809092ee0b63b18fc2d563384466

commit a41c8c1a61f9809092ee0b63b18fc2d563384466
Author: kikadf <[email protected]>
Date:   Sat Jan 18 08:45:47 2014 +0100

curl-7.26.0-2-x86_64

* Change m8r
* Fix CVE-2013-0249.patch  CVE-2013-2174.patch  CVE-2013-6422.patch 
CVE-2013-1944.patch  CVE-2013-4545.patch

diff --git a/source/network/curl/CVE-2013-0249.patch 
b/source/network/curl/CVE-2013-0249.patch
new file mode 100644
index 0000000..df7c015
--- /dev/null
+++ b/source/network/curl/CVE-2013-0249.patch
@@ -0,0 +1,60 @@
+Description: Fix buffer overflow in SMTP DIGEST-MD5 negotiation
+ When negotiating SMTP DIGEST-MD5 authentication, the function
+ smtp_state_authdigest_resp() uses the data provided from the
+ server without doing the proper length checks and that data is then
+ appended to a local fixed-size buffer on the stack.
+Origin: vendor, adapted from http://curl.haxx.se/curl-sasl.patch
+Bug: http://curl.haxx.se/docs/adv_20130206.html
+Bug-Debian: http://bugs.debian.org/700002
+Forwarded: not-needed
+Author: Alessandro Ghedini <[email protected]>
+Last-Update: 2013-02-10
+
+--- a/lib/smtp.c
++++ b/lib/smtp.c
+@@ -879,7 +879,7 @@
+   char cnonce[]     = "12345678"; /* will be changed */
+   char method[]     = "AUTHENTICATE";
+   char qop[]        = "auth";
+-  char uri[128]     = "smtp/";
++  char uri[128];
+   char response[512];
+
+   (void)instate; /* no use for this yet */
+@@ -963,8 +963,8 @@
+   for(i = 0; i < MD5_DIGEST_LEN; i++)
+     snprintf(&HA1_hex[2 * i], 3, "%02x", digest[i]);
+
+-  /* Orepare URL string, append realm to the protocol */
+-  strcat(uri, realm);
++  /* Prepare the URL string */
++  snprintf(uri, sizeof(uri), "smtp/%s", realm);
+
+   /* Calculate H(A2) */
+   ctxt = Curl_MD5_init(Curl_DIGEST_MD5);
+@@ -1008,20 +1008,11 @@
+   for(i = 0; i < MD5_DIGEST_LEN; i++)
+     snprintf(&resp_hash_hex[2 * i], 3, "%02x", digest[i]);
+
+-  strcpy(response, "username=\"");
+-  strcat(response, conn->user);
+-  strcat(response, "\",realm=\"");
+-  strcat(response, realm);
+-  strcat(response, "\",nonce=\"");
+-  strcat(response, nonce);
+-  strcat(response, "\",cnonce=\"");
+-  strcat(response, cnonce);
+-  strcat(response, "\",nc=");
+-  strcat(response, nonceCount);
+-  strcat(response, ",digest-uri=\"");
+-  strcat(response, uri);
+-  strcat(response, "\",response=");
+-  strcat(response, resp_hash_hex);
++  snprintf(response, sizeof(response),
++           "username=\"%s\",realm=\"%s\",nonce=\"%s\","
++           "cnonce=\"%s\",nc=\"%s\",digest-uri=\"%s\",response=%s",
++           conn->user, realm, nonce,
++           cnonce, nonceCount, uri, resp_hash_hex);
+
+   /* Encode it to base64 and send it */
+   result = Curl_base64_encode(data, response, 0, &rplyb64, &len);
diff --git a/source/network/curl/CVE-2013-1944.patch 
b/source/network/curl/CVE-2013-1944.patch
new file mode 100644
index 0000000..615a3ad
--- /dev/null
+++ b/source/network/curl/CVE-2013-1944.patch
@@ -0,0 +1,51 @@
+From 5b1bca89609f67fcd27cea0e9f382c8c1caad041 Mon Sep 17 00:00:00 2001
+From: YAMADA Yasuharu <[email protected]>
+Date: Wed, 10 Apr 2013 11:22:09 +0200
+Subject: [PATCH] cookie: fix tailmatching to prevent cross-domain leakage
+
+Cookies set for 'example.com' could accidentaly also be sent by libcurl
+to the 'bexample.com' (ie with a prefix to the first domain name).
+
+ lib/cookie.c        |   24 +++++++++++++++++++-----
+ 2 files changed, 21 insertions(+), 6 deletions(-)
+
+diff --git a/lib/cookie.c b/lib/cookie.c
+index 4b9ec0b..a67204e 100644
+--- a/lib/cookie.c
++++ b/lib/cookie.c
+@@ -118,15 +118,29 @@ static void freecookie(struct Cookie *co)
+   free(co);
+ }
+
+-static bool tailmatch(const char *little, const char *bigone)
++static bool tailmatch(const char *cooke_domain, const char *hostname)
+ {
+-  size_t littlelen = strlen(little);
+-  size_t biglen = strlen(bigone);
++  size_t cookie_domain_len = strlen(cooke_domain);
++  size_t hostname_len = strlen(hostname);
+
+-  if(littlelen > biglen)
++  if(hostname_len < cookie_domain_len)
+     return FALSE;
+
+-  return Curl_raw_equal(little, bigone+biglen-littlelen) ? TRUE : FALSE;
++  if(!Curl_raw_equal(cooke_domain, hostname+hostname_len-cookie_domain_len))
++    return FALSE;
++
++  /* A lead char of cookie_domain is not '.'.
++     RFC6265 4.1.2.3. The Domain Attribute says:
++       For example, if the value of the Domain attribute is
++       "example.com", the user agent will include the cookie in the Cookie
++       header when making HTTP requests to example.com, www.example.com, and
++       www.corp.example.com.
++   */
++  if(hostname_len == cookie_domain_len)
++    return TRUE;
++  if('.' == *(hostname + hostname_len - cookie_domain_len - 1))
++    return TRUE;
++  return FALSE;
+ }
+
+ /*
+
diff --git a/source/network/curl/CVE-2013-2174.patch 
b/source/network/curl/CVE-2013-2174.patch
new file mode 100644
index 0000000..673431f
--- /dev/null
+++ b/source/network/curl/CVE-2013-2174.patch
@@ -0,0 +1,38 @@
+From 6032f0ff672f09babf69d9d42bcde6eb9eeb5bea Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg <[email protected]>
+Date: Sun, 19 May 2013 23:24:29 +0200
+Subject: [PATCH] Curl_urldecode: no peeking beyond end of input buffer
+
+Security problem: CVE-2013-2174
+
+If a program would give a string like "%" to curl_easy_unescape(), it
+would still consider the % as start of an encoded character. The
+function then not only read beyond the buffer but it would also deduct
+the *unsigned* counter variable for how many more bytes there's left to
+read in the buffer by two, making the counter wrap. Continuing this, the
+function would go on reading beyond the buffer and soon writing beyond
+the allocated target buffer...
+
+Bug: http://curl.haxx.se/docs/adv_20130622.html
+Reported-by: Timo Sirainen
+---
+ lib/escape.c |    5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/lib/escape.c b/lib/escape.c
+index 6a26cf8..aa7db2c 100644
+--- a/lib/escape.c
++++ b/lib/escape.c
+@@ -159,7 +159,8 @@ CURLcode Curl_urldecode(struct SessionHandle *data,
+
+   while(--alloc > 0) {
+     in = *string;
+-    if(('%' == in) && ISXDIGIT(string[1]) && ISXDIGIT(string[2])) {
++    if(('%' == in) && (alloc > 2) &&
++       ISXDIGIT(string[1]) && ISXDIGIT(string[2])) {
+       /* this is two hexadecimal digits following a '%' */
+       char hexstr[3];
+       char *ptr;
+--
+1.7.10.4
+
diff --git a/source/network/curl/CVE-2013-4545.patch 
b/source/network/curl/CVE-2013-4545.patch
new file mode 100644
index 0000000..28a174e
--- /dev/null
+++ b/source/network/curl/CVE-2013-4545.patch
@@ -0,0 +1,27 @@
+From 3c3622b66221d89509cffaa693fc7dcd5c5b96cf Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg <[email protected]>
+Date: Wed, 2 Oct 2013 15:31:10 +0200
+Subject: [PATCH] OpenSSL: acknowledge CURLOPT_SSL_VERIFYHOST without
+ VERIFYPEER
+
+Setting only CURLOPT_SSL_VERIFYHOST without CURLOPT_SSL_VERIFYPEER set
+should still verify that the host name fields in the server certificate
+is fine or return failure.
+
+Bug: http://curl.haxx.se/mail/lib-2013-10/0002.html
+Reported-by: Ishan SinghLevett
+---
+ lib/ssluse.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/lib/ssluse.c
++++ b/lib/ssluse.c
+@@ -2471,7 +2471,7 @@
+    * operations.
+    */
+
+-  if(!data->set.ssl.verifypeer)
++  if(!data->set.ssl.verifypeer && !data->set.ssl.verifyhost)
+     (void)servercert(conn, connssl, FALSE);
+   else
+     retcode = servercert(conn, connssl, TRUE);
diff --git a/source/network/curl/CVE-2013-6422.patch 
b/source/network/curl/CVE-2013-6422.patch
new file mode 100644
index 0000000..44c775c
--- /dev/null
+++ b/source/network/curl/CVE-2013-6422.patch
@@ -0,0 +1,55 @@
+From 71c9842a710787145ff31603f100e4269dd676c1 Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg <[email protected]>
+Date: Fri, 29 Nov 2013 22:46:05 +0100
+Subject: [PATCH] gtls: respect *VERIFYHOST independently of *VERIFYPEER
+
+This is basically the same fix that 3c3622b6 brought to the OpenSSL
+backend and that resulted in CVE-2013-4545.
+
+This version of the problem was independently introduced to the GnuTLS
+backend with commit 59cf93cc, present in the code since the libcurl
+7.21.4 release.
+
+Bug: http://curl.haxx.se/mail/lib-2013-11/0214.html
+Reported-by: Marc Deslauriers
+---
+ lib/gtls.c | 8 ++------
+ 1 file changed, 2 insertions(+), 6 deletions(-)
+
+diff --git a/lib/gtls.c b/lib/gtls.c
+index 700e46a..b64dfa6 100644
+--- a/lib/gtls.c
++++ b/lib/gtls.c
+@@ -5,7 +5,7 @@
+  *                            | (__| |_| |  _ <| |___
+  *                             \___|\___/|_| \_\_____|
+  *
+- * Copyright (C) 1998 - 2012, Daniel Stenberg, <[email protected]>, et al.
++ * Copyright (C) 1998 - 2013, Daniel Stenberg, <[email protected]>, et al.
+  *
+  * This software is licensed as described in the file COPYING, which
+  * you should have received as part of this distribution. The terms
+@@ -633,10 +633,8 @@ gtls_connect_step3(struct connectdata *conn,
+     else
+       infof(data, "\t server certificate verification OK\n");
+   }
+-  else {
++  else
+     infof(data, "\t server certificate verification SKIPPED\n");
+-    goto after_server_cert_verification;
+-  }
+
+   /* initialize an X.509 certificate structure. */
+   gnutls_x509_crt_init(&x509_cert);
+@@ -766,8 +764,6 @@ gtls_connect_step3(struct connectdata *conn,
+
+   gnutls_x509_crt_deinit(x509_cert);
+
+-after_server_cert_verification:
+-
+   /* compression algorithm (if any) */
+   ptr = gnutls_compression_get_name(gnutls_compression_get(session));
+   /* the *_get_name() says "NULL" if GNUTLS_COMP_NULL is returned */
+--
+1.8.4.4
+
diff --git a/source/network/curl/FrugalBuild b/source/network/curl/FrugalBuild
index 2259dd8..8347f0d 100644
--- a/source/network/curl/FrugalBuild
+++ b/source/network/curl/FrugalBuild
@@ -1,10 +1,13 @@
# Compiling Time: 0.60 SBU
+# Maintainer: kikadf <[email protected]>
# Contributor: Miklos Vajna  <[email protected]>
-# Maintainer: voroskoi <[email protected]>
+# Contributor: voroskoi <[email protected]>
+
+options+=('asneeded')

pkgname=curl
pkgver=7.26.0
-pkgrel=1
+pkgrel=2
pkgdesc="A command line tool for transferring data specified with URL syntax."
url="http://curl.haxx.se";
makedepends=('groff')
@@ -16,4 +19,11 @@ up2date="lynx -dump $url/download.html|grep Released|tr -s ' 
'|sed 's/, / /'|cut
source=(http://curl.haxx.se/download/$pkgname-$pkgver.tar.bz2)
signatures=($source.asc)

+# FSA fix ***
+source=(${source[@]} CVE-2013-0249.patch  CVE-2013-2174.patch  
CVE-2013-6422.patch
+                     CVE-2013-1944.patch  CVE-2013-4545.patch)
+signatures=(${signatures[@]} '' '' '' '' '')
+# ***********
+
+
# optimization OK
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to