Vulnerabilities > CVE-2016-8714 - Classic Buffer Overflow vulnerability in multiple products
Attack vector
NETWORK Attack complexity
LOW Privileges required
NONE Confidentiality impact
HIGH Integrity impact
HIGH Availability impact
HIGH Summary
An exploitable buffer overflow vulnerability exists in the LoadEncoding functionality of the R programming language version 3.3.0. A specially crafted R script can cause a buffer overflow resulting in a memory corruption. An attacker can send a malicious R script to trigger this vulnerability.
Vulnerable Configurations
Part | Description | Count |
---|---|---|
Application | 2 | |
OS | 1 |
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.
- 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.
- Client-side Injection-induced Buffer Overflow This type of attack exploits a buffer overflow vulnerability in targeted client software through injection of malicious content from a custom-built hostile service.
- Filter Failure through Buffer Overflow In this attack, the idea is to cause an active filter to fail by causing an oversized transaction. An attacker may try to feed overly long input strings to the program in an attempt to overwhelm the filter (by causing a buffer overflow) and hoping that the filter does not fail securely (i.e. the user input is let into the system unfiltered).
- MIME Conversion An attacker exploits a weakness in the MIME conversion routine to cause a buffer overflow and gain control over the mail server machine. The MIME system is designed to allow various different information formats to be interpreted and sent via e-mail. Attack points exist when data are converted to MIME compatible format and back.
Nessus
NASL family Debian Local Security Checks NASL id DEBIAN_DLA-861.NASL description An exploitable buffer overflow vulnerability exists in the LoadEncoding functionality of the R programming language. A specially crafted R script can cause a buffer overflow resulting in a memory corruption. An attacker can send a malicious R script to trigger this vulnerability. For Debian 7 last seen 2020-03-17 modified 2017-03-20 plugin id 97798 published 2017-03-20 reporter This script is Copyright (C) 2017-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/97798 title Debian DLA-861-1 : r-base security update code #%NASL_MIN_LEVEL 80502 # # (C) Tenable Network Security, Inc. # # The descriptive text and package checks in this plugin were # extracted from Debian Security Advisory DLA-861-1. The text # itself is copyright (C) Software in the Public Interest, Inc. # include("compat.inc"); if (description) { script_id(97798); script_version("3.4"); script_set_attribute(attribute:"plugin_modification_date", value:"2020/03/12"); script_cve_id("CVE-2016-8714"); script_name(english:"Debian DLA-861-1 : r-base security update"); script_summary(english:"Checks dpkg output for the updated packages."); script_set_attribute( attribute:"synopsis", value:"The remote Debian host is missing a security update." ); script_set_attribute( attribute:"description", value: "An exploitable buffer overflow vulnerability exists in the LoadEncoding functionality of the R programming language. A specially crafted R script can cause a buffer overflow resulting in a memory corruption. An attacker can send a malicious R script to trigger this vulnerability. For Debian 7 'Wheezy', this problem has been fixed in version 2.15.1-4+deb7u1. We recommend that you upgrade your r-base packages. NOTE: Tenable Network Security has extracted the preceding description block directly from the DLA 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://lists.debian.org/debian-lts-announce/2017/03/msg00018.html" ); script_set_attribute( attribute:"see_also", value:"https://packages.debian.org/source/wheezy/r-base" ); script_set_attribute(attribute:"solution", value:"Upgrade 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:H/PR:N/UI:R/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:"plugin_type", value:"local"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:r-base"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:r-base-core"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:r-base-core-dbg"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:r-base-dev"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:r-base-html"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:r-doc-html"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:r-doc-info"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:r-doc-pdf"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:r-mathlib"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:r-recommended"); script_set_attribute(attribute:"cpe", value:"cpe:/o:debian:debian_linux:7.0"); script_set_attribute(attribute:"patch_publication_date", value:"2017/03/17"); script_set_attribute(attribute:"plugin_publication_date", value:"2017/03/20"); script_end_attributes(); script_category(ACT_GATHER_INFO); script_copyright(english:"This script is Copyright (C) 2017-2020 and is owned by Tenable, Inc. or an Affiliate thereof."); script_family(english:"Debian Local Security Checks"); script_dependencies("ssh_get_info.nasl"); script_require_keys("Host/local_checks_enabled", "Host/Debian/release", "Host/Debian/dpkg-l"); exit(0); } include("audit.inc"); include("debian_package.inc"); if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED); if (!get_kb_item("Host/Debian/release")) audit(AUDIT_OS_NOT, "Debian"); if (!get_kb_item("Host/Debian/dpkg-l")) audit(AUDIT_PACKAGE_LIST_MISSING); flag = 0; if (deb_check(release:"7.0", prefix:"r-base", reference:"2.15.1-4+deb7u1")) flag++; if (deb_check(release:"7.0", prefix:"r-base-core", reference:"2.15.1-4+deb7u1")) flag++; if (deb_check(release:"7.0", prefix:"r-base-core-dbg", reference:"2.15.1-4+deb7u1")) flag++; if (deb_check(release:"7.0", prefix:"r-base-dev", reference:"2.15.1-4+deb7u1")) flag++; if (deb_check(release:"7.0", prefix:"r-base-html", reference:"2.15.1-4+deb7u1")) flag++; if (deb_check(release:"7.0", prefix:"r-doc-html", reference:"2.15.1-4+deb7u1")) flag++; if (deb_check(release:"7.0", prefix:"r-doc-info", reference:"2.15.1-4+deb7u1")) flag++; if (deb_check(release:"7.0", prefix:"r-doc-pdf", reference:"2.15.1-4+deb7u1")) flag++; if (deb_check(release:"7.0", prefix:"r-mathlib", reference:"2.15.1-4+deb7u1")) flag++; if (deb_check(release:"7.0", prefix:"r-recommended", reference:"2.15.1-4+deb7u1")) flag++; if (flag) { if (report_verbosity > 0) security_warning(port:0, extra:deb_report_get()); else security_warning(0); exit(0); } else audit(AUDIT_HOST_NOT, "affected");
NASL family Fedora Local Security Checks NASL id FEDORA_2017-DA9D0F0DC0.NASL description Update to 3.3.3. Fix CVE-2016-8714. Note that Tenable Network Security has extracted the preceding description block directly from the Fedora update system website. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues. last seen 2020-06-05 modified 2017-03-22 plugin id 97870 published 2017-03-22 reporter This script is Copyright (C) 2017-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/97870 title Fedora 24 : R / rkward / rpy (2017-da9d0f0dc0) 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 FEDORA-2017-da9d0f0dc0. # include("compat.inc"); if (description) { script_id(97870); script_version("3.3"); script_set_attribute(attribute:"plugin_modification_date", value:"2020/06/04"); script_cve_id("CVE-2016-8714"); script_xref(name:"FEDORA", value:"2017-da9d0f0dc0"); script_name(english:"Fedora 24 : R / rkward / rpy (2017-da9d0f0dc0)"); script_summary(english:"Checks rpm output for the updated packages."); script_set_attribute( attribute:"synopsis", value:"The remote Fedora host is missing one or more security updates." ); script_set_attribute( attribute:"description", value: "Update to 3.3.3. Fix CVE-2016-8714. Note that Tenable Network Security has extracted the preceding description block directly from the Fedora update system website. 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://bodhi.fedoraproject.org/updates/FEDORA-2017-da9d0f0dc0" ); script_set_attribute( attribute:"solution", value:"Update the affected R, rkward and / or rpy packages." ); 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:H/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:R"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fedoraproject:fedora:rkward"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fedoraproject:fedora:rpy"); script_set_attribute(attribute:"cpe", value:"cpe:/o:fedoraproject:fedora:24"); script_set_attribute(attribute:"vuln_publication_date", value:"2017/03/10"); script_set_attribute(attribute:"patch_publication_date", value:"2017/03/20"); script_set_attribute(attribute:"plugin_publication_date", value:"2017/03/22"); script_set_attribute(attribute:"generated_plugin", value:"current"); script_end_attributes(); script_category(ACT_GATHER_INFO); script_copyright(english:"This script is Copyright (C) 2017-2020 and is owned by Tenable, Inc. or an Affiliate thereof."); 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 = pregmatch(pattern: "Fedora.*release ([0-9]+)", string:release); if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "Fedora"); os_ver = os_ver[1]; if (! preg(pattern:"^24([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Fedora 24", "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:"FC24", reference:"R-3.3.3-1.fc24")) flag++; if (rpm_check(release:"FC24", reference:"rkward-0.6.5-5.fc24")) flag++; if (rpm_check(release:"FC24", reference:"rpy-2.8.5-3.fc24")) 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, "R / rkward / rpy"); }
NASL family Fedora Local Security Checks NASL id FEDORA_2017-AE18216E75.NASL description Update to 3.3.3. Fix CVE-2016-8714. Note that Tenable Network Security has extracted the preceding description block directly from the Fedora update system website. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues. last seen 2020-06-05 modified 2017-03-21 plugin id 97841 published 2017-03-21 reporter This script is Copyright (C) 2017-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/97841 title Fedora 25 : R / rkward / rpy (2017-ae18216e75) 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 FEDORA-2017-ae18216e75. # include("compat.inc"); if (description) { script_id(97841); script_version("3.3"); script_set_attribute(attribute:"plugin_modification_date", value:"2020/06/04"); script_cve_id("CVE-2016-8714"); script_xref(name:"FEDORA", value:"2017-ae18216e75"); script_name(english:"Fedora 25 : R / rkward / rpy (2017-ae18216e75)"); script_summary(english:"Checks rpm output for the updated packages."); script_set_attribute( attribute:"synopsis", value:"The remote Fedora host is missing one or more security updates." ); script_set_attribute( attribute:"description", value: "Update to 3.3.3. Fix CVE-2016-8714. Note that Tenable Network Security has extracted the preceding description block directly from the Fedora update system website. 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://bodhi.fedoraproject.org/updates/FEDORA-2017-ae18216e75" ); script_set_attribute( attribute:"solution", value:"Update the affected R, rkward and / or rpy packages." ); 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:H/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:R"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fedoraproject:fedora:rkward"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fedoraproject:fedora:rpy"); script_set_attribute(attribute:"cpe", value:"cpe:/o:fedoraproject:fedora:25"); script_set_attribute(attribute:"vuln_publication_date", value:"2017/03/10"); script_set_attribute(attribute:"patch_publication_date", value:"2017/03/20"); script_set_attribute(attribute:"plugin_publication_date", value:"2017/03/21"); script_set_attribute(attribute:"generated_plugin", value:"current"); script_end_attributes(); script_category(ACT_GATHER_INFO); script_copyright(english:"This script is Copyright (C) 2017-2020 and is owned by Tenable, Inc. or an Affiliate thereof."); 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 = pregmatch(pattern: "Fedora.*release ([0-9]+)", string:release); if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "Fedora"); os_ver = os_ver[1]; if (! preg(pattern:"^25([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Fedora 25", "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:"FC25", reference:"R-3.3.3-1.fc25")) flag++; if (rpm_check(release:"FC25", reference:"rkward-0.6.5-5.fc25")) flag++; if (rpm_check(release:"FC25", reference:"rpy-2.8.5-3.fc25")) 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, "R / rkward / rpy"); }
NASL family Fedora Local Security Checks NASL id FEDORA_2017-07C8F3EA2B.NASL description Update to 3.3.3. Fix CVE-2016-8714. ---- Rebuilt for fc26 Note that Tenable Network Security has extracted the preceding description block directly from the Fedora update system website. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues. last seen 2020-06-05 modified 2017-07-17 plugin id 101565 published 2017-07-17 reporter This script is Copyright (C) 2017-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/101565 title Fedora 26 : R / rkward / rpy (2017-07c8f3ea2b) 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 FEDORA-2017-07c8f3ea2b. # include("compat.inc"); if (description) { script_id(101565); script_version("3.3"); script_set_attribute(attribute:"plugin_modification_date", value:"2020/06/04"); script_cve_id("CVE-2016-8714"); script_xref(name:"FEDORA", value:"2017-07c8f3ea2b"); script_name(english:"Fedora 26 : R / rkward / rpy (2017-07c8f3ea2b)"); script_summary(english:"Checks rpm output for the updated packages."); script_set_attribute( attribute:"synopsis", value:"The remote Fedora host is missing one or more security updates." ); script_set_attribute( attribute:"description", value: "Update to 3.3.3. Fix CVE-2016-8714. ---- Rebuilt for fc26 Note that Tenable Network Security has extracted the preceding description block directly from the Fedora update system website. 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://bodhi.fedoraproject.org/updates/FEDORA-2017-07c8f3ea2b" ); script_set_attribute( attribute:"solution", value:"Update the affected R, rkward and / or rpy packages." ); 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:H/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:R"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fedoraproject:fedora:rkward"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fedoraproject:fedora:rpy"); script_set_attribute(attribute:"cpe", value:"cpe:/o:fedoraproject:fedora:26"); script_set_attribute(attribute:"vuln_publication_date", value:"2017/03/10"); script_set_attribute(attribute:"patch_publication_date", value:"2017/04/01"); script_set_attribute(attribute:"plugin_publication_date", value:"2017/07/17"); script_set_attribute(attribute:"generated_plugin", value:"current"); script_end_attributes(); script_category(ACT_GATHER_INFO); script_copyright(english:"This script is Copyright (C) 2017-2020 and is owned by Tenable, Inc. or an Affiliate thereof."); 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 = pregmatch(pattern: "Fedora.*release ([0-9]+)", string:release); if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "Fedora"); os_ver = os_ver[1]; if (! preg(pattern:"^26([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Fedora 26", "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:"FC26", reference:"R-3.3.3-1.fc26")) flag++; if (rpm_check(release:"FC26", reference:"rkward-0.6.5-5.fc26")) flag++; if (rpm_check(release:"FC26", reference:"rpy-2.8.5-3.fc26")) 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, "R / rkward / rpy"); }
NASL family Debian Local Security Checks NASL id DEBIAN_DSA-3813.NASL description Cory Duplantis discovered a buffer overflow in the R programming language. A malformed encoding file may lead to the execution of arbitrary code during PDF generation. last seen 2020-06-01 modified 2020-06-02 plugin id 97802 published 2017-03-20 reporter This script is Copyright (C) 2017-2018 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/97802 title Debian DSA-3813-1 : r-base - security update code # # (C) Tenable Network Security, Inc. # # The descriptive text and package checks in this plugin were # extracted from Debian Security Advisory DSA-3813. The text # itself is copyright (C) Software in the Public Interest, Inc. # include("compat.inc"); if (description) { script_id(97802); script_version("3.5"); script_cvs_date("Date: 2018/11/10 11:49:38"); script_cve_id("CVE-2016-8714"); script_xref(name:"DSA", value:"3813"); script_name(english:"Debian DSA-3813-1 : r-base - security update"); script_summary(english:"Checks dpkg output for the updated package"); script_set_attribute( attribute:"synopsis", value:"The remote Debian host is missing a security-related update." ); script_set_attribute( attribute:"description", value: "Cory Duplantis discovered a buffer overflow in the R programming language. A malformed encoding file may lead to the execution of arbitrary code during PDF generation." ); script_set_attribute( attribute:"see_also", value:"https://packages.debian.org/source/jessie/r-base" ); script_set_attribute( attribute:"see_also", value:"https://www.debian.org/security/2017/dsa-3813" ); script_set_attribute( attribute:"solution", value: "Upgrade the r-base packages. For the stable distribution (jessie), this problem has been fixed in version 3.1.1-1+deb8u1. For the upcoming stable distribution (stretch), this problem has been fixed in version 3.3.3-1." ); 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:H/PR:N/UI:R/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:"plugin_type", value:"local"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:r-base"); script_set_attribute(attribute:"cpe", value:"cpe:/o:debian:debian_linux:8.0"); script_set_attribute(attribute:"patch_publication_date", value:"2017/03/19"); script_set_attribute(attribute:"plugin_publication_date", value:"2017/03/20"); script_end_attributes(); script_category(ACT_GATHER_INFO); script_copyright(english:"This script is Copyright (C) 2017-2018 and is owned by Tenable, Inc. or an Affiliate thereof."); script_family(english:"Debian Local Security Checks"); script_dependencies("ssh_get_info.nasl"); script_require_keys("Host/local_checks_enabled", "Host/Debian/release", "Host/Debian/dpkg-l"); exit(0); } include("audit.inc"); include("debian_package.inc"); if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED); if (!get_kb_item("Host/Debian/release")) audit(AUDIT_OS_NOT, "Debian"); if (!get_kb_item("Host/Debian/dpkg-l")) audit(AUDIT_PACKAGE_LIST_MISSING); flag = 0; if (deb_check(release:"8.0", prefix:"r-base", reference:"3.1.1-1+deb8u1")) flag++; if (deb_check(release:"8.0", prefix:"r-base-core", reference:"3.1.1-1+deb8u1")) flag++; if (deb_check(release:"8.0", prefix:"r-base-core-dbg", reference:"3.1.1-1+deb8u1")) flag++; if (deb_check(release:"8.0", prefix:"r-base-dev", reference:"3.1.1-1+deb8u1")) flag++; if (deb_check(release:"8.0", prefix:"r-base-html", reference:"3.1.1-1+deb8u1")) flag++; if (deb_check(release:"8.0", prefix:"r-doc-html", reference:"3.1.1-1+deb8u1")) flag++; if (deb_check(release:"8.0", prefix:"r-doc-info", reference:"3.1.1-1+deb8u1")) flag++; if (deb_check(release:"8.0", prefix:"r-doc-pdf", reference:"3.1.1-1+deb8u1")) flag++; if (deb_check(release:"8.0", prefix:"r-mathlib", reference:"3.1.1-1+deb8u1")) flag++; if (deb_check(release:"8.0", prefix:"r-recommended", reference:"3.1.1-1+deb8u1")) flag++; if (flag) { if (report_verbosity > 0) security_warning(port:0, extra:deb_report_get()); else security_warning(0); exit(0); } else audit(AUDIT_HOST_NOT, "affected");
Seebug
bulletinFamily | exploit |
description | ### Summary An exploitable buffer overflow vulnerability exists in the LoadEncoding functionality of the R programming language version 3.3.0. A specially crafted R script can cause a buffer overflow resulting in a memory corruption. An attacker can send a malicious R script to trigger this vulnerability. ### Tested Versions R 3.3.0 R 3.3.2 ### Product URLs https://www.r-project.org/ ### CVSSv3 Score 7.5 - CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H ### Details The R programming language is commonly used in statistical computing and supported by the R Foundation for Statistical Computing. R is praised for having a large variety of statistical and graphical features. During the creation of a PDF document, the file containing the encoding array can be specified by the user. The following command can specify the encoding file for a pdf. ``` pdf(encoding="/path/to/some/file") ``` While loading this file, each of the specific elements in the file is copied into the `cname` element for each item in the `encnames` array [0]. ``` src/library/grDevices/src/devPS.c:493 LoadEncoding(const char *encpath, char *encname, char *encconvname, CNAME *encnames, char *enccode, Rboolean isPDF) { ... for(i = 0; i < 256; i++) { if (GetNextItem(fp, buf, i, &state)) { fclose(fp); return 0; } strcpy(encnames[i].cname, buf+1); // [0] strcat(enccode, " /"); strcat(enccode, encnames[i].cname); if(i%8 == 7) strcat(enccode, "\n"); } ... ``` The `encnames` array is a part of a `EncodingInfo` structure. ``` /* * Information about a font encoding */ typedef struct EncInfo { char encpath[PATH_MAX]; char name[100]; /* Name written to PostScript/PDF file */ char convname[50]; /* Name used in mbcsToSbcs() with iconv() */ CNAME encnames[256]; char enccode[5000]; } EncodingInfo, *encodinginfo; ``` The `encnames` array is of structure type `CNAME` with a `cname` attribute that is a buffer of length 40 [1]. ``` src/library/grDevices/src/devPS.c:281 /* The longest named Adobe glyph is 39 chars: whitediamondcontainingblacksmalldiamond */ typedef struct { char cname[40]; // [1] } CNAME; ``` By providing an element in the encoding file of longer than length 40, the `cname` buffer is overflown. This could be leveraged to potentially gain remote code execution later in the program. ### Crash Information ``` $ R -d valgrind -f poc.r ... ==21442== Invalid write of size 1 ==21442== at 0x4C34140: __stpcpy_sse2_unaligned (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==21442== by 0xA0D4D89: ??? (in /usr/lib/R/library/grDevices/libs/grDevices.so) ==21442== by 0xA0D6A5B: ??? (in /usr/lib/R/library/grDevices/libs/grDevices.so) ==21442== by 0xA0E226D: PDFDeviceDriver (in /usr/lib/R/library/grDevices/libs/grDevices.so) ==21442== by 0xA0E3DE9: PDF (in /usr/lib/R/library/grDevices/libs/grDevices.so) ==21442== by 0x4F08F80: ??? (in /usr/lib/R/lib/libR.so) ==21442== by 0x4F34BFC: ??? (in /usr/lib/R/lib/libR.so) ==21442== by 0x4F40F2F: Rf_eval (in /usr/lib/R/lib/libR.so) ==21442== by 0x4F4296D: Rf_applyClosure (in /usr/lib/R/lib/libR.so) ==21442== by 0x4F410CC: Rf_eval (in /usr/lib/R/lib/libR.so) ==21442== by 0x4F68891: Rf_ReplIteration (in /usr/lib/R/lib/libR.so) ==21442== by 0x4F68C10: ??? (in /usr/lib/R/lib/libR.so) ==21442== Address 0x79f5eee is 0 bytes after a block of size 19,486 alloc'd ==21442== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==21442== by 0xA0D6A28: ??? (in /usr/lib/R/library/grDevices/libs/grDevices.so) ==21442== by 0xA0E226D: PDFDeviceDriver (in /usr/lib/R/library/grDevices/libs/grDevices.so) ==21442== by 0xA0E3DE9: PDF (in /usr/lib/R/library/grDevices/libs/grDevices.so) ==21442== by 0x4F08F80: ??? (in /usr/lib/R/lib/libR.so) ==21442== by 0x4F34BFC: ??? (in /usr/lib/R/lib/libR.so) ==21442== by 0x4F40F2F: Rf_eval (in /usr/lib/R/lib/libR.so) ==21442== by 0x4F4296D: Rf_applyClosure (in /usr/lib/R/lib/libR.so) ==21442== by 0x4F410CC: Rf_eval (in /usr/lib/R/lib/libR.so) ==21442== by 0x4F68891: Rf_ReplIteration (in /usr/lib/R/lib/libR.so) ==21442== by 0x4F68C10: ??? (in /usr/lib/R/lib/libR.so) ==21442== by 0x4F68CC3: run_Rmainloop (in /usr/lib/R/lib/libR.so) ``` ### Timeline * 2016-11-17 - Vendor Disclosure * 2017-03-09 - Public Release ### CREDIT * Discovered by Cory Duplantis of Cisco Talos |
id | SSV:96546 |
last seen | 2017-11-19 |
modified | 2017-09-20 |
published | 2017-09-20 |
reporter | Root |
title | R PDF LoadEncoding Code Execution Vulnerability(CVE-2016-8714) |
Talos
id | TALOS-2016-0227 |
last seen | 2019-05-29 |
published | 2017-03-09 |
reporter | Talos Intelligence |
source | http://www.talosintelligence.com/vulnerability_reports/TALOS-2016-0227 |
title | R PDF LoadEncoding Code Execution Vulnerability |