Cisco IOS Software TFTP DoS (cisco-sa-20150722-tftp)

2015-07-30T00:00:00
ID CISCO-SA-20150722-TFTP-IOS.NASL
Type nessus
Reporter Tenable
Modified 2018-02-02T00:00:00

Description

According to its self-reported version, the Cisco IOS software running on the remote device is affected by a denial of service vulnerability in the TFTP server functionality due to incorrect management of memory when handling TFTP requests. A remote, unauthenticated attacker can exploit this by sending a large amount of TFTP requests to cause the remote device to reload or hang, resulting in a denial of service condition.

                                        
                                            #TRUSTED 49831147ebc6af9c7c5f53c47ad6b70fefe66aeaa89da823e6e1530fc2c367133dfe42995cec3d6fa2fc4ec2eaa3e0403b412ed341183ceffdbf33ffdd94c271c9dc1d87800c17b47a6e27bbaee282b2c2cdfac752a31d0c2aa668caca7515c22c2404d0c9b22a6dd7d320c5d299b0f86807c980b741d3103bca6d574523cb71be1b877f5aaadb4ea4a93ca5bb6b53af2b9a285b430e143d58691f905eb21057b24cec2716ae0d3ae04c953279c351dafac187b865dc41dd55b64438f84c0b01bf7877ad3f9de72aef8f15553fb0f0bcf85fe4eb1baa9573e9843d920e7544bf5d57506807643d05930baf500e1a8e5870689442d820fc5385c36db1f92f517bddad2763adeff29caf6c509be7538dd37d47101e38622c27de11cb67b64d958e2a2df65aca7b677a7181e16cae7faebd48095e1eda92fcd34fa0c7a893d50f89aef2a7a1783519069a85e9aba4da0ac98ea8f901e7d49d16fcad020e5c2d83ef6e1dd0750d1247b06d349f4bd4bb15c673d8acffc95be6dbed5716eb682211d046f61fe5c075ac19560de3bc85c56f2850c4fc2dd8dd06684e836207566dfe6fe4b0a3f8e05842b78932569c78f256966871b5422cfe22f592d4a30a84611dfbd5771d9ce8dbd587ac6ecfedd871c3445c6ebc619a089965bc3bef37e2c9d183ec9e708b87d4eb71a6c1a45be0d396537c5cea1d9b7d5c32770e156b3a461e64
#
# (C) Tenable Network Security, Inc.
#

include("compat.inc");

if (description)
{
  script_id(85124);
  script_version("1.9");
  script_set_attribute(attribute:"plugin_modification_date", value:"2018/02/02");

  script_cve_id("CVE-2015-0681");
  script_bugtraq_id(75995);
  script_osvdb_id(125122);
  script_xref(name:"CISCO-BUG-ID", value:"CSCts66733");
  script_xref(name:"CISCO-SA", value:"cisco-sa-20150722-tftp");

  script_name(english:"Cisco IOS Software TFTP DoS (cisco-sa-20150722-tftp)");
  script_summary(english:"Checks the IOS version.");

  script_set_attribute(attribute:"synopsis", value:
"The remote device is missing a vendor-supplied security patch.");
  script_set_attribute(attribute:"description", value:
"According to its self-reported version, the Cisco IOS software running
on the remote device is affected by a denial of service vulnerability
in the TFTP server functionality due to incorrect management of memory
when handling TFTP requests. A remote, unauthenticated attacker can
exploit this by sending a large amount of TFTP requests to cause the
remote device to reload or hang, resulting in a denial of service
condition.");
  # http://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20150722-tftp
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?18ef700f");
  script_set_attribute(attribute:"see_also", value:"https://tools.cisco.com/bugsearch/bug/CSCts66733");
  script_set_attribute(attribute:"solution", value:
"Apply the relevant patch referenced in Cisco Security Advisory
cisco-sa-20150722-tftp.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:N/I:N/A:C");

  script_set_attribute(attribute:"plugin_type", value:"combined");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:cisco:ios");

  script_set_attribute(attribute:"vuln_publication_date", value:"2015/07/22");
  script_set_attribute(attribute:"patch_publication_date", value:"2015/07/22");
  script_set_attribute(attribute:"plugin_publication_date", value:"2015/07/30");

  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_copyright(english:"This script is Copyright (C) 2015-2018 Tenable Network Security, Inc.");
  script_family(english:"CISCO");

  script_dependencies("cisco_ios_version.nasl");
  script_require_keys("Host/Cisco/IOS/Version");

  exit(0);
}

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

ver = get_kb_item_or_exit("Host/Cisco/IOS/Version");

app = "Cisco IOS";
cbi = "CSCts66733";
fixed_ver = NULL;

if (
  ver == "12.2(32.8.11)SX507" || # Bug report
  ver == "12.2(44)SQ1" || # Vulnerability Alert
  ver == "12.2(50)SY" ||
  ver == "12.2(50)SY1" ||
  ver == "12.2(50)SY2" ||
  ver == "12.2(50)SY3" ||
  ver == "12.2(50)SY4" ||
  ver == "12.2(33)XN" ||
  ver == "12.2(33)XN1" ||
  ver == "12.4(24)GC1" ||
  ver == "12.4(24)GC3" ||
  ver == "12.4(24)GC3a" ||
  ver == "12.4(25e)JAM1" ||
  ver == "12.4(25e)JAO5m" ||
  ver == "12.4(23)JY" ||
  ver == "12.4(24)T" ||
  ver == "15.0(2)ED1" ||
  ver == "15.0(2)EY3" ||
  ver == "15.0(1)M1" ||
  ver == "15.0(1)M4" ||
  ver == "15.0(1)SY" ||
  ver == "15.0(1)XA" ||
  ver == "15.0(1)XA2" ||
  ver == "15.0(1)XA3" ||
  ver == "15.0(1)XA4" ||
  ver == "15.0(1)XA5" ||
  ver == "15.1(3)SVF4a" ||
  ver == "15.1(3)SVF4b" ||
  ver == "15.1(3)SVG3b" ||
  ver == "15.1(3)SVH2" ||
  ver == "15.1(3)SVI" ||
  ver == "15.1(3)SVI1" ||
  ver == "15.1(1)T" ||
  ver == "15.1(1)T1" ||
  ver == "15.1(1)T2" ||
  ver == "15.1(2)T" ||
  ver == "15.1(2)T0a" ||
  ver == "15.1(2)T1" ||
  ver == "15.1(2)T2" ||
  ver == "15.1(2)T2a" ||
  ver == "15.1(3)T" ||
  ver == "15.2(2)JB1" ||
  ver == "15.2(1)SC1a" ||
  ver == "15.2(1)SC2" ||
  ver == "15.2(1)SD6a" ||
  ver == "15.2(1)SD8" ||
  ver == "15.2(1)S2" || # IOS-XE to IOS Mapping using Internet resources
  ver == "15.2(1)S1" ||
  ver == "15.2(1)S" ||
  ver == "15.1(3)S6" ||
  ver == "15.1(3)S5" ||
  ver == "15.1(3)S4" ||
  ver == "15.1(3)S3" ||
  ver == "15.1(3)S2" ||
  ver == "15.1(3)S1" ||
  ver == "15.1(3)S0a" ||
  ver == "15.1(3)S" ||
  ver == "15.1(2)S2" ||
  ver == "15.1(2)S1" ||
  ver == "15.1(2)S" ||
  ver == "15.1(1)S2" ||
  ver == "15.1(1)S1" ||
  ver == "15.1(1)S" ||
  ver == "15.0(1)S4a" ||
  ver == "15.0(1)S4" ||
  ver == "15.0(1)S3" ||
  ver == "15.0(1)S2" ||
  ver == "15.0(1)S1" ||
  ver == "15.0(1)S" ||
  ver == "12.2(33)XNF2" ||
  ver == "12.2(33)XNF1" ||
  ver == "12.2(33)XNF" ||
  ver == "12.2(33)XNE2" ||
  ver == "12.2(33)XNE1" ||
  ver == "12.2(33)XNE" ||
  ver == "15.0(1)EX" || # IOS-XE to IOS mapping using info in cisco_ios_xe_version.nasl
  ver == "15.0(1)EX1" ||
  ver == "15.0(1)EX2" ||
  ver == "15.0(1)EX3" ||
  ver == "15.0(1)XO" ||
  ver == "15.0(1)XO1" ||
  ver == "15.0(2)SG" ||
  ver == "15.0(2)SG1" ||
  ver == "15.0(2)XO" ||
  ver == "15.1(1)SG" ||
  ver == "15.1(1)SG1" ||
  ver == "15.2(1)S1" ||
  ver == "15.2(1)S2" ||
  # Added due to VULN-81062
  ver == "122-55.SE10" ||
  ver == "122-33.SXI14" ||
  ver == "15.0(2)SE7" ||
  ver == "15.1(4)M10" ||
  ver == "15.0(2)SG10" ||
  # Added due to VULN-81062-2
  ver == "12.2(55)SE10" ||
  ver == "12.2(33)SXI14"
)
  fixed_ver = "Refer to vendor.";

if (isnull(fixed_ver)) audit(AUDIT_INST_VER_NOT_VULN, app, ver);

flag     = TRUE;
override = FALSE;

if (get_kb_item("Host/local_checks_enabled"))
{
  flag = FALSE;
  # TFTP Check
  #  Router#show running-config | include ^tftp-server
  #  tftp-server flash:c2800nm-adventerprisek9-mz.124-1
  #  tftp-server flash:
  buf = cisco_command_kb_item("Host/Cisco/Config/show_running-config", "show running-config");
  if (check_cisco_result(buf))
  {
    if (preg(multiline:TRUE, pattern:"tftp-server flash:", string:buf))
      flag = TRUE;
  }
  else if (cisco_needs_enable(buf)) override = TRUE;
}
else override = TRUE;

if (!flag && !override) audit(AUDIT_HOST_NOT, "affected because TFTP is not enabled");

if (report_verbosity > 0)
{
  report +=
    '\n  Cisco bug ID      : ' + cbi +
    '\n  Installed release : ' + ver +
    '\n  Fixed release     : ' + fixed_ver +
    '\n';
  security_hole(port:0, extra:report+cisco_caveat(override));
}
else security_hole(port:0, extra:cisco_caveat(override));