Vulnerabilities > CVE-2017-15088 - Improper Restriction of Operations within the Bounds of a Memory Buffer vulnerability in MIT Kerberos 5
Summary
plugins/preauth/pkinit/pkinit_crypto_openssl.c in MIT Kerberos 5 (aka krb5) through 1.15.2 mishandles Distinguished Name (DN) fields, which allows remote attackers to execute arbitrary code or cause a denial of service (buffer overflow and application crash) in situations involving untrusted X.509 data, related to the get_matching_data and X509_NAME_oneline_ex functions. NOTE: this has security relevance only in use cases outside of the MIT Kerberos distribution, e.g., the use of get_matching_data in KDC certauth plugin code that is specific to Red Hat.
Vulnerable Configurations
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 PhotonOS Local Security Checks NASL id PHOTONOS_PHSA-2017-1_0-0093_APR.NASL description An update of the apr package has been released. last seen 2020-03-17 modified 2019-02-07 plugin id 121778 published 2019-02-07 reporter This script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/121778 title Photon OS 1.0: Apr PHSA-2017-1.0-0093 code # # (C) Tenable Network Security, Inc. # # The descriptive text and package checks in this plugin were # extracted from VMware Security Advisory PHSA-2017-1.0-0093. The text # itself is copyright (C) VMware, Inc. include('compat.inc'); if (description) { script_id(121778); script_version("1.2"); script_set_attribute(attribute:"plugin_modification_date", value:"2019/02/07"); script_cve_id("CVE-2017-12613"); script_name(english:"Photon OS 1.0: Apr PHSA-2017-1.0-0093"); script_summary(english:"Checks the rpm output for the updated packages."); script_set_attribute(attribute:"synopsis", value: "The remote PhotonOS host is missing multiple security updates."); script_set_attribute(attribute:"description", value: "An update of the apr package has been released."); script_set_attribute(attribute:"see_also", value:"https://github.com/vmware/photon/wiki/Security-Updates-1.0-93.md"); script_set_attribute(attribute:"solution", value: "Update the affected Linux packages."); 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:"cvss_score_source", value:"CVE-2017-15088"); script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available"); script_set_attribute(attribute:"vuln_publication_date", value:"2017/12/18"); script_set_attribute(attribute:"patch_publication_date", value:"2017/12/18"); script_set_attribute(attribute:"plugin_publication_date", value:"2019/02/07"); script_set_attribute(attribute:"plugin_type", value:"local"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:vmware:photonos:apr"); script_set_attribute(attribute:"cpe", value:"cpe:/o:vmware:photonos:1.0"); script_end_attributes(); script_category(ACT_GATHER_INFO); script_family(english:"PhotonOS Local Security Checks"); script_copyright(english:"This script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof."); script_dependencies("ssh_get_info.nasl"); script_require_keys("Host/local_checks_enabled", "Host/PhotonOS/release", "Host/PhotonOS/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/PhotonOS/release"); if (isnull(release) || release !~ "^VMware Photon") audit(AUDIT_OS_NOT, "PhotonOS"); if (release !~ "^VMware Photon (?:Linux|OS) 1\.0(\D|$)") audit(AUDIT_OS_NOT, "PhotonOS 1.0"); if (!get_kb_item("Host/PhotonOS/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, "PhotonOS", cpu); flag = 0; if (rpm_check(release:"PhotonOS-1.0", reference:"apr-1.5.2-7.ph1")) flag++; if (rpm_check(release:"PhotonOS-1.0", reference:"apr-debuginfo-1.5.2-7.ph1")) flag++; if (rpm_check(release:"PhotonOS-1.0", reference:"apr-devel-1.5.2-7.ph1")) flag++; if (flag) { security_report_v4( port : 0, severity : SECURITY_HOLE, 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, "apr"); }
NASL family Huawei Local Security Checks NASL id EULEROS_SA-2018-1398.NASL description According to the versions of the krb5 packages installed, the EulerOS installation on the remote host is affected by the following vulnerabilities : - null dereference in kadmind or DN container check bypass by supplying special crafted data (CVE-2018-5729) - DN container check bypass by supplying special crafted data (CVE-2018-5730) - A stack based buffer overflow was found in the get_matching_data() function, when reading the principal last seen 2020-05-15 modified 2018-12-10 plugin id 119526 published 2018-12-10 reporter This script is Copyright (C) 2018-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/119526 title EulerOS 2.0 SP3 : krb5 (EulerOS-SA-2018-1398) code # # (C) Tenable Network Security, Inc. # include("compat.inc"); if (description) { script_id(119526); script_version("1.4"); script_set_attribute(attribute:"plugin_modification_date", value:"2020/05/13"); script_cve_id( "CVE-2017-15088", "CVE-2018-5729", "CVE-2018-5730" ); script_name(english:"EulerOS 2.0 SP3 : krb5 (EulerOS-SA-2018-1398)"); script_summary(english:"Checks the rpm output for the updated packages."); script_set_attribute(attribute:"synopsis", value: "The remote EulerOS host is missing multiple security updates."); script_set_attribute(attribute:"description", value: "According to the versions of the krb5 packages installed, the EulerOS installation on the remote host is affected by the following vulnerabilities : - null dereference in kadmind or DN container check bypass by supplying special crafted data (CVE-2018-5729) - DN container check bypass by supplying special crafted data (CVE-2018-5730) - A stack based buffer overflow was found in the get_matching_data() function, when reading the principal's certificate during pkinit preauthentication. If the Certifcate Authority's subject line is sufficiently long, an attacker able to have a specially crafted certificate signed could crash the authentication process, such as kinit, or, possibly, run arbitrary code.(CVE-2017-15088 ) Note that Tenable Network Security has extracted the preceding description block directly from the EulerOS security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues."); # https://developer.huaweicloud.com/ict/en/site-euleros/euleros/security-advisories/EulerOS-SA-2018-1398 script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?a31ab41c"); script_set_attribute(attribute:"solution", value: "Update the affected krb5 packages."); 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:"patch_publication_date", value:"2018/11/27"); script_set_attribute(attribute:"plugin_publication_date", value:"2018/12/10"); script_set_attribute(attribute:"plugin_type", value:"local"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:huawei:euleros:krb5-devel"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:huawei:euleros:krb5-libs"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:huawei:euleros:krb5-pkinit"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:huawei:euleros:krb5-server"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:huawei:euleros:krb5-server-ldap"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:huawei:euleros:krb5-workstation"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:huawei:euleros:libkadm5"); script_set_attribute(attribute:"cpe", value:"cpe:/o:huawei:euleros:2.0"); script_set_attribute(attribute:"generated_plugin", value:"current"); script_end_attributes(); script_category(ACT_GATHER_INFO); script_family(english:"Huawei Local Security Checks"); script_copyright(english:"This script is Copyright (C) 2018-2020 and is owned by Tenable, Inc. or an Affiliate thereof."); script_dependencies("ssh_get_info.nasl"); script_require_keys("Host/local_checks_enabled", "Host/EulerOS/release", "Host/EulerOS/rpm-list", "Host/EulerOS/sp"); script_exclude_keys("Host/EulerOS/uvp_version"); 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/EulerOS/release"); if (isnull(release) || release !~ "^EulerOS") audit(AUDIT_OS_NOT, "EulerOS"); if (release !~ "^EulerOS release 2\.0(\D|$)") audit(AUDIT_OS_NOT, "EulerOS 2.0"); sp = get_kb_item("Host/EulerOS/sp"); if (isnull(sp) || sp !~ "^(3)$") audit(AUDIT_OS_NOT, "EulerOS 2.0 SP3"); uvp = get_kb_item("Host/EulerOS/uvp_version"); if (!empty_or_null(uvp)) audit(AUDIT_OS_NOT, "EulerOS 2.0 SP3", "EulerOS UVP " + uvp); if (!get_kb_item("Host/EulerOS/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$" && "aarch64" >!< cpu) audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "EulerOS", cpu); if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$") audit(AUDIT_ARCH_NOT, "i686 / x86_64", cpu); flag = 0; pkgs = ["krb5-devel-1.15.1-34", "krb5-libs-1.15.1-34", "krb5-pkinit-1.15.1-34", "krb5-server-1.15.1-34", "krb5-server-ldap-1.15.1-34", "krb5-workstation-1.15.1-34", "libkadm5-1.15.1-34"]; foreach (pkg in pkgs) if (rpm_check(release:"EulerOS-2.0", sp:"3", reference:pkg)) flag++; if (flag) { security_report_v4( port : 0, severity : SECURITY_HOLE, 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, "krb5"); }
NASL family PhotonOS Local Security Checks NASL id PHOTONOS_PHSA-2017-2_0-0007_KRB5.NASL description An update of the krb5 package has been released. last seen 2020-03-17 modified 2019-02-07 plugin id 121788 published 2019-02-07 reporter This script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/121788 title Photon OS 2.0: Krb5 PHSA-2017-2.0-0007 NASL family PhotonOS Local Security Checks NASL id PHOTONOS_PHSA-2017-1_0-0093_LINUX.NASL description An update of the linux package has been released. last seen 2020-06-01 modified 2020-06-02 plugin id 121780 published 2019-02-07 reporter This script is Copyright (C) 2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/121780 title Photon OS 1.0: Linux PHSA-2017-1.0-0093 NASL family Huawei Local Security Checks NASL id EULEROS_SA-2018-1007.NASL description According to the version of the krb5 packages installed, the EulerOS installation on the remote host is affected by the following vulnerability : - plugins/preauth/pkinit/pkinit_crypto_openssl.c in MIT Kerberos 5 (aka krb5) through 1.15.2 mishandles Distinguished Name (DN) fields, which allows remote attackers to execute arbitrary code or cause a denial of service (buffer overflow and application crash) in situations involving untrusted X.509 data, related to the get_matching_data and X509_NAME_oneline_ex functions. (CVE-2017-15088) Note that Tenable Network Security has extracted the preceding description block directly from the EulerOS security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues. last seen 2020-05-06 modified 2018-01-19 plugin id 106148 published 2018-01-19 reporter This script is Copyright (C) 2018-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/106148 title EulerOS 2.0 SP1 : krb5 (EulerOS-SA-2018-1007) NASL family Huawei Local Security Checks NASL id EULEROS_SA-2018-1008.NASL description According to the version of the krb5 packages installed, the EulerOS installation on the remote host is affected by the following vulnerability : - plugins/preauth/pkinit/pkinit_crypto_openssl.c in MIT Kerberos 5 (aka krb5) through 1.15.2 mishandles Distinguished Name (DN) fields, which allows remote attackers to execute arbitrary code or cause a denial of service (buffer overflow and application crash) in situations involving untrusted X.509 data, related to the get_matching_data and X509_NAME_oneline_ex functions. (CVE-2017-15088) Note that Tenable Network Security has extracted the preceding description block directly from the EulerOS security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues. last seen 2020-05-06 modified 2018-01-19 plugin id 106149 published 2018-01-19 reporter This script is Copyright (C) 2018-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/106149 title EulerOS 2.0 SP2 : krb5 (EulerOS-SA-2018-1008) NASL family PhotonOS Local Security Checks NASL id PHOTONOS_PHSA-2017-2_0-0007.NASL description An update of 'krb5', 'libjpeg-turbo', 'libtiff' packages of Photon OS has been released. last seen 2019-02-21 modified 2019-02-07 plugin id 111905 published 2018-08-17 reporter Tenable source https://www.tenable.com/plugins/index.php?view=single&id=111905 title Photon OS 2.0: Krb5 / Libjpeg / Libtiff PHSA-2017-2.0-0007 (deprecated) NASL family PhotonOS Local Security Checks NASL id PHOTONOS_PHSA-2017-2_0-0007_LIBJPEG.NASL description An update of the libjpeg package has been released. last seen 2020-03-17 modified 2019-02-07 plugin id 121789 published 2019-02-07 reporter This script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/121789 title Photon OS 2.0: Libjpeg PHSA-2017-2.0-0007 NASL family Huawei Local Security Checks NASL id EULEROS_SA-2018-1240.NASL description According to the version of the krb5 packages installed, the EulerOS Virtualization installation on the remote host is affected by the following vulnerability : - plugins/preauth/pkinit/pkinit_crypto_openssl.c in MIT Kerberos 5 (aka krb5) through 1.15.2 mishandles Distinguished Name (DN) fields, which allows remote attackers to execute arbitrary code or cause a denial of service (buffer overflow and application crash) in situations involving untrusted X.509 data, related to the get_matching_data and X509_NAME_oneline_ex functions. (CVE-2017-15088) Note that Tenable Network Security has extracted the preceding description block directly from the EulerOS security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues. last seen 2020-06-01 modified 2020-06-02 plugin id 117549 published 2018-09-18 reporter This script is Copyright (C) 2018-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/117549 title EulerOS Virtualization 2.5.0 : krb5 (EulerOS-SA-2018-1240) NASL family Fedora Local Security Checks NASL id FEDORA_2017-2DD6C320A4.NASL description Fix CVE-2017-15088 (Buffer overflow in get_matching_data()) ---- Remove build dependency on python-pyrad. It is only used on the test suite, and we gracefully skip the tests if it is not present. 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 2018-01-15 plugin id 105842 published 2018-01-15 reporter This script is Copyright (C) 2018-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/105842 title Fedora 27 : krb5 (2017-2dd6c320a4) NASL family PhotonOS Local Security Checks NASL id PHOTONOS_PHSA-2017-2_0-0007_LIBTIFF.NASL description An update of the libtiff package has been released. last seen 2020-03-17 modified 2019-02-07 plugin id 121790 published 2019-02-07 reporter This script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/121790 title Photon OS 2.0: Libtiff PHSA-2017-2.0-0007 NASL family PhotonOS Local Security Checks NASL id PHOTONOS_PHSA-2017-1_0-0093.NASL description An update of 'linux', 'krb5', 'subversion', 'apr', 'ncurses' packages of Photon OS has been released. last seen 2019-02-21 modified 2019-02-07 plugin id 111903 published 2018-08-17 reporter Tenable source https://www.tenable.com/plugins/index.php?view=single&id=111903 title Photon OS 1.0: Apr / Krb5 / Linux / Ncurses / Subversion PHSA-2017-1.0-0093 (deprecated) NASL family PhotonOS Local Security Checks NASL id PHOTONOS_PHSA-2017-1_0-0093_KRB5.NASL description An update of the krb5 package has been released. last seen 2020-03-17 modified 2019-02-07 plugin id 121779 published 2019-02-07 reporter This script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/121779 title Photon OS 1.0: Krb5 PHSA-2017-1.0-0093 NASL family PhotonOS Local Security Checks NASL id PHOTONOS_PHSA-2017-1_0-0093_SUBVERSION.NASL description An update of the subversion package has been released. last seen 2020-03-17 modified 2019-02-07 plugin id 121782 published 2019-02-07 reporter This script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/121782 title Photon OS 1.0: Subversion PHSA-2017-1.0-0093 NASL family SuSE Local Security Checks NASL id OPENSUSE-2017-1266.NASL description This update for krb5 fixes the following securitz issueÖ - CVE-2017-15088: A buffer overflow in get_matching_data() was fixed that could under specific circumstances be used to execute code (bsc#1065274) This update was imported from the SUSE:SLE-12-SP2:Update update project. last seen 2020-06-05 modified 2017-11-13 plugin id 104524 published 2017-11-13 reporter This script is Copyright (C) 2017-2020 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/104524 title openSUSE Security Update : krb5 (openSUSE-2017-1266) NASL family PhotonOS Local Security Checks NASL id PHOTONOS_PHSA-2017-1_0-0093_NCURSES.NASL description An update of the ncurses package has been released. last seen 2020-03-17 modified 2019-02-07 plugin id 121781 published 2019-02-07 reporter This script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/121781 title Photon OS 1.0: Ncurses PHSA-2017-1.0-0093 NASL family SuSE Local Security Checks NASL id SUSE_SU-2017-2948-1.NASL description This update for krb5 fixes the following issues: Security issues fixed : - CVE-2017-15088: A buffer overflow in get_matching_data() was fixed that could under specific circumstances be used to execute code (bsc#1065274) Note that Tenable Network Security has extracted the preceding description block directly from the SUSE security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues. last seen 2020-06-01 modified 2020-06-02 plugin id 104473 published 2017-11-09 reporter This script is Copyright (C) 2017-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/104473 title SUSE SLED12 / SLES12 Security Update : krb5 (SUSE-SU-2017:2948-1)
References
- http://www.securityfocus.com/bid/101594
- http://www.securityfocus.com/bid/101594
- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=871698
- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=871698
- https://bugzilla.redhat.com/show_bug.cgi?id=1504045
- https://bugzilla.redhat.com/show_bug.cgi?id=1504045
- https://github.com/krb5/krb5/commit/fbb687db1088ddd894d975996e5f6a4252b9a2b4
- https://github.com/krb5/krb5/commit/fbb687db1088ddd894d975996e5f6a4252b9a2b4
- https://github.com/krb5/krb5/pull/707
- https://github.com/krb5/krb5/pull/707