Vulnerabilities > CVE-2016-3630 - Data Processing Errors vulnerability in multiple products
Attack vector
NETWORK Attack complexity
LOW Privileges required
NONE Confidentiality impact
HIGH Integrity impact
HIGH Availability impact
HIGH Summary
The binary delta decoder in Mercurial before 3.7.3 allows remote attackers to execute arbitrary code via a (1) clone, (2) push, or (3) pull command, related to (a) a list sizing rounding error and (b) short records.
Vulnerable Configurations
Common Weakness Enumeration (CWE)
Common Attack Pattern Enumeration and Classification (CAPEC)
- Overflow Buffers Buffer Overflow attacks target improper or missing bounds checking on buffer operations, typically triggered by input injected by an attacker. As a consequence, an attacker is able to write past the boundaries of allocated buffer regions in memory, causing a program crash or potentially redirection of execution as per the attackers' choice.
- XML Nested Payloads Applications often need to transform data in and out of the XML format by using an XML parser. It may be possible for an attacker to inject data that may have an adverse effect on the XML parser when it is being processed. By nesting XML data and causing this data to be continuously self-referential, an attacker can cause the XML parser to consume more resources while processing, causing excessive memory consumption and CPU utilization. An attacker's goal is to leverage parser failure to his or her advantage. In most cases this type of an attack will result in a denial of service due to an application becoming unstable, freezing, or crash. However it may be possible to cause a crash resulting in arbitrary code execution, leading to a jump from the data plane to the control plane [R.230.1].
- XML Oversized Payloads Applications often need to transform data in and out of the XML format by using an XML parser. It may be possible for an attacker to inject data that may have an adverse effect on the XML parser when it is being processed. By supplying oversized payloads in input vectors that will be processed by the XML parser, an attacker can cause the XML parser to consume more resources while processing, causing excessive memory consumption and CPU utilization, and potentially cause execution of arbitrary code. An attacker's goal is to leverage parser failure to his or her advantage. In many cases this type of an attack will result in a denial of service due to an application becoming unstable, freezing, or crash. However it is possible to cause a crash resulting in arbitrary code execution, leading to a jump from the data plane to the control plane [R.231.1].
- XML Client-Side Attack Client applications such as web browsers that process HTML data often need to transform data in and out of the XML format by using an XML parser. It may be possible for an attacker to inject data that may have an adverse effect on the XML parser when it is being processed. These adverse effects may include the parser crashing, consuming too much of a resource, executing too slowly, executing code supplied by an attacker, allowing usage of unintended system functionality, etc. An attacker's goal is to leverage parser failure to his or her advantage. In some cases it may be possible to jump from the data plane to the control plane via bad data being passed to an XML parser. [R.484.1]
- XML Parser Attack Applications often need to transform data in and out of the XML format by using an XML parser. It may be possible for an attacker to inject data that may have an adverse effect on the XML parser when it is being processed. These adverse effects may include the parser crashing, consuming too much of a resource, executing too slowly, executing code supplied by an attacker, allowing usage of unintended system functionality, etc. An attacker's goal is to leverage parser failure to his or her advantage. In some cases it may be possible to jump from the data plane to the control plane via bad data being passed to an XML parser. [R.99.1]
Nessus
NASL family Fedora Local Security Checks NASL id FEDORA_2016-79604DDE9F.NASL description Security fix for CVE-2016-3630, CVE-2016-3068, CVE-2016-3069 and minor upgrade 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 seen 2020-06-05 modified 2016-04-08 plugin id 90414 published 2016-04-08 reporter This script is Copyright (C) 2016-2020 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/90414 title Fedora 22 : mercurial-3.5.2-1.fc22 (2016-79604dde9f) code #%NASL_MIN_LEVEL 80502 # # (C) Tenable Network Security, Inc. # # The descriptive text and package checks in this plugin were # extracted from Fedora Security Advisory 2016-79604dde9f. # include("compat.inc"); if (description) { script_id(90414); script_version("2.4"); script_set_attribute(attribute:"plugin_modification_date", value:"2020/06/04"); script_cve_id("CVE-2016-3068", "CVE-2016-3069", "CVE-2016-3630"); script_xref(name:"FEDORA", value:"2016-79604dde9f"); script_name(english:"Fedora 22 : mercurial-3.5.2-1.fc22 (2016-79604dde9f)"); script_summary(english:"Checks rpm output for the updated package."); script_set_attribute( attribute:"synopsis", value:"The remote Fedora host is missing a security update." ); script_set_attribute( attribute:"description", value: "Security fix for CVE-2016-3630, CVE-2016-3068, CVE-2016-3069 and minor upgrade 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." ); script_set_attribute( attribute:"see_also", value:"https://bugzilla.redhat.com/show_bug.cgi?id=1322264" ); script_set_attribute( attribute:"see_also", value:"https://bugzilla.redhat.com/show_bug.cgi?id=1322266" ); script_set_attribute( attribute:"see_also", value:"https://bugzilla.redhat.com/show_bug.cgi?id=1322267" ); # https://lists.fedoraproject.org/pipermail/package-announce/2016-April/181505.html script_set_attribute( attribute:"see_also", value:"http://www.nessus.org/u?e925cafc" ); script_set_attribute( attribute:"solution", value:"Update the affected mercurial package." ); script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P"); script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"); script_set_attribute(attribute:"plugin_type", value:"local"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fedoraproject:fedora:mercurial"); script_set_attribute(attribute:"cpe", value:"cpe:/o:fedoraproject:fedora:22"); script_set_attribute(attribute:"patch_publication_date", value:"2016/04/07"); script_set_attribute(attribute:"plugin_publication_date", value:"2016/04/08"); script_end_attributes(); script_category(ACT_GATHER_INFO); script_copyright(english:"This script is Copyright (C) 2016-2020 Tenable Network Security, Inc."); script_family(english:"Fedora Local Security Checks"); script_dependencies("ssh_get_info.nasl"); script_require_keys("Host/local_checks_enabled", "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); release = get_kb_item("Host/RedHat/release"); if (isnull(release) || "Fedora" >!< release) audit(AUDIT_OS_NOT, "Fedora"); os_ver = eregmatch(pattern: "Fedora.*release ([0-9]+)", string:release); if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "Fedora"); os_ver = os_ver[1]; if (! ereg(pattern:"^22([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Fedora 22.x", "Fedora " + 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, "Fedora", cpu); flag = 0; if (rpm_check(release:"FC22", reference:"mercurial-3.5.2-1.fc22")) 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, "mercurial"); }
NASL family Debian Local Security Checks NASL id DEBIAN_DSA-3542.NASL description Several vulnerabilities have been discovered in Mercurial, a distributed version control system. The Common Vulnerabilities and Exposures project identifies the following issues : - CVE-2016-3068 Blake Burkhart discovered that Mercurial allows URLs for Git subrepositories that could result in arbitrary code execution on clone. - CVE-2016-3069 Blake Burkhart discovered that Mercurial allows arbitrary code execution when converting Git repositories with specially crafted names. - CVE-2016-3630 It was discovered that Mercurial does not properly perform bounds-checking in its binary delta decoder, which may be exploitable for remote code execution via clone, push or pull. last seen 2020-06-01 modified 2020-06-02 plugin id 90370 published 2016-04-07 reporter This script is Copyright (C) 2016-2018 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/90370 title Debian DSA-3542-1 : mercurial - security update NASL family Fedora Local Security Checks NASL id FEDORA_2016-74F9A65B3A.NASL description CVE-2016-3630, CVE-2016-3068, CVE-2016-3069 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 seen 2020-06-05 modified 2016-04-22 plugin id 90652 published 2016-04-22 reporter This script is Copyright (C) 2016-2020 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/90652 title Fedora 24 : mercurial-3.7.3-1.fc24 (2016-74f9a65b3a) NASL family SuSE Local Security Checks NASL id OPENSUSE-2016-467.NASL description mercurial was updated to fix three security issues. These security issues were fixed : - CVE-2016-3069: Arbitrary code execution when converting Git repos (bsc#973176). - CVE-2016-3068: Arbitrary code execution with Git subrepos (bsc#973177). - CVE-2016-3630: Remote code execution in binary delta decoding (bsc#973175). last seen 2020-06-05 modified 2016-04-18 plugin id 90559 published 2016-04-18 reporter This script is Copyright (C) 2016-2020 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/90559 title openSUSE Security Update : mercurial (openSUSE-2016-467) NASL family SuSE Local Security Checks NASL id OPENSUSE-2016-452.NASL description mercurial was updated to fix three security issues. These security issues were fixed : - CVE-2016-3069: Arbitrary code execution when converting Git repos (bsc#973176). - CVE-2016-3068: Arbitrary code execution with Git subrepos (bsc#973177). - CVE-2016-3630: Remote code execution in binary delta decoding (bsc#973175). last seen 2020-06-05 modified 2016-04-13 plugin id 90485 published 2016-04-13 reporter This script is Copyright (C) 2016-2020 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/90485 title openSUSE Security Update : mercurial (openSUSE-2016-452) NASL family Gentoo Local Security Checks NASL id GENTOO_GLSA-201612-19.NASL description The remote host is affected by the vulnerability described in GLSA-201612-19 (Mercurial: Multiple vulnerabilities) Multiple vulnerabilities have been discovered in Mercurial. Please review the CVE identifier and bug reports referenced for details. Impact : A remote attacker could possibly execute arbitrary code with the privileges of the process. Workaround : There is no known workaround at this time. last seen 2020-03-18 modified 2016-12-07 plugin id 95605 published 2016-12-07 reporter This script is Copyright (C) 2016-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/95605 title GLSA-201612-19 : Mercurial: Multiple vulnerabilities NASL family Slackware Local Security Checks NASL id SLACKWARE_SSA_2016-092-01.NASL description New mercurial packages are available for Slackware 13.0, 13.1, 13.37, 14.0, 14.1, and -current to fix security issues. last seen 2020-06-01 modified 2020-06-02 plugin id 90319 published 2016-04-05 reporter This script is Copyright (C) 2016 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/90319 title Slackware 13.0 / 13.1 / 13.37 / 14.0 / 14.1 / current : mercurial (SSA:2016-092-01) NASL family FreeBSD Local Security Checks NASL id FREEBSD_PKG_E1085B15F60911E5A2300014A5A57822.NASL description Mercurial reports : CVE-2016-3630: Remote code execution in binary delta decoding CVE-2016-3068: Arbitrary code execution with Git subrepos CVE-2016-3069: Arbitrary code execution when converting Git repos last seen 2020-06-01 modified 2020-06-02 plugin id 90291 published 2016-04-01 reporter This script is Copyright (C) 2016-2018 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/90291 title FreeBSD : mercurial -- multiple vulnerabilities (e1085b15-f609-11e5-a230-0014a5a57822) NASL family Fedora Local Security Checks NASL id FEDORA_2016-B7F1F8E3BF.NASL description Security fix for CVE-2016-3630, CVE-2016-3068, CVE-2016-3069 and minor upgrade 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 seen 2020-06-05 modified 2016-04-08 plugin id 90416 published 2016-04-08 reporter This script is Copyright (C) 2016-2020 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/90416 title Fedora 23 : mercurial-3.5.2-1.fc23 (2016-b7f1f8e3bf) NASL family Amazon Linux Local Security Checks NASL id ALA_ALAS-2016-697.NASL description It was discovered that Mercurial failed to properly check Git sub-repository URLs. A Mercurial repository that includes a Git sub-repository with a specially crafted URL could cause Mercurial to execute arbitrary code. (CVE-2016-3068) The binary delta decoder in Mercurial before 3.7.3 allows remote attackers to execute arbitrary code via a (1) clone, (2) push, or (3) pull command, related to (a) a list sizing rounding error and (b) short records. (CVE-2016-3630) It was discovered that the Mercurial convert extension failed to sanitize special characters in Git repository names. A Git repository with a specially crafted name could cause Mercurial to execute arbitrary code when the Git repository was converted to a Mercurial repository. (CVE-2016-3069) last seen 2020-06-01 modified 2020-06-02 plugin id 90866 published 2016-05-04 reporter This script is Copyright (C) 2016-2018 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/90866 title Amazon Linux AMI : mercurial (ALAS-2016-697)
References
- http://lists.fedoraproject.org/pipermail/package-announce/2016-April/181505.html
- http://lists.fedoraproject.org/pipermail/package-announce/2016-April/181505.html
- http://lists.fedoraproject.org/pipermail/package-announce/2016-April/181542.html
- http://lists.fedoraproject.org/pipermail/package-announce/2016-April/181542.html
- http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00016.html
- http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00016.html
- http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00017.html
- http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00017.html
- http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00018.html
- http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00018.html
- http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00043.html
- http://lists.opensuse.org/opensuse-security-announce/2016-04/msg00043.html
- http://www.debian.org/security/2016/dsa-3542
- http://www.debian.org/security/2016/dsa-3542
- http://www.oracle.com/technetwork/topics/security/bulletinapr2016-2952098.html
- http://www.oracle.com/technetwork/topics/security/bulletinapr2016-2952098.html
- https://security.gentoo.org/glsa/201612-19
- https://security.gentoo.org/glsa/201612-19
- https://selenic.com/repo/hg-stable/rev/b6ed2505d6cf
- https://selenic.com/repo/hg-stable/rev/b6ed2505d6cf
- https://selenic.com/repo/hg-stable/rev/b9714d958e89
- https://selenic.com/repo/hg-stable/rev/b9714d958e89
- https://www.mercurial-scm.org/wiki/WhatsNew#Mercurial_3.7.3_.282016-3-29.29
- https://www.mercurial-scm.org/wiki/WhatsNew#Mercurial_3.7.3_.282016-3-29.29