dnsmasq < 2.63test1 libvirtd TCP Network Packet Parsing Response DNS Amplification DoS

2015-12-22T00:00:00
ID DNSMASQ_DOS-CVE-2012-3411.NASL
Type nessus
Reporter This script is Copyright (C) 2015-2018 Tenable Network Security, Inc.
Modified 2020-05-02T00:00:00

Description

The remote dnsmasq server is running a version prior to 2.63test1. It is, therefore, affected by a denial of service vulnerability in libvirtd due to improper parsing of malformed network packets. An unauthenticated, remote attacker can exploit this to cause an amplification of a large amount of DNS queries, resulting in a denial of service condition.

                                        
                                            #
# (C) Tenable Network Security, Inc.
#

include("compat.inc");

if (description)
{
 script_id(87594);
 script_version("1.3");
 script_cvs_date("Date: 2018/07/10 14:27:31");

 script_cve_id("CVE-2012-3411");
 script_bugtraq_id(54353);

 script_name(english:"dnsmasq < 2.63test1 libvirtd TCP Network Packet Parsing Response DNS Amplification DoS");
 script_summary(english:"Checks the version of dnsmasq.");

 script_set_attribute(attribute:"synopsis", value:
"The remote DNS / DHCP service is affected by a denial of service
vulnerability.");
 script_set_attribute(attribute:"description", value:
"The remote dnsmasq server is running a version prior to 2.63test1. It
is, therefore, affected by a denial of service vulnerability in
libvirtd due to improper parsing of malformed network packets. An
unauthenticated, remote attacker can exploit this to cause an
amplification of a large amount of DNS queries, resulting in a denial
of service condition.");
 # http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commitdiff;h=54dd393f3938fc0c19088fbd319b95e37d81a2b0
 script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?a481d28c");
 script_set_attribute(attribute:"see_also", value:"http://www.thekelleys.org.uk/dnsmasq/CHANGELOG");
 script_set_attribute(attribute:"solution", value:
"Upgrade to dnsmasq 2.63test1 or later.");
  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_set_attribute(attribute:"vuln_publication_date", value:"2012/06/20");
 script_set_attribute(attribute:"patch_publication_date", value:"2012/06/20");
 script_set_attribute(attribute:"plugin_publication_date", value:"2015/12/22");

 script_set_attribute(attribute:"potential_vulnerability", value:"true");
 script_set_attribute(attribute:"plugin_type", value:"remote");
 script_set_attribute(attribute:"cpe", value:"cpe:/a:thekelleys:dnsmasq");
 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:"DNS");

 script_dependencie("dns_version.nasl");
 script_require_keys("dns_server/version", "Settings/ParanoidReport");
 script_require_ports("Services/dns", 53);

 exit(0);
}

include("audit.inc");
include("misc_func.inc");
include("global_settings.inc");

app_name = "dnsmasq";

port = get_kb_item("Services/udp/dns");
if (!port) port = 53;

if (report_paranoia < 2) audit(AUDIT_PARANOID);

version = get_kb_item_or_exit("dns_server/version");
version = tolower(version);

if (version !~ "dnsmasq-(v)?")
	audit(AUDIT_NOT_LISTEN, app_name, port);

if (version =~ "^dnsmasq-(v)?([0-9\.][01]+|[0-2]\.)([0-6]|[0-6][0-2]|[0-6][0-3]test([^0-9]|$))$")
{
  if (report_verbosity > 0)
  {
    report =
      '\n  Installed version : ' + version +
      '\n  Fixed version     : dnsmasq-v2.63test1' +
      '\n';

    security_warning(port:port, proto:"udp", extra:report);
  }
  else security_warning(port:port, proto:"udp");
}
else audit(AUDIT_INST_VER_NOT_VULN, app_name, version);