Vulnerabilities > CVE-2009-2346 - Improper Restriction of Operations Within the Bounds of A Memory Buffer vulnerability in Asterisk products

047910
CVSS 7.8 - HIGH
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
NONE
Integrity impact
NONE
Availability impact
COMPLETE
network
low complexity
asterisk
CWE-119
nessus

Summary

The IAX2 protocol implementation in Asterisk Open Source 1.2.x before 1.2.35, 1.4.x before 1.4.26.2, 1.6.0.x before 1.6.0.15, and 1.6.1.x before 1.6.1.6; Business Edition B.x.x before B.2.5.10, C.2.x before C.2.4.3, and C.3.x before C.3.1.1; and s800i 1.3.x before 1.3.0.3 allows remote attackers to cause a denial of service (call-number exhaustion) by initiating many IAX2 message exchanges, a related issue to CVE-2008-3263.

Vulnerable Configurations

Part Description Count
Application
Asterisk
190
Hardware
Asterisk
2

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 familyDenial of Service
    NASL idASTERISK_IAX2_CALL_NUMBER_DOS.NASL
    descriptionThe version of Asterisk running on the remote host appears to be using an older implementation of the IAX2 protocol that does not support call token validation. Due to a design flaw in the protocol, a remote attacker could send a large number of messages, exhausting all available call numbers in the process. This would result in a denial of service to legitimate users.
    last seen2020-06-01
    modified2020-06-02
    plugin id40885
    published2009-09-08
    reporterThis script is Copyright (C) 2009-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/40885
    titleAsterisk IAX2 Call Number Exhaustion DoS
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    
    include("compat.inc");
    
    
    if (description)
    {
      script_id(40885);
      script_version("1.17");
    
      script_cve_id("CVE-2009-2346");
      script_bugtraq_id(36275);
      script_xref(name:"EDB-ID", value:"8940");
      script_xref(name:"Secunia", value:"36593");
    
      script_name(english:"Asterisk IAX2 Call Number Exhaustion DoS");
      script_summary(english:"Examines the IAX2 response");
    
      script_set_attribute(
        attribute:"synopsis",
        value:"The remote VoIP service is susceptible to a denial of service attack."
      );
      script_set_attribute(attribute:"description", value:
    "The version of Asterisk running on the remote host appears to be using
    an older implementation of the IAX2 protocol that does not support
    call token validation.  Due to a design flaw in the protocol, a remote
    attacker could send a large number of messages, exhausting all
    available call numbers in the process.  This would result in a denial
    of service to legitimate users."  );
      script_set_attribute(
        attribute:"see_also",
        value:"http://downloads.asterisk.org/pub/security/AST-2009-006.html"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.securityfocus.com/archive/1/archive/1/506257/100/0/threaded"
      );
      script_set_attribute(attribute:"solution", value:
    "Upgrade to the relevant version of Asterisk referenced in the
    vendor's advisory."  );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/I:N/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_cwe_id(119);
      script_set_attribute(
        attribute:"vuln_publication_date",
        value:"2009/06/12"   # Date the DoS code was posted to milw0rm
      );
      script_set_attribute(
        attribute:"patch_publication_date",
        value:"2009/09/03"
      );
      script_set_attribute(
        attribute:"plugin_publication_date",
        value:"2009/09/08"
      );
     script_cvs_date("Date: 2018/11/15 20:50:21");
      script_set_attribute(attribute:"plugin_type", value:"remote");
      script_set_attribute(attribute:"cpe",value:"cpe:/a:asterisk:open_source");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"Denial of Service");
    
      script_copyright(english:"This script is Copyright (C) 2009-2018 Tenable Network Security, Inc.");
    
      script_dependencies("iax2_detection.nasl");
      script_require_keys("Services/udp/iax2");
      script_require_udp_ports(4569);
    
      exit(0);
    }
    
    include("byte_func.inc");
    include("global_settings.inc");
    include("misc_func.inc");
    
    
    port = get_kb_item("Services/udp/iax2");
    if (!port) port = 4569;
    if (! get_udp_port_state(port)) exit(0, "UDP port "+port+" is not open.");
    
    soc = open_sock_udp(port);
    if (!soc) exit(1, "Unable to create socket.");
    
    # Generate the IAX2 'NEW' packet.
    iax_new = string(
      mkword(0x8001),    # 'F' bit + source call number
      mkword(0),         # 'R' bit + dest call number
      mkdword(0),        # timestamp
      mkbyte(0),         # OSeqno
      mkbyte(0),         # ISeqno
      mkbyte(6),         # frametype, 6 => IAX frame
      mkbyte(0x01)       # 'C' bit + subclass, 0x01 => NEW request
    );
    
    send(socket:soc, data:iax_new);
    res = recv(socket:soc, length:128);
    if (isnull(res)) exit(1, "The server failed to respond.");
    
    # Check if we get the right response. 
    if (strlen(res) < 12) exit(1, "Unexpected response received.");
    subclass = getbyte(blob:res, pos:11);
    
    # This issue was fixed by changing the protocol, which we can detect in the
    # response.  INVAL (0x0a) = vulnerable, REJECT (0x06) = patched 
    if (subclass == 0x0a)
      security_warning(port:port, proto:"udp");
    else if (subclass == 0x06)
      exit(0, "The host is not affected.");
    else
      exit(1, "Unexpected IAX subclass received (" + subclass + ").");
    
    
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2009-9405.NASL
    descriptionUpdate to 1.6.1.6 to fix many bugs... Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-06-01
    modified2020-06-02
    plugin id41633
    published2009-09-28
    reporterThis script is Copyright (C) 2009-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/41633
    titleFedora 11 : asterisk-1.6.1.6-1.fc11 (2009-9405)
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2009-9374.NASL
    descriptionUpdate to 1.6.0.15 to fix many bugs... Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-06-01
    modified2020-06-02
    plugin id41632
    published2009-09-28
    reporterThis script is Copyright (C) 2009-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/41632
    titleFedora 10 : asterisk-1.6.0.15-1.fc10 (2009-9374)
  • NASL familyGentoo Local Security Checks
    NASL idGENTOO_GLSA-201006-20.NASL
    descriptionThe remote host is affected by the vulnerability described in GLSA-201006-20 (Asterisk: Multiple vulnerabilities) Multiple vulnerabilities have been reported in Asterisk: Nick Baggott reported that Asterisk does not properly process overly long ASCII strings in various packets (CVE-2009-2726). Noam Rathaus and Blake Cornell reported a flaw in the IAX2 protocol implementation (CVE-2009-2346). amorsen reported an input processing error in the RTP protocol implementation (CVE-2009-4055). Patrik Karlsson reported an information disclosure flaw related to the REGISTER message (CVE-2009-3727). A vulnerability was found in the bundled Prototype JavaScript library, related to AJAX calls (CVE-2008-7220). Impact : A remote attacker could exploit these vulnerabilities by sending a specially crafted package, possibly causing a Denial of Service condition, or resulting in information disclosure. Workaround : There is no known workaround at this time.
    last seen2020-06-01
    modified2020-06-02
    plugin id46809
    published2010-06-04
    reporterThis script is Copyright (C) 2010-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/46809
    titleGLSA-201006-20 : Asterisk: Multiple vulnerabilities