Vulnerabilities > CVE-2014-9751 - Improper Input Validation vulnerability in multiple products

047910
CVSS 6.8 - MEDIUM
Attack vector
NETWORK
Attack complexity
MEDIUM
Privileges required
NONE
Confidentiality impact
PARTIAL
Integrity impact
PARTIAL
Availability impact
PARTIAL

Summary

The read_network_packet function in ntp_io.c in ntpd in NTP 4.x before 4.2.8p1 on Linux and OS X does not properly determine whether a source IP address is an IPv6 loopback address, which makes it easier for remote attackers to spoof restricted packets, and read or write to the runtime state, by leveraging the ability to reach the ntpd machine's network interface with a packet from the ::1 address.

Common Weakness Enumeration (CWE)

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.
  • Server Side Include (SSI) Injection
    An attacker can use Server Side Include (SSI) Injection to send code to a web application that then gets executed by the web server. Doing so enables the attacker to achieve similar results to Cross Site Scripting, viz., arbitrary code execution and information disclosure, albeit on a more limited scale, since the SSI directives are nowhere near as powerful as a full-fledged scripting language. Nonetheless, the attacker can conveniently gain access to sensitive files, such as password files, and execute shell commands.
  • Cross Zone Scripting
    An attacker is able to cause a victim to load content into their web-browser that bypasses security zone controls and gain access to increased privileges to execute scripting code or other web objects such as unsigned ActiveX controls or applets. This is a privilege elevation attack targeted at zone-based web-browser security. In a zone-based model, pages belong to one of a set of zones corresponding to the level of privilege assigned to that page. Pages in an untrusted zone would have a lesser level of access to the system and/or be restricted in the types of executable content it was allowed to invoke. In a cross-zone scripting attack, a page that should be assigned to a less privileged zone is granted the privileges of a more trusted zone. This can be accomplished by exploiting bugs in the browser, exploiting incorrect configuration in the zone controls, through a cross-site scripting attack that causes the attackers' content to be treated as coming from a more trusted page, or by leveraging some piece of system functionality that is accessible from both the trusted and less trusted zone. This attack differs from "Restful Privilege Escalation" in that the latter correlates to the inadequate securing of RESTful access methods (such as HTTP DELETE) on the server, while cross-zone scripting attacks the concept of security zones as implemented by a browser.
  • Cross Site Scripting through Log Files
    An attacker may leverage a system weakness where logs are susceptible to log injection to insert scripts into the system's logs. If these logs are later viewed by an administrator through a thin administrative interface and the log data is not properly HTML encoded before being written to the page, the attackers' scripts stored in the log will be executed in the administrative interface with potentially serious consequences. This attack pattern is really a combination of two other attack patterns: log injection and stored cross site scripting.
  • Command Line Execution through SQL Injection
    An attacker uses standard SQL injection methods to inject data into the command line for execution. This could be done directly through misuse of directives such as MSSQL_xp_cmdshell or indirectly through injection of data into the database that would be interpreted as shell commands. Sometime later, an unscrupulous backend application (or could be part of the functionality of the same application) fetches the injected data stored in the database and uses this data as command line arguments without performing proper validation. The malicious data escapes that data plane by spawning new commands to be executed on the host.

Nessus

  • NASL familyMisc.
    NASL idNTP_4_2_8.NASL
    descriptionThe version of the remote NTP server is 4.x prior to 4.2.8p1. It is, therefore, affected by the following vulnerabilities : - A security weakness exists due to the config_auth() function improperly generating default keys when no authentication key is defined in the ntp.conf file. Key size is limited to 31 bits and the insecure ntp_random() function is used, resulting in cryptographically-weak keys with insufficient entropy. A remote attacker can exploit this to defeat cryptographic protection mechanisms via a brute-force attack. (CVE-2014-9293) - A security weakness exists due the use of a weak seed to prepare a random number generator used to generate symmetric keys. This allows a remote attacker to defeat cryptographic protection mechanisms via a brute-force attack. (CVE-2014-9294) - Multiple stack-based buffer overflow conditions exist due to improper validation of user-supplied input when handling packets in the crypto_recv(), ctl_putdata(), and configure() functions when using autokey authentication. A remote attacker can exploit this, via a specially crafted packet, to cause a denial of service condition or the execution of arbitrary code. (CVE-2014-9295) - A unspecified vulnerability exists due to missing return statements in the receive() function, resulting in continued processing even when an authentication error is encountered. This allows a remote attacker, via specially crafted packets, to trigger unintended association changes. (CVE-2014-9296) - An information disclosure vulnerability exists due to improper validation of the
    last seen2020-06-01
    modified2020-06-02
    plugin id81981
    published2015-03-20
    reporterThis script is Copyright (C) 2015-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/81981
    titleNetwork Time Protocol Daemon (ntpd) 4.x < 4.2.8p1 Multiple Vulnerabilities
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(81981);
      script_version("1.10");
      script_cvs_date("Date: 2018/07/16 14:09:13");
    
      script_cve_id(
        "CVE-2014-9293",
        "CVE-2014-9294",
        "CVE-2014-9295",
        "CVE-2014-9296",
        "CVE-2014-9750",
        "CVE-2014-9751"
      );
      script_bugtraq_id(
        71757,
        71758,
        71761,
        71762,
        72583,
        72584
      );
      script_xref(name:"CERT", value:"852879");
    
      script_name(english:"Network Time Protocol Daemon (ntpd) 4.x < 4.2.8p1 Multiple Vulnerabilities");
      script_summary(english:"Checks for a vulnerable NTP server.");
    
      script_set_attribute(attribute:"synopsis", value:
    "The remote NTP server is affected by multiple vulnerabilities.");
      script_set_attribute(attribute:"description", value:
    "The version of the remote NTP server is 4.x prior to 4.2.8p1. It is,
    therefore, affected by the following vulnerabilities :
    
      - A security weakness exists due to the config_auth()
        function improperly generating default keys when no
        authentication key is defined in the ntp.conf file.
        Key size is limited to 31 bits and the insecure
        ntp_random() function is used, resulting in
        cryptographically-weak keys with insufficient entropy. A
        remote attacker can exploit this to defeat cryptographic
        protection mechanisms via a brute-force attack.
        (CVE-2014-9293)
    
      - A security weakness exists due the use of a weak seed to
        prepare a random number generator used to generate
        symmetric keys. This allows a remote attacker to defeat
        cryptographic protection mechanisms via a brute-force
        attack. (CVE-2014-9294)
    
      - Multiple stack-based buffer overflow conditions exist
        due to improper validation of user-supplied input when
        handling packets in the crypto_recv(), ctl_putdata(),
        and configure() functions when using autokey
        authentication. A remote attacker can exploit this, via
        a specially crafted packet, to cause a denial of service
        condition or the execution of arbitrary code.
        (CVE-2014-9295)
    
      - A unspecified vulnerability exists due to missing return
        statements in the receive() function, resulting in 
        continued processing even when an authentication error
        is encountered. This allows a remote attacker, via
        specially crafted packets, to trigger unintended
        association changes. (CVE-2014-9296)
    
      - An information disclosure vulnerability exists due to
        improper validation of the 'vallen' value in extension
        fields in ntp_crypto.c. A remote attacker can exploit
        this to disclose sensitive information. (CVE-2014-9750)
    
      - A security bypass vulnerability exists due to a failure
        to restrict ::1 source addresses on IPv6 interfaces. A
        remote attacker can exploit this to bypass configured
        ACLs based on ::1. (CVE-2014-9751)
    
    Note that CVE-2014-9750 and CVE-2014-9751 supersede the discontinued
    identifiers CVE-2014-9297 and CVE-2014-9298, which were originally
    cited in the vendor advisory.");
      script_set_attribute(attribute:"see_also", value:"http://support.ntp.org/bin/view/Main/SecurityNotice");
      script_set_attribute(attribute:"solution", value:
    "Upgrade to NTP version 4.2.8p1 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_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/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:"2014/12/19");
      script_set_attribute(attribute:"patch_publication_date", value:"2014/12/19");
      script_set_attribute(attribute:"plugin_publication_date", value:"2015/03/20");
    
      script_set_attribute(attribute:"plugin_type", value:"remote");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:ntp:ntp");
      script_set_attribute(attribute:"potential_vulnerability", value:"true");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"Misc.");
    
      script_copyright(english:"This script is Copyright (C) 2015-2018 Tenable Network Security, Inc.");
    
      script_dependencies("ntp_open.nasl");
      script_require_keys("NTP/Running", "Settings/ParanoidReport");
    
      exit(0);
    }
    
    include("audit.inc");
    include("global_settings.inc");
    include("misc_func.inc");
    
    # Make sure NTP server is running
    get_kb_item_or_exit('NTP/Running');
    
    app_name = "NTP Server";
    
    port = get_kb_item("Services/udp/ntp");
    if (!port) port = 123;
    
    version = get_kb_item_or_exit("Services/ntp/version");
    if (version == 'unknown') audit(AUDIT_UNKNOWN_APP_VER, app_name);
    
    match = eregmatch(string:version, pattern:"([0-9a-z.]*)");
    if (isnull(match) || empty_or_null(match[1])) audit(AUDIT_UNKNOWN_APP_VER, app_name);
    
    # Paranoia check
    if (report_paranoia < 2) audit(AUDIT_PARANOID);
    
    ver = match[1];
    verfields = split(ver, sep:".", keep:FALSE);
    major = int(verfields[0]);
    minor = int(verfields[1]);
    if ('p' >< verfields[2])
    {
      revpatch = split(verfields[2], sep:"p", keep:FALSE);
      rev = int(revpatch[0]);
      patch = int(revpatch[1]);
    }
    else
    {
      rev = verfields[2];
      patch = 0;
    }
    
    # This vulnerability affects NTP 4.x < 4.2.8p1
    if (
      (major == 4 && minor < 2) ||
      (major == 4 && minor == 2 && rev < 8) ||
      (major == 4 && minor == 2 && rev == 8 && patch < 1)
    )
    {
      fix = "4.2.8p1";
    }
    else audit(AUDIT_INST_VER_NOT_VULN, app_name, version);
    
    report =
      '\n  Installed version : ' + version +
      '\n  Fixed version     : ' + fix +
      '\n';
    
    security_report_v4(
      port  : port,
      proto : "udp",
      extra : report,
      severity : SECURITY_HOLE
    );
    exit(0);
    
  • NASL familyOracle Linux Local Security Checks
    NASL idORACLELINUX_ELSA-2015-1459.NASL
    descriptionFrom Red Hat Security Advisory 2015:1459 : Updated ntp packages that fix multiple security issues, several bugs, and add two enhancements are now available for Red Hat Enterprise Linux 6. Red Hat Product Security has rated this update as having Moderate security impact. Common Vulnerability Scoring System (CVSS) base scores, which give detailed severity ratings, are available for each vulnerability from the CVE links in the References section. The Network Time Protocol (NTP) is used to synchronize a computer
    last seen2020-06-01
    modified2020-06-02
    plugin id85111
    published2015-07-30
    reporterThis script is Copyright (C) 2015-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/85111
    titleOracle Linux 6 : ntp (ELSA-2015-1459)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from Red Hat Security Advisory RHSA-2015:1459 and 
    # Oracle Linux Security Advisory ELSA-2015-1459 respectively.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(85111);
      script_version("2.9");
      script_cvs_date("Date: 2019/09/27 13:00:36");
    
      script_cve_id("CVE-2014-9297", "CVE-2014-9298", "CVE-2014-9750", "CVE-2014-9751", "CVE-2015-1798", "CVE-2015-1799", "CVE-2015-3405");
      script_xref(name:"RHSA", value:"2015:1459");
      script_xref(name:"TRA", value:"TRA-2015-04");
    
      script_name(english:"Oracle Linux 6 : ntp (ELSA-2015-1459)");
      script_summary(english:"Checks rpm output for the updated packages");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Oracle Linux host is missing one or more security updates."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "From Red Hat Security Advisory 2015:1459 :
    
    Updated ntp packages that fix multiple security issues, several bugs,
    and add two enhancements are now available for Red Hat Enterprise
    Linux 6.
    
    Red Hat Product Security has rated this update as having Moderate
    security impact. Common Vulnerability Scoring System (CVSS) base
    scores, which give detailed severity ratings, are available for each
    vulnerability from the CVE links in the References section.
    
    The Network Time Protocol (NTP) is used to synchronize a computer's
    time with another referenced time source.
    
    It was found that because NTP's access control was based on a source
    IP address, an attacker could bypass source IP restrictions and send
    malicious control and configuration packets by spoofing ::1 addresses.
    (CVE-2014-9298)
    
    A denial of service flaw was found in the way NTP hosts that were
    peering with each other authenticated themselves before updating their
    internal state variables. An attacker could send packets to one peer
    host, which could cascade to other peers, and stop the synchronization
    process among the reached peers. (CVE-2015-1799)
    
    A flaw was found in the way the ntp-keygen utility generated MD5
    symmetric keys on big-endian systems. An attacker could possibly use
    this flaw to guess generated MD5 keys, which could then be used to
    spoof an NTP client or server. (CVE-2015-3405)
    
    A stack-based buffer overflow was found in the way the NTP autokey
    protocol was implemented. When an NTP client decrypted a secret
    received from an NTP server, it could cause that client to crash.
    (CVE-2014-9297)
    
    It was found that ntpd did not check whether a Message Authentication
    Code (MAC) was present in a received packet when ntpd was configured
    to use symmetric cryptographic keys. A man-in-the-middle attacker
    could use this flaw to send crafted packets that would be accepted by
    a client or a peer without the attacker knowing the symmetric key.
    (CVE-2015-1798)
    
    The CVE-2015-1798 and CVE-2015-1799 issues were discovered by Miroslav
    Lichvar of Red Hat.
    
    Bug fixes :
    
    * The ntpd daemon truncated symmetric keys specified in the key file
    to 20 bytes. As a consequence, it was impossible to configure NTP
    authentication to work with peers that use longer keys. The maximum
    length of keys has now been changed to 32 bytes. (BZ#1053551)
    
    * The ntp-keygen utility used the exponent of 3 when generating RSA
    keys, and generating RSA keys failed when FIPS mode was enabled.
    ntp-keygen has been modified to use the exponent of 65537, and
    generating keys in FIPS mode now works as expected. (BZ#1184421)
    
    * The ntpd daemon included a root delay when calculating its root
    dispersion. Consequently, the NTP server reported larger root
    dispersion than it should have and clients could reject the source
    when its distance reached the maximum synchronization distance (1.5
    seconds by default). Calculation of root dispersion has been fixed,
    the root dispersion is now reported correctly, and clients no longer
    reject the server due to a large synchronization distance.
    (BZ#1045376)
    
    * The ntpd daemon dropped incoming NTP packets if their source port
    was lower than 123 (the NTP port). Clients behind Network Address
    Translation (NAT) were unable to synchronize with the server if their
    source port was translated to ports below 123. With this update, ntpd
    no longer checks the source port number. (BZ#1171630)
    
    Enhancements :
    
    * This update introduces configurable access of memory segments used
    for Shared Memory Driver (SHM) reference clocks. Previously, only the
    first two memory segments were created with owner-only access,
    allowing just two SHM reference clocks to be used securely on a
    system. Now, the owner-only access to SHM is configurable with the
    'mode' option, and it is therefore possible to use more SHM reference
    clocks securely. (BZ#1122015)
    
    * Support for nanosecond resolution has been added to the SHM
    reference clock. Prior to this update, when a Precision Time Protocol
    (PTP) hardware clock was used as a time source to synchronize the
    system clock (for example, with the timemaster service from the
    linuxptp package), the accuracy of the synchronization was limited due
    to the microsecond resolution of the SHM protocol. The nanosecond
    extension in the SHM protocol now enables sub-microsecond
    synchronization of the system clock. (BZ#1117704)"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://oss.oracle.com/pipermail/el-errata/2015-July/005240.html"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.tenable.com/security/research/tra-2015-04"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected ntp packages.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P");
      script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/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:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:oracle:linux:ntp");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:oracle:linux:ntp-doc");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:oracle:linux:ntp-perl");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:oracle:linux:ntpdate");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:oracle:linux:6");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2015/04/08");
      script_set_attribute(attribute:"patch_publication_date", value:"2015/07/29");
      script_set_attribute(attribute:"plugin_publication_date", value:"2015/07/30");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2015-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"Oracle Linux Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/OracleLinux", "Host/RedHat/release", "Host/RedHat/rpm-list");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("rpm.inc");
    
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    if (!get_kb_item("Host/OracleLinux")) audit(AUDIT_OS_NOT, "Oracle Linux");
    release = get_kb_item("Host/RedHat/release");
    if (isnull(release) || !pregmatch(pattern: "Oracle (?:Linux Server|Enterprise Linux)", string:release)) audit(AUDIT_OS_NOT, "Oracle Linux");
    os_ver = pregmatch(pattern: "Oracle (?:Linux Server|Enterprise Linux) .*release ([0-9]+(\.[0-9]+)?)", string:release);
    if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "Oracle Linux");
    os_ver = os_ver[1];
    if (! preg(pattern:"^6([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Oracle Linux 6", "Oracle Linux " + os_ver);
    
    if (!get_kb_item("Host/RedHat/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
    if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Oracle Linux", cpu);
    
    flag = 0;
    if (rpm_check(release:"EL6", reference:"ntp-4.2.6p5-5.el6")) flag++;
    if (rpm_check(release:"EL6", reference:"ntp-doc-4.2.6p5-5.el6")) flag++;
    if (rpm_check(release:"EL6", reference:"ntp-perl-4.2.6p5-5.el6")) flag++;
    if (rpm_check(release:"EL6", reference:"ntpdate-4.2.6p5-5.el6")) flag++;
    
    
    if (flag)
    {
      if (report_verbosity > 0) security_warning(port:0, extra:rpm_report_get());
      else security_warning(0);
      exit(0);
    }
    else
    {
      tested = pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "ntp / ntp-doc / ntp-perl / ntpdate");
    }
    
  • NASL familyRed Hat Local Security Checks
    NASL idREDHAT-RHSA-2015-2231.NASL
    descriptionUpdated ntp packages that fix multiple security issues, several bugs, and add various enhancements are now available for Red Hat Enterprise Linux 7. Red Hat Product Security has rated this update as having Moderate security impact. Common Vulnerability Scoring System (CVSS) base scores, which give detailed severity ratings, are available for each vulnerability from the CVE links in the References section. The Network Time Protocol (NTP) is used to synchronize a computer
    last seen2020-06-01
    modified2020-06-02
    plugin id86975
    published2015-11-20
    reporterThis script is Copyright (C) 2015-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/86975
    titleRHEL 7 : ntp (RHSA-2015:2231)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Red Hat Security Advisory RHSA-2015:2231. The text 
    # itself is copyright (C) Red Hat, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(86975);
      script_version("2.13");
      script_cvs_date("Date: 2019/10/24 15:35:40");
    
      script_cve_id("CVE-2014-9297", "CVE-2014-9298", "CVE-2014-9750", "CVE-2014-9751", "CVE-2015-1798", "CVE-2015-1799", "CVE-2015-3405");
      script_xref(name:"RHSA", value:"2015:2231");
      script_xref(name:"TRA", value:"TRA-2015-04");
    
      script_name(english:"RHEL 7 : ntp (RHSA-2015:2231)");
      script_summary(english:"Checks the rpm output for the updated packages");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Red Hat host is missing one or more security updates."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Updated ntp packages that fix multiple security issues, several bugs,
    and add various enhancements are now available for Red Hat Enterprise
    Linux 7.
    
    Red Hat Product Security has rated this update as having Moderate
    security impact. Common Vulnerability Scoring System (CVSS) base
    scores, which give detailed severity ratings, are available for each
    vulnerability from the CVE links in the References section.
    
    The Network Time Protocol (NTP) is used to synchronize a computer's
    time with another referenced time source. These packages include the
    ntpd service which continuously adjusts system time and utilities used
    to query and configure the ntpd service.
    
    It was found that because NTP's access control was based on a source
    IP address, an attacker could bypass source IP restrictions and send
    malicious control and configuration packets by spoofing ::1 addresses.
    (CVE-2014-9298, CVE-2014-9751)
    
    A denial of service flaw was found in the way NTP hosts that were
    peering with each other authenticated themselves before updating their
    internal state variables. An attacker could send packets to one peer
    host, which could cascade to other peers, and stop the synchronization
    process among the reached peers. (CVE-2015-1799)
    
    A flaw was found in the way the ntp-keygen utility generated MD5
    symmetric keys on big-endian systems. An attacker could possibly use
    this flaw to guess generated MD5 keys, which could then be used to
    spoof an NTP client or server. (CVE-2015-3405)
    
    A stack-based buffer overflow was found in the way the NTP autokey
    protocol was implemented. When an NTP client decrypted a secret
    received from an NTP server, it could cause that client to crash.
    (CVE-2014-9297, CVE-2014-9750)
    
    It was found that ntpd did not check whether a Message Authentication
    Code (MAC) was present in a received packet when ntpd was configured
    to use symmetric cryptographic keys. A man-in-the-middle attacker
    could use this flaw to send crafted packets that would be accepted by
    a client or a peer without the attacker knowing the symmetric key.
    (CVE-2015-1798)
    
    The CVE-2015-1798 and CVE-2015-1799 issues were discovered by Miroslav
    Lichvar of Red Hat.
    
    Bug fixes :
    
    * The ntpd service truncated symmetric keys specified in the key file
    to 20 bytes. As a consequence, it was impossible to configure NTP
    authentication to work with peers that use longer keys. With this
    update, the maximum key length has been changed to 32 bytes.
    (BZ#1191111)
    
    * The ntpd service could previously join multicast groups only when
    starting, which caused problems if ntpd was started during system boot
    before network was configured. With this update, ntpd attempts to join
    multicast groups every time network configuration is changed.
    (BZ#1207014)
    
    * Previously, the ntp-keygen utility used the exponent of 3 when
    generating RSA keys. Consequently, generating RSA keys failed when
    FIPS mode was enabled. With this update, ntp-keygen has been modified
    to use the exponent of 65537, and generating keys in FIPS mode now
    works as expected. (BZ#1191116)
    
    * The ntpd service dropped incoming NTP packets if their source port
    was lower than 123 (the NTP port). With this update, ntpd no longer
    checks the source port number, and clients behind NAT are now able to
    correctly synchronize with the server. (BZ#1171640)
    
    Enhancements :
    
    * This update adds support for configurable Differentiated Services
    Code Points (DSCP) in NTP packets, simplifying configuration in large
    networks where different NTP implementations or versions are using
    different DSCP values. (BZ#1202828)
    
    * This update adds the ability to configure separate clock stepping
    thresholds for each direction (backward and forward). Use the
    'stepback' and 'stepfwd' options to configure each threshold.
    (BZ#1193154)
    
    * Support for nanosecond resolution has been added to the Structural
    Health Monitoring (SHM) reference clock. Prior to this update, when a
    Precision Time Protocol (PTP) hardware clock was used as a time source
    to synchronize the system clock, the accuracy of the synchronization
    was limited due to the microsecond resolution of the SHM protocol. The
    nanosecond extension in the SHM protocol now allows sub-microsecond
    synchronization of the system clock. (BZ#1117702)
    
    All ntp users are advised to upgrade to these updated packages, which
    contain backported patches to correct these issues and add these
    enhancements."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://access.redhat.com/errata/RHSA-2015:2231"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://access.redhat.com/security/cve/cve-2014-9297"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://access.redhat.com/security/cve/cve-2014-9298"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://access.redhat.com/security/cve/cve-2014-9750"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://access.redhat.com/security/cve/cve-2014-9751"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://access.redhat.com/security/cve/cve-2015-1798"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://access.redhat.com/security/cve/cve-2015-1799"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://access.redhat.com/security/cve/cve-2015-3405"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.tenable.com/security/research/tra-2015-04"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected packages.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P");
      script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/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:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:ntp");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:ntp-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:ntp-doc");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:ntp-perl");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:ntpdate");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:sntp");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:redhat:enterprise_linux:7");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:redhat:enterprise_linux:7.2");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:redhat:enterprise_linux:7.3");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:redhat:enterprise_linux:7.4");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:redhat:enterprise_linux:7.5");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:redhat:enterprise_linux:7.6");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:redhat:enterprise_linux:7.7");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2015/04/08");
      script_set_attribute(attribute:"patch_publication_date", value:"2015/11/19");
      script_set_attribute(attribute:"plugin_publication_date", value:"2015/11/20");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2015-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"Red Hat Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/RedHat/release", "Host/RedHat/rpm-list", "Host/cpu");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("misc_func.inc");
    include("rpm.inc");
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    release = get_kb_item("Host/RedHat/release");
    if (isnull(release) || "Red Hat" >!< release) audit(AUDIT_OS_NOT, "Red Hat");
    os_ver = pregmatch(pattern: "Red Hat Enterprise Linux.*release ([0-9]+(\.[0-9]+)?)", string:release);
    if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "Red Hat");
    os_ver = os_ver[1];
    if (! preg(pattern:"^7([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Red Hat 7.x", "Red Hat " + os_ver);
    
    if (!get_kb_item("Host/RedHat/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
    if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$" && "s390" >!< cpu) audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Red Hat", cpu);
    
    yum_updateinfo = get_kb_item("Host/RedHat/yum-updateinfo");
    if (!empty_or_null(yum_updateinfo)) 
    {
      rhsa = "RHSA-2015:2231";
      yum_report = redhat_generate_yum_updateinfo_report(rhsa:rhsa);
      if (!empty_or_null(yum_report))
      {
        security_report_v4(
          port       : 0,
          severity   : SECURITY_WARNING,
          extra      : yum_report 
        );
        exit(0);
      }
      else
      {
        audit_message = "affected by Red Hat security advisory " + rhsa;
        audit(AUDIT_OS_NOT, audit_message);
      }
    }
    else
    {
      flag = 0;
      if (rpm_check(release:"RHEL7", cpu:"s390x", reference:"ntp-4.2.6p5-22.el7")) flag++;
    
      if (rpm_check(release:"RHEL7", cpu:"x86_64", reference:"ntp-4.2.6p5-22.el7")) flag++;
    
      if (rpm_check(release:"RHEL7", cpu:"s390x", reference:"ntp-debuginfo-4.2.6p5-22.el7")) flag++;
    
      if (rpm_check(release:"RHEL7", cpu:"x86_64", reference:"ntp-debuginfo-4.2.6p5-22.el7")) flag++;
    
      if (rpm_check(release:"RHEL7", reference:"ntp-doc-4.2.6p5-22.el7")) flag++;
    
      if (rpm_check(release:"RHEL7", reference:"ntp-perl-4.2.6p5-22.el7")) flag++;
    
      if (rpm_check(release:"RHEL7", cpu:"s390x", reference:"ntpdate-4.2.6p5-22.el7")) flag++;
    
      if (rpm_check(release:"RHEL7", cpu:"x86_64", reference:"ntpdate-4.2.6p5-22.el7")) flag++;
    
      if (rpm_check(release:"RHEL7", cpu:"s390x", reference:"sntp-4.2.6p5-22.el7")) flag++;
    
      if (rpm_check(release:"RHEL7", cpu:"x86_64", reference:"sntp-4.2.6p5-22.el7")) flag++;
    
    
      if (flag)
      {
        security_report_v4(
          port       : 0,
          severity   : SECURITY_WARNING,
          extra      : rpm_report_get() + redhat_report_package_caveat()
        );
        exit(0);
      }
      else
      {
        tested = pkg_tests_get();
        if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
        else audit(AUDIT_PACKAGE_NOT_INSTALLED, "ntp / ntp-debuginfo / ntp-doc / ntp-perl / ntpdate / sntp");
      }
    }
    
  • NASL familyOracle Linux Local Security Checks
    NASL idORACLELINUX_ELSA-2015-2231.NASL
    descriptionFrom Red Hat Security Advisory 2015:2231 : Updated ntp packages that fix multiple security issues, several bugs, and add various enhancements are now available for Red Hat Enterprise Linux 7. Red Hat Product Security has rated this update as having Moderate security impact. Common Vulnerability Scoring System (CVSS) base scores, which give detailed severity ratings, are available for each vulnerability from the CVE links in the References section. The Network Time Protocol (NTP) is used to synchronize a computer
    last seen2020-06-01
    modified2020-06-02
    plugin id87030
    published2015-11-24
    reporterThis script is Copyright (C) 2015-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/87030
    titleOracle Linux 7 : ntp (ELSA-2015-2231)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from Red Hat Security Advisory RHSA-2015:2231 and 
    # Oracle Linux Security Advisory ELSA-2015-2231 respectively.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(87030);
      script_version("1.16");
      script_cvs_date("Date: 2019/09/27 13:00:36");
    
      script_cve_id("CVE-2014-9297", "CVE-2014-9298", "CVE-2014-9750", "CVE-2014-9751", "CVE-2015-1798", "CVE-2015-1799", "CVE-2015-3405");
      script_xref(name:"RHSA", value:"2015:2231");
      script_xref(name:"TRA", value:"TRA-2015-04");
    
      script_name(english:"Oracle Linux 7 : ntp (ELSA-2015-2231)");
      script_summary(english:"Checks rpm output for the updated packages");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Oracle Linux host is missing one or more security updates."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "From Red Hat Security Advisory 2015:2231 :
    
    Updated ntp packages that fix multiple security issues, several bugs,
    and add various enhancements are now available for Red Hat Enterprise
    Linux 7.
    
    Red Hat Product Security has rated this update as having Moderate
    security impact. Common Vulnerability Scoring System (CVSS) base
    scores, which give detailed severity ratings, are available for each
    vulnerability from the CVE links in the References section.
    
    The Network Time Protocol (NTP) is used to synchronize a computer's
    time with another referenced time source. These packages include the
    ntpd service which continuously adjusts system time and utilities used
    to query and configure the ntpd service.
    
    It was found that because NTP's access control was based on a source
    IP address, an attacker could bypass source IP restrictions and send
    malicious control and configuration packets by spoofing ::1 addresses.
    (CVE-2014-9298, CVE-2014-9751)
    
    A denial of service flaw was found in the way NTP hosts that were
    peering with each other authenticated themselves before updating their
    internal state variables. An attacker could send packets to one peer
    host, which could cascade to other peers, and stop the synchronization
    process among the reached peers. (CVE-2015-1799)
    
    A flaw was found in the way the ntp-keygen utility generated MD5
    symmetric keys on big-endian systems. An attacker could possibly use
    this flaw to guess generated MD5 keys, which could then be used to
    spoof an NTP client or server. (CVE-2015-3405)
    
    A stack-based buffer overflow was found in the way the NTP autokey
    protocol was implemented. When an NTP client decrypted a secret
    received from an NTP server, it could cause that client to crash.
    (CVE-2014-9297, CVE-2014-9750)
    
    It was found that ntpd did not check whether a Message Authentication
    Code (MAC) was present in a received packet when ntpd was configured
    to use symmetric cryptographic keys. A man-in-the-middle attacker
    could use this flaw to send crafted packets that would be accepted by
    a client or a peer without the attacker knowing the symmetric key.
    (CVE-2015-1798)
    
    The CVE-2015-1798 and CVE-2015-1799 issues were discovered by Miroslav
    Lichvar of Red Hat.
    
    Bug fixes :
    
    * The ntpd service truncated symmetric keys specified in the key file
    to 20 bytes. As a consequence, it was impossible to configure NTP
    authentication to work with peers that use longer keys. With this
    update, the maximum key length has been changed to 32 bytes.
    (BZ#1191111)
    
    * The ntpd service could previously join multicast groups only when
    starting, which caused problems if ntpd was started during system boot
    before network was configured. With this update, ntpd attempts to join
    multicast groups every time network configuration is changed.
    (BZ#1207014)
    
    * Previously, the ntp-keygen utility used the exponent of 3 when
    generating RSA keys. Consequently, generating RSA keys failed when
    FIPS mode was enabled. With this update, ntp-keygen has been modified
    to use the exponent of 65537, and generating keys in FIPS mode now
    works as expected. (BZ#1191116)
    
    * The ntpd service dropped incoming NTP packets if their source port
    was lower than 123 (the NTP port). With this update, ntpd no longer
    checks the source port number, and clients behind NAT are now able to
    correctly synchronize with the server. (BZ#1171640)
    
    Enhancements :
    
    * This update adds support for configurable Differentiated Services
    Code Points (DSCP) in NTP packets, simplifying configuration in large
    networks where different NTP implementations or versions are using
    different DSCP values. (BZ#1202828)
    
    * This update adds the ability to configure separate clock stepping
    thresholds for each direction (backward and forward). Use the
    'stepback' and 'stepfwd' options to configure each threshold.
    (BZ#1193154)
    
    * Support for nanosecond resolution has been added to the Structural
    Health Monitoring (SHM) reference clock. Prior to this update, when a
    Precision Time Protocol (PTP) hardware clock was used as a time source
    to synchronize the system clock, the accuracy of the synchronization
    was limited due to the microsecond resolution of the SHM protocol. The
    nanosecond extension in the SHM protocol now allows sub-microsecond
    synchronization of the system clock. (BZ#1117702)
    
    All ntp users are advised to upgrade to these updated packages, which
    contain backported patches to correct these issues and add these
    enhancements."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://oss.oracle.com/pipermail/el-errata/2015-November/005572.html"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.tenable.com/security/research/tra-2015-04"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected ntp packages.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P");
      script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/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:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:oracle:linux:ntp");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:oracle:linux:ntp-doc");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:oracle:linux:ntp-perl");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:oracle:linux:ntpdate");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:oracle:linux:sntp");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:oracle:linux:7");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2015/04/08");
      script_set_attribute(attribute:"patch_publication_date", value:"2015/11/23");
      script_set_attribute(attribute:"plugin_publication_date", value:"2015/11/24");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2015-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"Oracle Linux Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/OracleLinux", "Host/RedHat/release", "Host/RedHat/rpm-list");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("rpm.inc");
    
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    if (!get_kb_item("Host/OracleLinux")) audit(AUDIT_OS_NOT, "Oracle Linux");
    release = get_kb_item("Host/RedHat/release");
    if (isnull(release) || !pregmatch(pattern: "Oracle (?:Linux Server|Enterprise Linux)", string:release)) audit(AUDIT_OS_NOT, "Oracle Linux");
    os_ver = pregmatch(pattern: "Oracle (?:Linux Server|Enterprise Linux) .*release ([0-9]+(\.[0-9]+)?)", string:release);
    if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "Oracle Linux");
    os_ver = os_ver[1];
    if (! preg(pattern:"^7([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Oracle Linux 7", "Oracle Linux " + os_ver);
    
    if (!get_kb_item("Host/RedHat/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
    if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Oracle Linux", cpu);
    if ("x86_64" >!< cpu) audit(AUDIT_ARCH_NOT, "x86_64", cpu);
    
    flag = 0;
    if (rpm_check(release:"EL7", cpu:"x86_64", reference:"ntp-4.2.6p5-22.el7")) flag++;
    if (rpm_check(release:"EL7", cpu:"x86_64", reference:"ntp-doc-4.2.6p5-22.el7")) flag++;
    if (rpm_check(release:"EL7", cpu:"x86_64", reference:"ntp-perl-4.2.6p5-22.el7")) flag++;
    if (rpm_check(release:"EL7", cpu:"x86_64", reference:"ntpdate-4.2.6p5-22.el7")) flag++;
    if (rpm_check(release:"EL7", cpu:"x86_64", reference:"sntp-4.2.6p5-22.el7")) flag++;
    
    
    if (flag)
    {
      if (report_verbosity > 0) security_warning(port:0, extra:rpm_report_get());
      else security_warning(0);
      exit(0);
    }
    else
    {
      tested = pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "ntp / ntp-doc / ntp-perl / ntpdate / sntp");
    }
    
  • NASL familyCentOS Local Security Checks
    NASL idCENTOS_RHSA-2015-1459.NASL
    descriptionUpdated ntp packages that fix multiple security issues, several bugs, and add two enhancements are now available for Red Hat Enterprise Linux 6. Red Hat Product Security has rated this update as having Moderate security impact. Common Vulnerability Scoring System (CVSS) base scores, which give detailed severity ratings, are available for each vulnerability from the CVE links in the References section. The Network Time Protocol (NTP) is used to synchronize a computer
    last seen2020-06-01
    modified2020-06-02
    plugin id85025
    published2015-07-28
    reporterThis script is Copyright (C) 2015-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/85025
    titleCentOS 6 : ntp (CESA-2015:1459)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Red Hat Security Advisory RHSA-2015:1459 and 
    # CentOS Errata and Security Advisory 2015:1459 respectively.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(85025);
      script_version("2.26");
      script_cvs_date("Date: 2020/01/02");
    
      script_cve_id("CVE-2014-9297", "CVE-2014-9298", "CVE-2014-9750", "CVE-2014-9751", "CVE-2015-1798", "CVE-2015-1799", "CVE-2015-3405");
      script_xref(name:"RHSA", value:"2015:1459");
      script_xref(name:"TRA", value:"TRA-2015-04");
    
      script_name(english:"CentOS 6 : ntp (CESA-2015:1459)");
      script_summary(english:"Checks rpm output for the updated packages");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote CentOS host is missing one or more security updates."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Updated ntp packages that fix multiple security issues, several bugs,
    and add two enhancements are now available for Red Hat Enterprise
    Linux 6.
    
    Red Hat Product Security has rated this update as having Moderate
    security impact. Common Vulnerability Scoring System (CVSS) base
    scores, which give detailed severity ratings, are available for each
    vulnerability from the CVE links in the References section.
    
    The Network Time Protocol (NTP) is used to synchronize a computer's
    time with another referenced time source.
    
    It was found that because NTP's access control was based on a source
    IP address, an attacker could bypass source IP restrictions and send
    malicious control and configuration packets by spoofing ::1 addresses.
    (CVE-2014-9298)
    
    A denial of service flaw was found in the way NTP hosts that were
    peering with each other authenticated themselves before updating their
    internal state variables. An attacker could send packets to one peer
    host, which could cascade to other peers, and stop the synchronization
    process among the reached peers. (CVE-2015-1799)
    
    A flaw was found in the way the ntp-keygen utility generated MD5
    symmetric keys on big-endian systems. An attacker could possibly use
    this flaw to guess generated MD5 keys, which could then be used to
    spoof an NTP client or server. (CVE-2015-3405)
    
    A stack-based buffer overflow was found in the way the NTP autokey
    protocol was implemented. When an NTP client decrypted a secret
    received from an NTP server, it could cause that client to crash.
    (CVE-2014-9297)
    
    It was found that ntpd did not check whether a Message Authentication
    Code (MAC) was present in a received packet when ntpd was configured
    to use symmetric cryptographic keys. A man-in-the-middle attacker
    could use this flaw to send crafted packets that would be accepted by
    a client or a peer without the attacker knowing the symmetric key.
    (CVE-2015-1798)
    
    The CVE-2015-1798 and CVE-2015-1799 issues were discovered by Miroslav
    Lichvar of Red Hat.
    
    Bug fixes :
    
    * The ntpd daemon truncated symmetric keys specified in the key file
    to 20 bytes. As a consequence, it was impossible to configure NTP
    authentication to work with peers that use longer keys. The maximum
    length of keys has now been changed to 32 bytes. (BZ#1053551)
    
    * The ntp-keygen utility used the exponent of 3 when generating RSA
    keys, and generating RSA keys failed when FIPS mode was enabled.
    ntp-keygen has been modified to use the exponent of 65537, and
    generating keys in FIPS mode now works as expected. (BZ#1184421)
    
    * The ntpd daemon included a root delay when calculating its root
    dispersion. Consequently, the NTP server reported larger root
    dispersion than it should have and clients could reject the source
    when its distance reached the maximum synchronization distance (1.5
    seconds by default). Calculation of root dispersion has been fixed,
    the root dispersion is now reported correctly, and clients no longer
    reject the server due to a large synchronization distance.
    (BZ#1045376)
    
    * The ntpd daemon dropped incoming NTP packets if their source port
    was lower than 123 (the NTP port). Clients behind Network Address
    Translation (NAT) were unable to synchronize with the server if their
    source port was translated to ports below 123. With this update, ntpd
    no longer checks the source port number. (BZ#1171630)
    
    Enhancements :
    
    * This update introduces configurable access of memory segments used
    for Shared Memory Driver (SHM) reference clocks. Previously, only the
    first two memory segments were created with owner-only access,
    allowing just two SHM reference clocks to be used securely on a
    system. Now, the owner-only access to SHM is configurable with the
    'mode' option, and it is therefore possible to use more SHM reference
    clocks securely. (BZ#1122015)
    
    * Support for nanosecond resolution has been added to the SHM
    reference clock. Prior to this update, when a Precision Time Protocol
    (PTP) hardware clock was used as a time source to synchronize the
    system clock (for example, with the timemaster service from the
    linuxptp package), the accuracy of the synchronization was limited due
    to the microsecond resolution of the SHM protocol. The nanosecond
    extension in the SHM protocol now enables sub-microsecond
    synchronization of the system clock. (BZ#1117704)"
      );
      # https://lists.centos.org/pipermail/centos-cr-announce/2015-July/002074.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?69a9fb5c"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.tenable.com/security/research/tra-2015-04"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected ntp packages.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P");
      script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/RC:C");
      script_set_attribute(attribute:"cvss_score_source", value:"CVE-2014-9751");
      script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"false");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:ntp");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:ntp-doc");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:ntp-perl");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:ntpdate");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:centos:centos:6");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2015/04/08");
      script_set_attribute(attribute:"patch_publication_date", value:"2015/07/26");
      script_set_attribute(attribute:"plugin_publication_date", value:"2015/07/28");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2015-2020 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"CentOS Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/CentOS/release", "Host/CentOS/rpm-list");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("rpm.inc");
    
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    release = get_kb_item("Host/CentOS/release");
    if (isnull(release) || "CentOS" >!< release) audit(AUDIT_OS_NOT, "CentOS");
    os_ver = pregmatch(pattern: "CentOS(?: Linux)? release ([0-9]+)", string:release);
    if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "CentOS");
    os_ver = os_ver[1];
    if (! preg(pattern:"^6([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "CentOS 6.x", "CentOS " + os_ver);
    
    if (!get_kb_item("Host/CentOS/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
    if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "CentOS", cpu);
    
    
    flag = 0;
    if (rpm_check(release:"CentOS-6", reference:"ntp-4.2.6p5-5.el6.centos")) flag++;
    if (rpm_check(release:"CentOS-6", reference:"ntp-doc-4.2.6p5-5.el6.centos")) flag++;
    if (rpm_check(release:"CentOS-6", reference:"ntp-perl-4.2.6p5-5.el6.centos")) flag++;
    if (rpm_check(release:"CentOS-6", reference:"ntpdate-4.2.6p5-5.el6.centos")) flag++;
    
    
    if (flag)
    {
      cr_plugin_caveat = '\n' +
        'NOTE: The security advisory associated with this vulnerability has a\n' +
        'fixed package version that may only be available in the continuous\n' +
        'release (CR) repository for CentOS, until it is present in the next\n' +
        'point release of CentOS.\n\n' +
    
        'If an equal or higher package level does not exist in the baseline\n' +
        'repository for your major version of CentOS, then updates from the CR\n' +
        'repository will need to be applied in order to address the\n' +
        'vulnerability.\n';
      security_report_v4(
        port       : 0,
        severity   : SECURITY_WARNING,
        extra      : rpm_report_get() + cr_plugin_caveat
      );
      exit(0);
    }
    else
    {
      tested = pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "ntp / ntp-doc / ntp-perl / ntpdate");
    }
    
  • NASL familyF5 Networks Local Security Checks
    NASL idF5_BIGIP_SOL16393.NASL
    descriptionSome kernels do not offer protection for ::1 source addresses on IPv6 interfaces. Since NTP
    last seen2020-06-01
    modified2020-06-02
    plugin id86257
    published2015-10-05
    reporterThis script is Copyright (C) 2015-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/86257
    titleF5 Networks BIG-IP : NTP vulnerability (K16393)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from F5 Networks BIG-IP Solution K16393.
    #
    # The text description of this plugin is (C) F5 Networks.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(86257);
      script_version("2.27");
      script_cvs_date("Date: 2019/01/04 10:03:40");
    
      script_cve_id("CVE-2014-9298", "CVE-2014-9751");
      script_bugtraq_id(72584);
    
      script_name(english:"F5 Networks BIG-IP : NTP vulnerability (K16393)");
      script_summary(english:"Checks the BIG-IP version.");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote device is missing a vendor-supplied security patch."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Some kernels do not offer protection for ::1 source addresses on IPv6
    interfaces. Since NTP's access control mechanism is based on source
    address and localhost addresses generally have no restrictions, an
    attacker may be able to send malicious control and configuration
    packets by spoofing ::1 addresses from the outside. (CVE-2014-9751)
    
    Note: The candidate number originally referenced in this article,
    CVE-2014-9298, was rejected because it was associated with two
    different issues."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://support.f5.com/csp/article/K16393"
      );
      script_set_attribute(
        attribute:"solution", 
        value:
    "Upgrade to one of the non-vulnerable versions listed in the F5
    Solution K16393."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/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:"potential_vulnerability", value:"true");
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:f5:big-ip_access_policy_manager");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:f5:big-ip_advanced_firewall_manager");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:f5:big-ip_application_acceleration_manager");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:f5:big-ip_application_security_manager");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:f5:big-ip_application_visibility_and_reporting");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:f5:big-ip_global_traffic_manager");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:f5:big-ip_link_controller");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:f5:big-ip_local_traffic_manager");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:f5:big-ip_policy_enforcement_manager");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:f5:big-ip_wan_optimization_manager");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:f5:big-ip_webaccelerator");
      script_set_attribute(attribute:"cpe", value:"cpe:/h:f5:big-ip");
      script_set_attribute(attribute:"cpe", value:"cpe:/h:f5:big-ip_protocol_security_manager");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2015/04/09");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_set_attribute(attribute:"plugin_publication_date", value:"2015/10/05");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2015-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"F5 Networks Local Security Checks");
    
      script_dependencies("f5_bigip_detect.nbin");
      script_require_keys("Host/local_checks_enabled", "Host/BIG-IP/hotfix", "Host/BIG-IP/modules", "Host/BIG-IP/version", "Settings/ParanoidReport");
    
      exit(0);
    }
    
    
    include("f5_func.inc");
    
    if ( ! get_kb_item("Host/local_checks_enabled") ) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    version = get_kb_item("Host/BIG-IP/version");
    if ( ! version ) audit(AUDIT_OS_NOT, "F5 Networks BIG-IP");
    if ( isnull(get_kb_item("Host/BIG-IP/hotfix")) ) audit(AUDIT_KB_MISSING, "Host/BIG-IP/hotfix");
    if ( ! get_kb_item("Host/BIG-IP/modules") ) audit(AUDIT_KB_MISSING, "Host/BIG-IP/modules");
    
    sol = "K16393";
    vmatrix = make_array();
    
    if (report_paranoia < 2) audit(AUDIT_PARANOID);
    
    # AFM
    vmatrix["AFM"] = make_array();
    vmatrix["AFM"]["affected"  ] = make_list("11.6.0","11.3.0-11.5.1");
    vmatrix["AFM"]["unaffected"] = make_list("12.0.0","11.5.2-11.5.5","11.6.0HF6","11.5.3HF2");
    
    # AM
    vmatrix["AM"] = make_array();
    vmatrix["AM"]["affected"  ] = make_list("11.6.0","11.4.0-11.5.1");
    vmatrix["AM"]["unaffected"] = make_list("12.0.0","11.5.2-11.5.5","11.6.0HF6","11.5.3HF2");
    
    # APM
    vmatrix["APM"] = make_array();
    vmatrix["APM"]["affected"  ] = make_list("11.6.0","11.0.0-11.5.1","10.1.0-10.2.4");
    vmatrix["APM"]["unaffected"] = make_list("12.0.0","11.5.2-11.5.5","11.6.0HF6","11.5.3HF2");
    
    # ASM
    vmatrix["ASM"] = make_array();
    vmatrix["ASM"]["affected"  ] = make_list("11.6.0","11.0.0-11.5.1","10.1.0-10.2.4");
    vmatrix["ASM"]["unaffected"] = make_list("12.0.0","11.5.2-11.5.5","11.6.0HF6","11.5.3HF2");
    
    # AVR
    vmatrix["AVR"] = make_array();
    vmatrix["AVR"]["affected"  ] = make_list("11.6.0","11.0.0-11.5.1");
    vmatrix["AVR"]["unaffected"] = make_list("12.0.0","11.5.2-11.5.5","11.6.0HF6","11.5.3HF2");
    
    # GTM
    vmatrix["GTM"] = make_array();
    vmatrix["GTM"]["affected"  ] = make_list("11.6.0","11.0.0-11.5.1","10.1.0-10.2.4");
    vmatrix["GTM"]["unaffected"] = make_list("11.5.2-11.5.5","11.6.0HF6","11.5.3HF2");
    
    # LC
    vmatrix["LC"] = make_array();
    vmatrix["LC"]["affected"  ] = make_list("11.6.0","11.0.0-11.5.1","10.1.0-10.2.4");
    vmatrix["LC"]["unaffected"] = make_list("12.0.0","11.5.2-11.5.5","11.6.0HF6","11.5.3HF2");
    
    # LTM
    vmatrix["LTM"] = make_array();
    vmatrix["LTM"]["affected"  ] = make_list("11.6.0","11.0.0-11.5.1","10.1.0-10.2.4");
    vmatrix["LTM"]["unaffected"] = make_list("12.0.0","11.5.2-11.5.5","11.6.0HF6","11.5.3HF2");
    
    # PEM
    vmatrix["PEM"] = make_array();
    vmatrix["PEM"]["affected"  ] = make_list("11.6.0","11.3.0-11.5.1");
    vmatrix["PEM"]["unaffected"] = make_list("12.0.0","11.5.2-11.5.5","11.6.0HF6","11.5.3HF2");
    
    
    if (bigip_is_affected(vmatrix:vmatrix, sol:sol))
    {
      if (report_verbosity > 0) security_warning(port:0, extra:bigip_report_get());
      else security_warning(0);
      exit(0);
    }
    else
    {
      tested = bigip_get_tested_modules();
      audit_extra = "For BIG-IP module(s) " + tested + ",";
      if (tested) audit(AUDIT_INST_VER_NOT_VULN, audit_extra, version);
      else audit(AUDIT_HOST_NOT, "running any of the affected modules");
    }
    
  • NASL familyRed Hat Local Security Checks
    NASL idREDHAT-RHSA-2015-1459.NASL
    descriptionUpdated ntp packages that fix multiple security issues, several bugs, and add two enhancements are now available for Red Hat Enterprise Linux 6. Red Hat Product Security has rated this update as having Moderate security impact. Common Vulnerability Scoring System (CVSS) base scores, which give detailed severity ratings, are available for each vulnerability from the CVE links in the References section. The Network Time Protocol (NTP) is used to synchronize a computer
    last seen2020-06-01
    modified2020-06-02
    plugin id84951
    published2015-07-23
    reporterThis script is Copyright (C) 2015-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/84951
    titleRHEL 6 : ntp (RHSA-2015:1459)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Red Hat Security Advisory RHSA-2015:1459. The text 
    # itself is copyright (C) Red Hat, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(84951);
      script_version("2.25");
      script_cvs_date("Date: 2019/10/24 15:35:40");
    
      script_cve_id("CVE-2014-9297", "CVE-2014-9298", "CVE-2014-9750", "CVE-2014-9751", "CVE-2015-1798", "CVE-2015-1799", "CVE-2015-3405");
      script_xref(name:"RHSA", value:"2015:1459");
      script_xref(name:"TRA", value:"TRA-2015-04");
    
      script_name(english:"RHEL 6 : ntp (RHSA-2015:1459)");
      script_summary(english:"Checks the rpm output for the updated packages");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Red Hat host is missing one or more security updates."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Updated ntp packages that fix multiple security issues, several bugs,
    and add two enhancements are now available for Red Hat Enterprise
    Linux 6.
    
    Red Hat Product Security has rated this update as having Moderate
    security impact. Common Vulnerability Scoring System (CVSS) base
    scores, which give detailed severity ratings, are available for each
    vulnerability from the CVE links in the References section.
    
    The Network Time Protocol (NTP) is used to synchronize a computer's
    time with another referenced time source.
    
    It was found that because NTP's access control was based on a source
    IP address, an attacker could bypass source IP restrictions and send
    malicious control and configuration packets by spoofing ::1 addresses.
    (CVE-2014-9298)
    
    A denial of service flaw was found in the way NTP hosts that were
    peering with each other authenticated themselves before updating their
    internal state variables. An attacker could send packets to one peer
    host, which could cascade to other peers, and stop the synchronization
    process among the reached peers. (CVE-2015-1799)
    
    A flaw was found in the way the ntp-keygen utility generated MD5
    symmetric keys on big-endian systems. An attacker could possibly use
    this flaw to guess generated MD5 keys, which could then be used to
    spoof an NTP client or server. (CVE-2015-3405)
    
    A stack-based buffer overflow was found in the way the NTP autokey
    protocol was implemented. When an NTP client decrypted a secret
    received from an NTP server, it could cause that client to crash.
    (CVE-2014-9297)
    
    It was found that ntpd did not check whether a Message Authentication
    Code (MAC) was present in a received packet when ntpd was configured
    to use symmetric cryptographic keys. A man-in-the-middle attacker
    could use this flaw to send crafted packets that would be accepted by
    a client or a peer without the attacker knowing the symmetric key.
    (CVE-2015-1798)
    
    The CVE-2015-1798 and CVE-2015-1799 issues were discovered by Miroslav
    Lichvar of Red Hat.
    
    Bug fixes :
    
    * The ntpd daemon truncated symmetric keys specified in the key file
    to 20 bytes. As a consequence, it was impossible to configure NTP
    authentication to work with peers that use longer keys. The maximum
    length of keys has now been changed to 32 bytes. (BZ#1053551)
    
    * The ntp-keygen utility used the exponent of 3 when generating RSA
    keys, and generating RSA keys failed when FIPS mode was enabled.
    ntp-keygen has been modified to use the exponent of 65537, and
    generating keys in FIPS mode now works as expected. (BZ#1184421)
    
    * The ntpd daemon included a root delay when calculating its root
    dispersion. Consequently, the NTP server reported larger root
    dispersion than it should have and clients could reject the source
    when its distance reached the maximum synchronization distance (1.5
    seconds by default). Calculation of root dispersion has been fixed,
    the root dispersion is now reported correctly, and clients no longer
    reject the server due to a large synchronization distance.
    (BZ#1045376)
    
    * The ntpd daemon dropped incoming NTP packets if their source port
    was lower than 123 (the NTP port). Clients behind Network Address
    Translation (NAT) were unable to synchronize with the server if their
    source port was translated to ports below 123. With this update, ntpd
    no longer checks the source port number. (BZ#1171630)
    
    Enhancements :
    
    * This update introduces configurable access of memory segments used
    for Shared Memory Driver (SHM) reference clocks. Previously, only the
    first two memory segments were created with owner-only access,
    allowing just two SHM reference clocks to be used securely on a
    system. Now, the owner-only access to SHM is configurable with the
    'mode' option, and it is therefore possible to use more SHM reference
    clocks securely. (BZ#1122015)
    
    * Support for nanosecond resolution has been added to the SHM
    reference clock. Prior to this update, when a Precision Time Protocol
    (PTP) hardware clock was used as a time source to synchronize the
    system clock (for example, with the timemaster service from the
    linuxptp package), the accuracy of the synchronization was limited due
    to the microsecond resolution of the SHM protocol. The nanosecond
    extension in the SHM protocol now enables sub-microsecond
    synchronization of the system clock. (BZ#1117704)"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://access.redhat.com/errata/RHSA-2015:1459"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://access.redhat.com/security/cve/cve-2014-9297"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://access.redhat.com/security/cve/cve-2014-9298"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://access.redhat.com/security/cve/cve-2014-9750"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://access.redhat.com/security/cve/cve-2014-9751"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://access.redhat.com/security/cve/cve-2015-1798"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://access.redhat.com/security/cve/cve-2015-1799"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://access.redhat.com/security/cve/cve-2015-3405"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.tenable.com/security/research/tra-2015-04"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected packages.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P");
      script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/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:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:ntp");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:ntp-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:ntp-doc");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:ntp-perl");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:ntpdate");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:redhat:enterprise_linux:6");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2015/04/08");
      script_set_attribute(attribute:"patch_publication_date", value:"2015/07/22");
      script_set_attribute(attribute:"plugin_publication_date", value:"2015/07/23");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2015-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"Red Hat Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/RedHat/release", "Host/RedHat/rpm-list", "Host/cpu");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("misc_func.inc");
    include("rpm.inc");
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    release = get_kb_item("Host/RedHat/release");
    if (isnull(release) || "Red Hat" >!< release) audit(AUDIT_OS_NOT, "Red Hat");
    os_ver = pregmatch(pattern: "Red Hat Enterprise Linux.*release ([0-9]+(\.[0-9]+)?)", string:release);
    if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "Red Hat");
    os_ver = os_ver[1];
    if (! preg(pattern:"^6([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Red Hat 6.x", "Red Hat " + os_ver);
    
    if (!get_kb_item("Host/RedHat/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
    if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$" && "s390" >!< cpu) audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Red Hat", cpu);
    
    yum_updateinfo = get_kb_item("Host/RedHat/yum-updateinfo");
    if (!empty_or_null(yum_updateinfo)) 
    {
      rhsa = "RHSA-2015:1459";
      yum_report = redhat_generate_yum_updateinfo_report(rhsa:rhsa);
      if (!empty_or_null(yum_report))
      {
        security_report_v4(
          port       : 0,
          severity   : SECURITY_WARNING,
          extra      : yum_report 
        );
        exit(0);
      }
      else
      {
        audit_message = "affected by Red Hat security advisory " + rhsa;
        audit(AUDIT_OS_NOT, audit_message);
      }
    }
    else
    {
      flag = 0;
      if (rpm_check(release:"RHEL6", cpu:"i686", reference:"ntp-4.2.6p5-5.el6")) flag++;
      if (rpm_check(release:"RHEL6", cpu:"s390x", reference:"ntp-4.2.6p5-5.el6")) flag++;
      if (rpm_check(release:"RHEL6", cpu:"x86_64", reference:"ntp-4.2.6p5-5.el6")) flag++;
      if (rpm_check(release:"RHEL6", cpu:"i686", reference:"ntp-debuginfo-4.2.6p5-5.el6")) flag++;
      if (rpm_check(release:"RHEL6", cpu:"s390x", reference:"ntp-debuginfo-4.2.6p5-5.el6")) flag++;
      if (rpm_check(release:"RHEL6", cpu:"x86_64", reference:"ntp-debuginfo-4.2.6p5-5.el6")) flag++;
      if (rpm_check(release:"RHEL6", reference:"ntp-doc-4.2.6p5-5.el6")) flag++;
      if (rpm_check(release:"RHEL6", cpu:"i686", reference:"ntp-perl-4.2.6p5-5.el6")) flag++;
      if (rpm_check(release:"RHEL6", cpu:"s390x", reference:"ntp-perl-4.2.6p5-5.el6")) flag++;
      if (rpm_check(release:"RHEL6", cpu:"x86_64", reference:"ntp-perl-4.2.6p5-5.el6")) flag++;
      if (rpm_check(release:"RHEL6", cpu:"i686", reference:"ntpdate-4.2.6p5-5.el6")) flag++;
      if (rpm_check(release:"RHEL6", cpu:"s390x", reference:"ntpdate-4.2.6p5-5.el6")) flag++;
      if (rpm_check(release:"RHEL6", cpu:"x86_64", reference:"ntpdate-4.2.6p5-5.el6")) flag++;
    
      if (flag)
      {
        security_report_v4(
          port       : 0,
          severity   : SECURITY_WARNING,
          extra      : rpm_report_get() + redhat_report_package_caveat()
        );
        exit(0);
      }
      else
      {
        tested = pkg_tests_get();
        if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
        else audit(AUDIT_PACKAGE_NOT_INSTALLED, "ntp / ntp-debuginfo / ntp-doc / ntp-perl / ntpdate");
      }
    }
    
  • NASL familyCentOS Local Security Checks
    NASL idCENTOS_RHSA-2015-2231.NASL
    descriptionUpdated ntp packages that fix multiple security issues, several bugs, and add various enhancements are now available for Red Hat Enterprise Linux 7. Red Hat Product Security has rated this update as having Moderate security impact. Common Vulnerability Scoring System (CVSS) base scores, which give detailed severity ratings, are available for each vulnerability from the CVE links in the References section. The Network Time Protocol (NTP) is used to synchronize a computer
    last seen2020-06-01
    modified2020-06-02
    plugin id87143
    published2015-12-02
    reporterThis script is Copyright (C) 2015-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/87143
    titleCentOS 7 : ntp (CESA-2015:2231)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Red Hat Security Advisory RHSA-2015:2231 and 
    # CentOS Errata and Security Advisory 2015:2231 respectively.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(87143);
      script_version("2.9");
      script_cvs_date("Date: 2020/01/02");
    
      script_cve_id("CVE-2014-9297", "CVE-2014-9298", "CVE-2014-9750", "CVE-2014-9751", "CVE-2015-1798", "CVE-2015-1799", "CVE-2015-3405");
      script_xref(name:"RHSA", value:"2015:2231");
      script_xref(name:"TRA", value:"TRA-2015-04");
    
      script_name(english:"CentOS 7 : ntp (CESA-2015:2231)");
      script_summary(english:"Checks rpm output for the updated packages");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote CentOS host is missing one or more security updates."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Updated ntp packages that fix multiple security issues, several bugs,
    and add various enhancements are now available for Red Hat Enterprise
    Linux 7.
    
    Red Hat Product Security has rated this update as having Moderate
    security impact. Common Vulnerability Scoring System (CVSS) base
    scores, which give detailed severity ratings, are available for each
    vulnerability from the CVE links in the References section.
    
    The Network Time Protocol (NTP) is used to synchronize a computer's
    time with another referenced time source. These packages include the
    ntpd service which continuously adjusts system time and utilities used
    to query and configure the ntpd service.
    
    It was found that because NTP's access control was based on a source
    IP address, an attacker could bypass source IP restrictions and send
    malicious control and configuration packets by spoofing ::1 addresses.
    (CVE-2014-9298, CVE-2014-9751)
    
    A denial of service flaw was found in the way NTP hosts that were
    peering with each other authenticated themselves before updating their
    internal state variables. An attacker could send packets to one peer
    host, which could cascade to other peers, and stop the synchronization
    process among the reached peers. (CVE-2015-1799)
    
    A flaw was found in the way the ntp-keygen utility generated MD5
    symmetric keys on big-endian systems. An attacker could possibly use
    this flaw to guess generated MD5 keys, which could then be used to
    spoof an NTP client or server. (CVE-2015-3405)
    
    A stack-based buffer overflow was found in the way the NTP autokey
    protocol was implemented. When an NTP client decrypted a secret
    received from an NTP server, it could cause that client to crash.
    (CVE-2014-9297, CVE-2014-9750)
    
    It was found that ntpd did not check whether a Message Authentication
    Code (MAC) was present in a received packet when ntpd was configured
    to use symmetric cryptographic keys. A man-in-the-middle attacker
    could use this flaw to send crafted packets that would be accepted by
    a client or a peer without the attacker knowing the symmetric key.
    (CVE-2015-1798)
    
    The CVE-2015-1798 and CVE-2015-1799 issues were discovered by Miroslav
    Lichvar of Red Hat.
    
    Bug fixes :
    
    * The ntpd service truncated symmetric keys specified in the key file
    to 20 bytes. As a consequence, it was impossible to configure NTP
    authentication to work with peers that use longer keys. With this
    update, the maximum key length has been changed to 32 bytes.
    (BZ#1191111)
    
    * The ntpd service could previously join multicast groups only when
    starting, which caused problems if ntpd was started during system boot
    before network was configured. With this update, ntpd attempts to join
    multicast groups every time network configuration is changed.
    (BZ#1207014)
    
    * Previously, the ntp-keygen utility used the exponent of 3 when
    generating RSA keys. Consequently, generating RSA keys failed when
    FIPS mode was enabled. With this update, ntp-keygen has been modified
    to use the exponent of 65537, and generating keys in FIPS mode now
    works as expected. (BZ#1191116)
    
    * The ntpd service dropped incoming NTP packets if their source port
    was lower than 123 (the NTP port). With this update, ntpd no longer
    checks the source port number, and clients behind NAT are now able to
    correctly synchronize with the server. (BZ#1171640)
    
    Enhancements :
    
    * This update adds support for configurable Differentiated Services
    Code Points (DSCP) in NTP packets, simplifying configuration in large
    networks where different NTP implementations or versions are using
    different DSCP values. (BZ#1202828)
    
    * This update adds the ability to configure separate clock stepping
    thresholds for each direction (backward and forward). Use the
    'stepback' and 'stepfwd' options to configure each threshold.
    (BZ#1193154)
    
    * Support for nanosecond resolution has been added to the Structural
    Health Monitoring (SHM) reference clock. Prior to this update, when a
    Precision Time Protocol (PTP) hardware clock was used as a time source
    to synchronize the system clock, the accuracy of the synchronization
    was limited due to the microsecond resolution of the SHM protocol. The
    nanosecond extension in the SHM protocol now allows sub-microsecond
    synchronization of the system clock. (BZ#1117702)
    
    All ntp users are advised to upgrade to these updated packages, which
    contain backported patches to correct these issues and add these
    enhancements."
      );
      # https://lists.centos.org/pipermail/centos-cr-announce/2015-November/002507.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?445c7dd3"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.tenable.com/security/research/tra-2015-04"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected ntp packages.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P");
      script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/RC:C");
      script_set_attribute(attribute:"cvss_score_source", value:"CVE-2014-9751");
      script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"false");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:ntp");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:ntp-doc");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:ntp-perl");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:ntpdate");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:centos:centos:sntp");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:centos:centos:7");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2015/04/08");
      script_set_attribute(attribute:"patch_publication_date", value:"2015/11/30");
      script_set_attribute(attribute:"plugin_publication_date", value:"2015/12/02");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2015-2020 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"CentOS Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/CentOS/release", "Host/CentOS/rpm-list");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("rpm.inc");
    
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    release = get_kb_item("Host/CentOS/release");
    if (isnull(release) || "CentOS" >!< release) audit(AUDIT_OS_NOT, "CentOS");
    os_ver = pregmatch(pattern: "CentOS(?: Linux)? release ([0-9]+)", string:release);
    if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "CentOS");
    os_ver = os_ver[1];
    if (! preg(pattern:"^7([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "CentOS 7.x", "CentOS " + os_ver);
    
    if (!get_kb_item("Host/CentOS/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
    if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "CentOS", cpu);
    
    
    flag = 0;
    if (rpm_check(release:"CentOS-7", cpu:"x86_64", reference:"ntp-4.2.6p5-22.el7.centos")) flag++;
    if (rpm_check(release:"CentOS-7", cpu:"x86_64", reference:"ntp-doc-4.2.6p5-22.el7.centos")) flag++;
    if (rpm_check(release:"CentOS-7", cpu:"x86_64", reference:"ntp-perl-4.2.6p5-22.el7.centos")) flag++;
    if (rpm_check(release:"CentOS-7", cpu:"x86_64", reference:"ntpdate-4.2.6p5-22.el7.centos")) flag++;
    if (rpm_check(release:"CentOS-7", cpu:"x86_64", reference:"sntp-4.2.6p5-22.el7.centos")) flag++;
    
    
    if (flag)
    {
      cr_plugin_caveat = '\n' +
        'NOTE: The security advisory associated with this vulnerability has a\n' +
        'fixed package version that may only be available in the continuous\n' +
        'release (CR) repository for CentOS, until it is present in the next\n' +
        'point release of CentOS.\n\n' +
    
        'If an equal or higher package level does not exist in the baseline\n' +
        'repository for your major version of CentOS, then updates from the CR\n' +
        'repository will need to be applied in order to address the\n' +
        'vulnerability.\n';
      security_report_v4(
        port       : 0,
        severity   : SECURITY_WARNING,
        extra      : rpm_report_get() + cr_plugin_caveat
      );
      exit(0);
    }
    else
    {
      tested = pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "ntp / ntp-doc / ntp-perl / ntpdate / sntp");
    }
    
  • NASL familyScientific Linux Local Security Checks
    NASL idSL_20151119_NTP_ON_SL7_X.NASL
    descriptionIt was found that because NTP
    last seen2020-03-18
    modified2015-12-22
    plugin id87564
    published2015-12-22
    reporterThis script is Copyright (C) 2015-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/87564
    titleScientific Linux Security Update : ntp on SL7.x x86_64 (20151119)
  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DSA-3154.NASL
    descriptionSeveral vulnerabilities were discovered in the ntp package, an implementation of the Network Time Protocol. The Common Vulnerabilities and Exposures project identifies the following problems : - CVE-2014-9750 Stephen Roettger of the Google Security Team, Sebastian Krahmer of the SUSE Security Team and Harlan Stenn of Network Time Foundation discovered that the length value in extension fields is not properly validated in several code paths in ntp_crypto.c, which could lead to information leakage or denial of service (ntpd crash). - CVE-2014-9751 Stephen Roettger of the Google Security Team reported that ACLs based on IPv6 ::1 addresses can be bypassed.
    last seen2020-03-17
    modified2015-02-06
    plugin id81189
    published2015-02-06
    reporterThis script is Copyright (C) 2015-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/81189
    titleDebian DSA-3154-1 : ntp - security update
  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DSA-3388.NASL
    descriptionSeveral vulnerabilities were discovered in the Network Time Protocol daemon and utility programs : - CVE-2015-5146 A flaw was found in the way ntpd processed certain remote configuration packets. An attacker could use a specially crafted package to cause ntpd to crash if : - ntpd enabled remote configuration - The attacker had the knowledge of the configuration password - The attacker had access to a computer entrusted to perform remote configuration Note that remote configuration is disabled by default in NTP. - CVE-2015-5194 It was found that ntpd could crash due to an uninitialized variable when processing malformed logconfig configuration commands. - CVE-2015-5195 It was found that ntpd exits with a segmentation fault when a statistics type that was not enabled during compilation (e.g. timingstats) is referenced by the statistics or filegen configuration command. - CVE-2015-5219 It was discovered that sntp program would hang in an infinite loop when a crafted NTP packet was received, related to the conversion of the precision value in the packet to double. - CVE-2015-5300 It was found that ntpd did not correctly implement the -g option : Normally, ntpd exits with a message to the system log if the offset exceeds the panic threshold, which is 1000 s by default. This option allows the time to be set to any value without restriction; however, this can happen only once. If the threshold is exceeded after that, ntpd will exit with a message to the system log. This option can be used with the -q and -x options. ntpd could actually step the clock multiple times by more than the panic threshold if its clock discipline doesn
    last seen2020-06-01
    modified2020-06-02
    plugin id86682
    published2015-11-02
    reporterThis script is Copyright (C) 2015-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/86682
    titleDebian DSA-3388-1 : ntp - security update

Redhat

advisories
rhsa
idRHSA-2015:1459
rpms
  • ntp-0:4.2.6p5-5.el6
  • ntp-debuginfo-0:4.2.6p5-5.el6
  • ntp-doc-0:4.2.6p5-5.el6
  • ntp-perl-0:4.2.6p5-5.el6
  • ntpdate-0:4.2.6p5-5.el6
  • ntp-0:4.2.6p5-22.el7
  • ntp-debuginfo-0:4.2.6p5-22.el7
  • ntp-doc-0:4.2.6p5-22.el7
  • ntp-perl-0:4.2.6p5-22.el7
  • ntpdate-0:4.2.6p5-22.el7
  • sntp-0:4.2.6p5-22.el7