Vulnerabilities > CVE-2015-3204 - Improper Input Validation vulnerability in Libreswan

047910
CVSS 0.0 - NONE
Attack vector
UNKNOWN
Attack complexity
UNKNOWN
Privileges required
UNKNOWN
Confidentiality impact
UNKNOWN
Integrity impact
UNKNOWN
Availability impact
UNKNOWN

Summary

libreswan 3.9 through 3.12 allows remote attackers to cause a denial of service (daemon restart) via an IKEv1 packet with (1) unassigned bits set in the IPSEC DOI value or (2) the next payload value set to ISAKMP_NEXT_SAK.

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 familyScientific Linux Local Security Checks
    NASL idSL_20150623_LIBRESWAN_ON_SL7_X.NASL
    descriptionA flaw was discovered in the way Libreswan
    last seen2020-03-18
    modified2015-06-25
    plugin id84393
    published2015-06-25
    reporterThis script is Copyright (C) 2015-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/84393
    titleScientific Linux Security Update : libreswan on SL7.x x86_64 (20150623)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text is (C) Scientific Linux.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(84393);
      script_version("2.4");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/02/25");
    
      script_cve_id("CVE-2015-3204");
    
      script_name(english:"Scientific Linux Security Update : libreswan on SL7.x x86_64 (20150623)");
      script_summary(english:"Checks rpm output for the updated packages");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:
    "The remote Scientific Linux host is missing one or more security
    updates."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "A flaw was discovered in the way Libreswan's IKE daemon processed
    certain IKEv1 payloads. A remote attacker could send specially crafted
    IKEv1 payloads that, when processed, would lead to a denial of service
    (daemon crash). (CVE-2015-3204)
    
    This update fixes the following bugs :
    
      - Previously, the programs/pluto/state.h and
        programs/pluto/kernel_netlink.c files had a maximum
        SELinux context size of 257 and 1024 respectively. These
        restrictions set by libreswan limited the size of the
        context that can be exchanged by pluto (the IPSec
        daemon) when using a Labeled Internet Protocol Security
        (IPsec). The SElinux labels for Labeled IPsec have been
        extended to 4096 bytes and the mentioned restrictions no
        longer exist.
    
      - On some architectures, the kernel AES_GCM IPsec
        algorithm did not work properly with acceleration
        drivers. On those kernels, some acceleration modules are
        added to the modprobe blacklist. However, Libreswan was
        ignoring this blacklist, leading to AES_GCM failures.
        This update adds support for the module blacklist to the
        libreswan packages and thus prevents the AES_GCM
        failures from occurring.
    
      - An IPv6 issue has been resolved that prevented ipv6-icmp
        Neighbour Discovery from working properly once an IPsec
        tunnel is established (and one endpoint reboots). When
        upgrading, ensure that /etc/ipsec.conf is loading all
        /etc/ipsec.d/*conf files using the /etc/ipsec.conf
        'include' statement, or explicitly include this new
        configuration file in /etc/ipsec.conf.
    
      - A FIPS self-test prevented libreswan from properly
        starting in FIPS mode. This bug has been fixed and
        libreswan now works in FIPS mode as expected.
    
    In addition, this update adds the following enhancements :
    
      - A new option 'seedbits=' has been added to pre-seed the
        Network Security Services (NSS) pseudo random number
        generator (PRNG) function with entropy from the
        /dev/random file on startup. This option is disabled by
        default. It can be enabled by setting the 'seedbits='
        option in the 'config setup' section in the
        /etc/ipsec.conf file.
    
      - The build process now runs a Cryptographic Algorithm
        Validation Program (CAVP) certification test on the
        Internet Key Exchange version 1 and 2 (IKEv1 and IKEv2)
        PRF/PRF+ functions."
      );
      # https://listserv.fnal.gov/scripts/wa.exe?A2=ind1506&L=scientific-linux-errata&F=&S=&P=12300
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?a053a596"
      );
      script_set_attribute(
        attribute:"solution", 
        value:"Update the affected libreswan and / or libreswan-debuginfo packages."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/I:N/A:P");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fermilab:scientific_linux:libreswan");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fermilab:scientific_linux:libreswan-debuginfo");
      script_set_attribute(attribute:"cpe", value:"x-cpe:/o:fermilab:scientific_linux");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2015/07/01");
      script_set_attribute(attribute:"patch_publication_date", value:"2015/06/23");
      script_set_attribute(attribute:"plugin_publication_date", value:"2015/06/25");
      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:"Scientific Linux Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/cpu", "Host/RedHat/release", "Host/RedHat/rpm-list");
    
      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) || "Scientific Linux " >!< release) audit(AUDIT_HOST_NOT, "running Scientific Linux");
    os_ver = pregmatch(pattern: "Scientific Linux.*release ([0-9]+(\.[0-9]+)?)", string:release);
    if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "Scientific Linux");
    os_ver = os_ver[1];
    if (! preg(pattern:"^7([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Scientific Linux 7.x", "Scientific 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 (cpu >!< "x86_64" && cpu !~ "^i[3-6]86$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Scientific Linux", cpu);
    if ("x86_64" >!< cpu) audit(AUDIT_ARCH_NOT, "x86_64", cpu);
    
    
    flag = 0;
    if (rpm_check(release:"SL7", cpu:"x86_64", reference:"libreswan-3.12-10.1.el7_1")) flag++;
    if (rpm_check(release:"SL7", cpu:"x86_64", reference:"libreswan-debuginfo-3.12-10.1.el7_1")) flag++;
    
    
    if (flag)
    {
      security_report_v4(
        port       : 0,
        severity   : SECURITY_WARNING,
        extra      : rpm_report_get()
      );
      exit(0);
    }
    else
    {
      tested = pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "libreswan / libreswan-debuginfo");
    }
    
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2015-9388.NASL
    descriptionUpdated to 3.13 for CVE-2015-3204 Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-06-05
    modified2015-06-15
    plugin id84175
    published2015-06-15
    reporterThis script is Copyright (C) 2015-2020 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/84175
    titleFedora 20 : libreswan-3.13-1.fc20 (2015-9388)
  • NASL familyCentOS Local Security Checks
    NASL idCENTOS_RHSA-2015-1154.NASL
    descriptionUpdated libreswan packages that fix one security issue, several bugs and add two enhancements are now available for Red Hat Enterprise Linux 7. Red Hat Product Security has rated this update as having Moderate security impact. A Common Vulnerability Scoring System (CVSS) base score, which gives a detailed severity rating, is available from the CVE link in the References section. Libreswan is an implementation of IPsec & IKE for Linux. IPsec is the Internet Protocol Security and uses strong cryptography to provide both authentication and encryption services. These services allow you to build secure tunnels through untrusted networks such as virtual private network (VPN). A flaw was discovered in the way Libreswan
    last seen2020-06-01
    modified2020-06-02
    plugin id84348
    published2015-06-24
    reporterThis script is Copyright (C) 2015-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/84348
    titleCentOS 7 : libreswan (CESA-2015:1154)
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2015-9309.NASL
    descriptionUpdated to 3.13 for CVE-2015-3204 Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-06-05
    modified2015-06-11
    plugin id84100
    published2015-06-11
    reporterThis script is Copyright (C) 2015-2020 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/84100
    titleFedora 22 : libreswan-3.13-1.fc22 (2015-9309)
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2015-9335.NASL
    descriptionUpdated to 3.13 for CVE-2015-3204 Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-06-05
    modified2015-06-11
    plugin id84103
    published2015-06-11
    reporterThis script is Copyright (C) 2015-2020 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/84103
    titleFedora 21 : libreswan-3.13-1.fc21 (2015-9335)
  • NASL familyRed Hat Local Security Checks
    NASL idREDHAT-RHSA-2015-1154.NASL
    descriptionUpdated libreswan packages that fix one security issue, several bugs and add two enhancements are now available for Red Hat Enterprise Linux 7. Red Hat Product Security has rated this update as having Moderate security impact. A Common Vulnerability Scoring System (CVSS) base score, which gives a detailed severity rating, is available from the CVE link in the References section. Libreswan is an implementation of IPsec & IKE for Linux. IPsec is the Internet Protocol Security and uses strong cryptography to provide both authentication and encryption services. These services allow you to build secure tunnels through untrusted networks such as virtual private network (VPN). A flaw was discovered in the way Libreswan
    last seen2020-06-01
    modified2020-06-02
    plugin id84360
    published2015-06-24
    reporterThis script is Copyright (C) 2015-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/84360
    titleRHEL 7 : libreswan (RHSA-2015:1154)
  • NASL familyGentoo Local Security Checks
    NASL idGENTOO_GLSA-201603-13.NASL
    descriptionThe remote host is affected by the vulnerability described in GLSA-201603-13 (Libreswan: Multiple Vulnerabilities) The pluto IKE daemon in Libreswan, when built with NSS, allows remote attackers to cause a Denial of Service (assertion failure and daemon restart) via a zero DH g^x value in a KE payload in a IKE packet. Additionally, remote attackers could cause a Denial of Service (daemon restart) via an IKEv1 packet with (1) unassigned bits set in the IPSEC DOI value or (2) the next payload value set to ISAKMP_NEXT_SAK. Impact : Remote attackers could possibly cause Denial of Service. Workaround : There is no known workaround at this time.
    last seen2020-06-01
    modified2020-06-02
    plugin id89906
    published2016-03-14
    reporterThis script is Copyright (C) 2016 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/89906
    titleGLSA-201603-13 : Libreswan: Multiple Vulnerabilities
  • NASL familyOracle Linux Local Security Checks
    NASL idORACLELINUX_ELSA-2015-1154.NASL
    descriptionFrom Red Hat Security Advisory 2015:1154 : Updated libreswan packages that fix one security issue, several bugs and add two enhancements are now available for Red Hat Enterprise Linux 7. Red Hat Product Security has rated this update as having Moderate security impact. A Common Vulnerability Scoring System (CVSS) base score, which gives a detailed severity rating, is available from the CVE link in the References section. Libreswan is an implementation of IPsec & IKE for Linux. IPsec is the Internet Protocol Security and uses strong cryptography to provide both authentication and encryption services. These services allow you to build secure tunnels through untrusted networks such as virtual private network (VPN). A flaw was discovered in the way Libreswan
    last seen2020-06-01
    modified2020-06-02
    plugin id84354
    published2015-06-24
    reporterThis script is Copyright (C) 2015-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/84354
    titleOracle Linux 7 : libreswan (ELSA-2015-1154)

Redhat

advisories
bugzilla
id1223361
titleCVE-2015-3204 libreswan: crafted IKE packet causes daemon restart
oval
OR
  • commentRed Hat Enterprise Linux must be installed
    ovaloval:com.redhat.rhba:tst:20070304026
  • AND
    • commentRed Hat Enterprise Linux 7 is installed
      ovaloval:com.redhat.rhba:tst:20150364027
    • commentlibreswan is earlier than 0:3.12-10.1.el7_1
      ovaloval:com.redhat.rhsa:tst:20151154001
    • commentlibreswan is signed with Red Hat redhatrelease2 key
      ovaloval:com.redhat.rhsa:tst:20151154002
rhsa
idRHSA-2015:1154
released2015-06-23
severityModerate
titleRHSA-2015:1154: libreswan security, bug fix and enhancement update (Moderate)
rpms
  • libreswan-0:3.12-10.1.ael7b_1
  • libreswan-0:3.12-10.1.el7_1
  • libreswan-debuginfo-0:3.12-10.1.ael7b_1
  • libreswan-debuginfo-0:3.12-10.1.el7_1