Vulnerabilities > CVE-2012-0256 - Improper Restriction of Operations Within the Bounds of A Memory Buffer vulnerability in Apache Traffic Server

047910
CVSS 5.0 - MEDIUM
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
NONE
Integrity impact
NONE
Availability impact
PARTIAL
network
low complexity
apache
CWE-119
nessus

Summary

Apache Traffic Server 2.0.x and 3.0.x before 3.0.4 and 3.1.x before 3.1.3 does not properly allocate heap memory, which allows remote attackers to cause a denial of service (daemon crash) via a long HTTP Host header.

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Buffer Overflow via Environment Variables
    This attack pattern involves causing a buffer overflow through manipulation of environment variables. Once the attacker finds that they can modify an environment variable, they may try to overflow associated buffers. This attack leverages implicit trust often placed in environment variables.
  • Overflow Buffers
    Buffer Overflow attacks target improper or missing bounds checking on buffer operations, typically triggered by input injected by an attacker. As a consequence, an attacker is able to write past the boundaries of allocated buffer regions in memory, causing a program crash or potentially redirection of execution as per the attackers' choice.
  • Client-side Injection-induced Buffer Overflow
    This type of attack exploits a buffer overflow vulnerability in targeted client software through injection of malicious content from a custom-built hostile service.
  • Filter Failure through Buffer Overflow
    In this attack, the idea is to cause an active filter to fail by causing an oversized transaction. An attacker may try to feed overly long input strings to the program in an attempt to overwhelm the filter (by causing a buffer overflow) and hoping that the filter does not fail securely (i.e. the user input is let into the system unfiltered).
  • MIME Conversion
    An attacker exploits a weakness in the MIME conversion routine to cause a buffer overflow and gain control over the mail server machine. The MIME system is designed to allow various different information formats to be interpreted and sent via e-mail. Attack points exist when data are converted to MIME compatible format and back.

Nessus

  • NASL familyWeb Servers
    NASL idAPACHE_TRAFFIC_SERVER_313.NASL
    descriptionAccording to its banner, the version of Apache Traffic Server running on the remote host is 3.0.x prior to 3.0.4 or 3.1.x prior to 3.1.3. It is, therefore, affected by a heap-based buffer overflow vulnerability when handling malicious HTTP host headers. A remote, unauthenticated attacker can exploit this to execute arbitrary code on the remote host subject to the privileges of the user running the affected application. Note that Nessus has not tested for this issue but has instead relied only on the application
    last seen2020-06-01
    modified2020-06-02
    plugin id58593
    published2012-04-04
    reporterThis script is Copyright (C) 2012-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/58593
    titleApache Traffic Server 3.0.x < 3.0.4 / 3.1.x < 3.1.3 Host HTTP Header Parsing Remote Overflow
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include('compat.inc');
    
    if (description)
    {
      script_id(58593);
      script_version("1.6");
      script_cvs_date("Date: 2018/11/15 20:50:25");
    
      script_cve_id("CVE-2012-0256");
      script_bugtraq_id(52696);
    
      script_name(english:"Apache Traffic Server 3.0.x < 3.0.4 / 3.1.x < 3.1.3 Host HTTP Header Parsing Remote Overflow");
      script_summary(english:"Checks the version of Apache Traffic Server.");
    
      script_set_attribute(attribute:"synopsis", value:
    "The remote caching server is affected by a buffer overflow
    vulnerability.");
      script_set_attribute(attribute:"description", value:
    "According to its banner, the version of Apache Traffic Server
    running on the remote host is 3.0.x prior to 3.0.4 or 3.1.x prior to
    3.1.3. It is, therefore, affected by a heap-based buffer overflow
    vulnerability when handling malicious HTTP host headers. A remote,
    unauthenticated attacker can exploit this to execute arbitrary code on
    the remote host subject to the privileges of the user running the
    affected application.
    
    Note that Nessus has not tested for this issue but has instead relied
    only on the application's self-reported version number.");
      # https://web.archive.org/web/20120531220750/https://www.cert.fi/en/reports/2012/vulnerability612884.html
      script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?e58ea94c");
      script_set_attribute(attribute:"see_also", value:"https://seclists.org/fulldisclosure/2012/Mar/260");
      script_set_attribute(attribute:"solution", value:"Upgrade to Apache Traffic Server 3.0.4 / 3.1.3 or later.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
      script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
      script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"false");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2012/03/22");
      script_set_attribute(attribute:"patch_publication_date", value:"2012/03/22");
      script_set_attribute(attribute:"plugin_publication_date", value:"2012/04/04");
    
      script_set_attribute(attribute:"plugin_type", value:"remote");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:apache:traffic_server");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"Web Servers");
    
      script_copyright(english:"This script is Copyright (C) 2012-2018 Tenable Network Security, Inc.");
    
      script_dependencies("apache_traffic_server_version.nasl");
      script_require_keys("www/apache_traffic_server");
      script_require_ports("Services/www", 8080);
    
      exit(0);
    }
    
    include("audit.inc");
    include("global_settings.inc");
    include("misc_func.inc");
    include("http.inc");
    
    app = 'Apache Traffic Server';
    port = get_http_port(default:8080);
    
    # Make sure this is Apache Traffic Server
    get_kb_item_or_exit('www/'+port+'/apache_traffic_server');
    
    # Check if we could get a version
    version = get_kb_item_or_exit('www/'+port+'/apache_traffic_server/version', exit_code:1);
    source = get_kb_item_or_exit('www/'+port+'/apache_traffic_server/source', exit_code:1);
    
    ver = split(version, sep:'.');
    for (i=0; i<max_index(ver); i++)
      ver[i] = int(ver[i]);
    
    if (
      (ver[0] < 2) ||
      (ver[0] == 2 && ver[1] < 2) ||
      (ver[0] == 3 && ver[1] == 0 && ver[2] < 4) ||
      (ver[0] == 3 && ver[1] == 1 && ver[2] < 3)
    )
    {
      if (report_verbosity > 0)
      {
        report = 
          '\n  Version source    : ' + source + 
          '\n  Installed version : ' + version +
          '\n  Fixed version     : 3.0.4 / 3.1.3\n';
        security_hole(port:port, extra:report);
      }
      else security_hole(port);
      exit(0);
    }
    else audit(AUDIT_LISTEN_NOT_VULN, app, port, version);
    
  • NASL familyFreeBSD Local Security Checks
    NASL idFREEBSD_PKG_ACAB2F88749011E1865F00E0814CAB4E.NASL
    descriptionCERT-FI reports : A heap overflow vulnerability has been found in the HTTP (Hypertext Transfer Protocol) protocol handling of Apache Traffic Server. The vulnerability allows an attacker to cause a denial of service or potentially to execute his own code by sending a specially modified HTTP message to an affected server.
    last seen2020-06-01
    modified2020-06-02
    plugin id58473
    published2012-03-26
    reporterThis script is Copyright (C) 2012-2018 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/58473
    titleFreeBSD : Apache Traffic Server -- heap overflow vulnerability (acab2f88-7490-11e1-865f-00e0814cab4e)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from the FreeBSD VuXML database :
    #
    # Copyright 2003-2018 Jacques Vidrine and contributors
    #
    # Redistribution and use in source (VuXML) and 'compiled' forms (SGML,
    # HTML, PDF, PostScript, RTF and so forth) with or without modification,
    # are permitted provided that the following conditions are met:
    # 1. Redistributions of source code (VuXML) must retain the above
    #    copyright notice, this list of conditions and the following
    #    disclaimer as the first lines of this file unmodified.
    # 2. Redistributions in compiled form (transformed to other DTDs,
    #    published online in any format, converted to PDF, PostScript,
    #    RTF and other formats) must reproduce the above copyright
    #    notice, this list of conditions and the following disclaimer
    #    in the documentation and/or other materials provided with the
    #    distribution.
    # 
    # THIS DOCUMENTATION IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS"
    # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
    # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
    # OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
    # OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
    # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
    # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
    # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS DOCUMENTATION,
    # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(58473);
      script_version("1.4");
      script_cvs_date("Date: 2018/11/10 11:49:43");
    
      script_cve_id("CVE-2012-0256");
    
      script_name(english:"FreeBSD : Apache Traffic Server -- heap overflow vulnerability (acab2f88-7490-11e1-865f-00e0814cab4e)");
      script_summary(english:"Checks for updated package in pkg_info output");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote FreeBSD host is missing a security-related update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "CERT-FI reports :
    
    A heap overflow vulnerability has been found in the HTTP (Hypertext
    Transfer Protocol) protocol handling of Apache Traffic Server. The
    vulnerability allows an attacker to cause a denial of service or
    potentially to execute his own code by sending a specially modified
    HTTP message to an affected server."
      );
      # https://vuxml.freebsd.org/freebsd/acab2f88-7490-11e1-865f-00e0814cab4e.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?99aced0a"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected package.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/I:N/A:P");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:freebsd:freebsd:trafficserver");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:freebsd:freebsd");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2012/03/22");
      script_set_attribute(attribute:"patch_publication_date", value:"2012/03/24");
      script_set_attribute(attribute:"plugin_publication_date", value:"2012/03/26");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2012-2018 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"FreeBSD Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/FreeBSD/release", "Host/FreeBSD/pkg_info");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("freebsd_package.inc");
    
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    if (!get_kb_item("Host/FreeBSD/release")) audit(AUDIT_OS_NOT, "FreeBSD");
    if (!get_kb_item("Host/FreeBSD/pkg_info")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    flag = 0;
    
    if (pkg_test(save_report:TRUE, pkg:"trafficserver<3.0.4")) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_warning(port:0, extra:pkg_report_get());
      else security_warning(0);
      exit(0);
    }
    else audit(AUDIT_HOST_NOT, "affected");
    

Seebug

bulletinFamilyexploit
descriptionBUGTRAQ ID: 52696 CVE ID: CVE-2012-0256 Apache Traffic Server(ATS或TS)是一个高性能的、可扩展的模块化HTTP/1.1缓存代理服务器。 Apache Traffic Server在HTTP协议的实现上存在堆溢出漏洞,通过发送特制的HTTP消息到受影响服务器可造成拒绝访问或执行任意代码。 0 Apache Group Traffic Server 厂商补丁: Apache Group ------------ 目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载: http://httpd.apache.org/
idSSV:60003
last seen2017-11-19
modified2012-03-26
published2012-03-26
reporterRoot
titleApache Traffic Server HTTP主机标头处理缓冲区溢出漏洞