Cisco IOS XR Software Multiprotocol Label Switching Packet Vulnerability (cisco-sa-20100324-ldp)

2013-12-14T00:00:00
ID CISCO-SA-20100324-LDP-IOSXR.NASL
Type nessus
Reporter Tenable
Modified 2018-11-15T00:00:00

Description

A device running Cisco IOS XR Software is vulnerable to a remote denial of service (DoS) condition if it is configured for Multiprotocol Label Switching (MPLS) and has support for Label Distribution Protocol (LDP). A crafted LDP UDP packet can cause an affected device running Cisco IOS XR Software to restart the mpls_ldp process. A system is vulnerable if configured with either LDP or Tag Distribution Protocol (TDP). Cisco has released free software updates that address this vulnerability. Workarounds that mitigate this vulnerability are available.

                                        
                                            #TRUSTED 074442398547fc69de9942132ea727eb34ef9630c7d5195280608442b769cd4e3eec0cea06e1c502e2be85a49881e64c591458840765ce2106bb49356a8413b0262f9772b9f2e38fb81998cee16483a33f8cd82c0860bf624693d67c645a32ce74c42486d24faf8198cfbdd7a646e247caef9a70324381408f54a9a48b31b2fc73ac6f565486733cc256eb2717048da034b40da502c9a34f54d9e6a7293333c3e0d25cc69f684b4750e45aa6122f71b9ac688764a74eebe018446b6c0581aefe2295bd79bd026c2762d74c43afdf7504280893d26589d03618f7764838ca5db892d28fd638e6f5484ee8f4a4d8ee8c48324323d70e2af86aa6ccf8528d0703cdbb04f8751cd4fa998f095a41e9e63e6eda6b1a3f51d91d5fc2545627300d68289c72f3439ad7a12edf41ef6db8c56b7f5022688866188004999903823e0eb4ece5442932914b10f4e5262e12c76abae9a32e38fcc835e7caab55f43de49b894931344d033fb62957274c1fdd14d67b89fd7c328242e4d4717c70491d86646b9c8197016a70a640b6979a50f85df685cc8893a6683d40adbb1499d07a1c681feae2c9976cdd6f158103c6d92bb43356337bbf304c93508d52ca579bc9596e8ff725e265a63c8ee62e2035e9fd62d445c11c96b6b9bcb9623c27e5fe499fd0b8d16c1df995bba796886f0c0806f1a5b576737d3c9e7bad2121eb4e4dacd888a8e1
#
# (C) Tenable Network Security, Inc.
#
# The descriptive text and package checks in this plugin were
# extracted from Cisco Security Advisory cisco-sa-20100324-ldp.
# The text itself is copyright (C) Cisco
#

include("compat.inc");

if (description)
{
  script_id(71434);
  script_version("1.5");
  script_set_attribute(attribute:"plugin_modification_date", value:"2018/11/15");

  script_cve_id("CVE-2010-0576");
  script_bugtraq_id(38938);
  script_xref(name:"CISCO-BUG-ID", value:"CSCsj25893");
  script_xref(name:"CISCO-SA", value:"cisco-sa-20100324-ldp");

  script_name(english:"Cisco IOS XR Software Multiprotocol Label Switching Packet Vulnerability (cisco-sa-20100324-ldp)");
  script_summary(english:"Checks the IOS XR version");

  script_set_attribute(
    attribute:"synopsis", 
    value:"The remote device is missing a vendor-supplied security patch."
  );
  script_set_attribute(
    attribute:"description", 
    value:
"A device running Cisco IOS XR Software is vulnerable to a remote denial
of service (DoS) condition if it is configured for Multiprotocol Label
Switching (MPLS) and has support for Label Distribution Protocol (LDP). 
A crafted LDP UDP packet can cause an affected device running Cisco IOS
XR Software to restart the mpls_ldp process.  A system is vulnerable if
configured with either LDP or Tag Distribution Protocol (TDP).  Cisco
has released free software updates that address this vulnerability. 
Workarounds that mitigate this vulnerability are available."
  );
  # https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20100324-ldp
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?1d8fad9b");
  script_set_attribute(
    attribute:"solution", 
    value:
"Apply the relevant patch referenced in Cisco Security Advisory
cisco-sa-20100324-ldp."
  );
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/I:N/A:C");
  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:"2010/03/24");
  script_set_attribute(attribute:"patch_publication_date", value:"2010/03/24");
  script_set_attribute(attribute:"plugin_publication_date", value:"2013/12/14");

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:cisco:ios_xr");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_copyright(english:"This script is Copyright (C) 2013-2018 and is owned by Tenable, Inc. or an Affiliate thereof.");
  script_family(english:"CISCO");

  script_dependencies("cisco_ios_xr_version.nasl");
  script_require_keys("Host/Cisco/IOS-XR/Version");

  exit(0);
}

include("audit.inc");
include("cisco_func.inc");
include("cisco_kb_cmd_func.inc");

flag = 0;
report = "";
override = 0;

fixed_ver = "";
cbi = "CSCsj25893";

version = get_kb_item_or_exit("Host/Cisco/IOS-XR/Version");
if (
     (cisco_gen_ver_compare(a:"3.5.0", b:version) >= 0) &&
     (cisco_gen_ver_compare(a:"3.5.2", b:version) < 0)
   ) flag ++;
fixed_ver = "3.5.2.6";

if (get_kb_item("Host/local_checks_enabled"))
{
  if (flag)
  {
    flag = 0;
    buf = cisco_command_kb_item("Host/Cisco/Config/show_running-config_mpls", "show running-config mpls");
    if (check_cisco_result(buf))
    {
      if (preg(multiline:TRUE, pattern:"mpls ldp", string:buf)) { flag = 1; }
    } else if (cisco_needs_enable(buf)) { flag = 1; override = 1; }
  }

  if (flag)
  {
    flag = 0;
    # Cisco IOS XR
    buf = cisco_command_kb_item("Host/Cisco/Config/show_udp_brief", "show udp brief");
    if (check_cisco_result(buf))
    {
      if (preg(multiline:TRUE, pattern:":646\s", string:buf)) { flag = 1; }
    } else if (cisco_needs_enable(buf)) { flag = 1; override = 1; }
  }
}

if (flag)
{
  report =
    '\n  Cisco Bug ID        : ' + cbi +
    '\n    Installed Release : ' + version +
    '\n    Fixed Release     : ' + fixed_ver + '\n';

  security_hole(port:0, extra:report + cisco_caveat(override));
  exit(0);

}
else audit(AUDIT_HOST_NOT, "affected");