]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Backport 814045
authorGraham Leggett <minfrin@apache.org>
Mon, 14 Sep 2009 20:53:28 +0000 (20:53 +0000)
committerGraham Leggett <minfrin@apache.org>
Mon, 14 Sep 2009 20:53:28 +0000 (20:53 +0000)
CVE-2009-3095: mod_proxy_ftp sanity check authn credentials.
Submitted by: Stefan Fritsch <sf fritsch.de>, Joe Orton

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@814847 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/proxy/mod_proxy_ftp.c

diff --git a/CHANGES b/CHANGES
index fca3956df3af168ba8a6369bf6d69c0a455d0e3b..3a4057c43d6c80159cee5812ebcc645c197049f8 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.2.14
 
+  *) CVE-2009-3095: mod_proxy_ftp sanity check authn credentials.
+     [Stefan Fritsch <sf fritsch.de>, Joe Orton]
+
   *) CVE-2009-3094: mod_proxy_ftp NULL pointer dereference on error paths.
      [Stefan Fritsch <sf fritsch.de>, Joe Orton]
 
index fdcfc6a0ff2373b6c2edf1db297bdc21871c86db..924ac31017848295354b0c0921dd2e5ce69a593f 100644 (file)
@@ -912,6 +912,11 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
     if ((password = apr_table_get(r->headers_in, "Authorization")) != NULL
         && strcasecmp(ap_getword(r->pool, &password, ' '), "Basic") == 0
         && (password = ap_pbase64decode(r->pool, password))[0] != ':') {
+        /* Check the decoded string for special characters. */
+        if (!ftp_check_string(password)) {
+            return ap_proxyerror(r, HTTP_BAD_REQUEST, 
+                                 "user credentials contained invalid character");
+        } 
         /*
          * Note that this allocation has to be made from r->connection->pool
          * because it has the lifetime of the connection.  The other