Vulnerabilities > CVE-2015-3146
Attack vector
NETWORK Attack complexity
LOW Privileges required
NONE Confidentiality impact
NONE Integrity impact
NONE Availability impact
HIGH Summary
The (1) SSH_MSG_NEWKEYS and (2) SSH_MSG_KEXDH_REPLY packet handlers in package_cb.c in libssh before 0.6.5 do not properly validate state, which allows remote attackers to cause a denial of service (NULL pointer dereference and crash) via a crafted SSH packet.
Vulnerable Configurations
Part | Description | Count |
---|---|---|
Application | 15 | |
OS | 3 | |
OS | 2 | |
OS | 2 |
Nessus
NASL family Fedora Local Security Checks NASL id FEDORA_2015-7590.NASL description Security fix for CVE-2015-3146 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 2015-05-15 plugin id 83478 published 2015-05-15 reporter This script is Copyright (C) 2015-2020 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/83478 title Fedora 21 : libssh-0.6.5-1.fc21 (2015-7590) 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 2015-7590. # include("compat.inc"); if (description) { script_id(83478); script_version("2.4"); script_set_attribute(attribute:"plugin_modification_date", value:"2020/06/04"); script_cve_id("CVE-2015-3146"); script_xref(name:"FEDORA", value:"2015-7590"); script_name(english:"Fedora 21 : libssh-0.6.5-1.fc21 (2015-7590)"); 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-2015-3146 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=1213775" ); # https://lists.fedoraproject.org/pipermail/package-announce/2015-May/158013.html script_set_attribute( attribute:"see_also", value:"http://www.nessus.org/u?2e24d2c2" ); script_set_attribute( attribute:"solution", value:"Update the affected libssh package." ); script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/I:N/A:P"); script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"); script_set_attribute(attribute:"plugin_type", value:"local"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fedoraproject:fedora:libssh"); script_set_attribute(attribute:"cpe", value:"cpe:/o:fedoraproject:fedora:21"); script_set_attribute(attribute:"patch_publication_date", value:"2015/05/06"); script_set_attribute(attribute:"plugin_publication_date", value:"2015/05/15"); script_end_attributes(); script_category(ACT_GATHER_INFO); script_copyright(english:"This script is Copyright (C) 2015-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:"^21([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Fedora 21.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:"FC21", reference:"libssh-0.6.5-1.fc21")) 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, "libssh"); }
NASL family FreeBSD Local Security Checks NASL id FREEBSD_PKG_0B040E24F75111E4B24D5453ED2E2B49.NASL description Andreas Schneider reports : libssh versions 0.5.1 and above have a logical error in the handling of a SSH_MSG_NEWKEYS and SSH_MSG_KEXDH_REPLY package. A detected error did not set the session into the error state correctly and further processed the packet which leads to a NULL pointer dereference. This is the packet after the initial key exchange and doesn last seen 2020-06-01 modified 2020-06-02 plugin id 83328 published 2015-05-11 reporter This script is Copyright (C) 2015-2018 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/83328 title FreeBSD : libssh -- NULL pointer dereference (0b040e24-f751-11e4-b24d-5453ed2e2b49) code # # (C) Tenable Network Security, Inc. # # The descriptive text and package checks in this plugin were # extracted from the FreeBSD VuXML database : # # Copyright 2003-2018 Jacques Vidrine and contributors # # Redistribution and use in source (VuXML) and 'compiled' forms (SGML, # HTML, PDF, PostScript, RTF and so forth) with or without modification, # are permitted provided that the following conditions are met: # 1. Redistributions of source code (VuXML) must retain the above # copyright notice, this list of conditions and the following # disclaimer as the first lines of this file unmodified. # 2. Redistributions in compiled form (transformed to other DTDs, # published online in any format, converted to PDF, PostScript, # RTF and other formats) must reproduce the above copyright # notice, this list of conditions and the following disclaimer # in the documentation and/or other materials provided with the # distribution. # # THIS DOCUMENTATION IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, # OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT # OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS DOCUMENTATION, # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # include("compat.inc"); if (description) { script_id(83328); script_version("2.5"); script_cvs_date("Date: 2018/11/10 11:49:44"); script_cve_id("CVE-2015-3146"); script_name(english:"FreeBSD : libssh -- NULL pointer dereference (0b040e24-f751-11e4-b24d-5453ed2e2b49)"); script_summary(english:"Checks for updated package in pkg_info output"); script_set_attribute( attribute:"synopsis", value:"The remote FreeBSD host is missing a security-related update." ); script_set_attribute( attribute:"description", value: "Andreas Schneider reports : libssh versions 0.5.1 and above have a logical error in the handling of a SSH_MSG_NEWKEYS and SSH_MSG_KEXDH_REPLY package. A detected error did not set the session into the error state correctly and further processed the packet which leads to a NULL pointer dereference. This is the packet after the initial key exchange and doesn't require authentication. This could be used for a Denial of Service (DoS) attack." ); # https://www.libssh.org/2015/04/30/libssh-0-6-5-security-and-bugfix-release script_set_attribute( attribute:"see_also", value:"http://www.nessus.org/u?ad48287a" ); # https://vuxml.freebsd.org/freebsd/0b040e24-f751-11e4-b24d-5453ed2e2b49.html script_set_attribute( attribute:"see_also", value:"http://www.nessus.org/u?e4cf8fa6" ); script_set_attribute(attribute:"solution", value:"Update the affected package."); script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/I:N/A:P"); script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"); script_set_attribute(attribute:"plugin_type", value:"local"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:freebsd:freebsd:libssh"); script_set_attribute(attribute:"cpe", value:"cpe:/o:freebsd:freebsd"); script_set_attribute(attribute:"vuln_publication_date", value:"2015/04/30"); script_set_attribute(attribute:"patch_publication_date", value:"2015/05/10"); script_set_attribute(attribute:"plugin_publication_date", value:"2015/05/11"); script_end_attributes(); script_category(ACT_GATHER_INFO); script_copyright(english:"This script is Copyright (C) 2015-2018 and is owned by Tenable, Inc. or an Affiliate thereof."); script_family(english:"FreeBSD Local Security Checks"); script_dependencies("ssh_get_info.nasl"); script_require_keys("Host/local_checks_enabled", "Host/FreeBSD/release", "Host/FreeBSD/pkg_info"); exit(0); } include("audit.inc"); include("freebsd_package.inc"); if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED); if (!get_kb_item("Host/FreeBSD/release")) audit(AUDIT_OS_NOT, "FreeBSD"); if (!get_kb_item("Host/FreeBSD/pkg_info")) audit(AUDIT_PACKAGE_LIST_MISSING); flag = 0; if (pkg_test(save_report:TRUE, pkg:"libssh<0.6.5")) flag++; if (flag) { if (report_verbosity > 0) security_warning(port:0, extra:pkg_report_get()); else security_warning(0); exit(0); } else audit(AUDIT_HOST_NOT, "affected");
NASL family SuSE Local Security Checks NASL id OPENSUSE-2015-355.NASL description libssh was updated to fix one security issue. The following vulnerability was fixed : - CVE-2015-3146: Specially crafted packages inserted into a connection could have lead to a client or server process crash via a NULL pointer dereference. last seen 2020-06-05 modified 2015-05-13 plugin id 83394 published 2015-05-13 reporter This script is Copyright (C) 2015-2020 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/83394 title openSUSE Security Update : libssh (openSUSE-2015-355) code #%NASL_MIN_LEVEL 80502 # # (C) Tenable Network Security, Inc. # # The descriptive text and package checks in this plugin were # extracted from openSUSE Security Update openSUSE-2015-355. # # The text description of this plugin is (C) SUSE LLC. # include("compat.inc"); if (description) { script_id(83394); script_version("2.4"); script_set_attribute(attribute:"plugin_modification_date", value:"2020/06/04"); script_cve_id("CVE-2015-3146"); script_name(english:"openSUSE Security Update : libssh (openSUSE-2015-355)"); script_summary(english:"Check for the openSUSE-2015-355 patch"); script_set_attribute( attribute:"synopsis", value:"The remote openSUSE host is missing a security update." ); script_set_attribute( attribute:"description", value: "libssh was updated to fix one security issue. The following vulnerability was fixed : - CVE-2015-3146: Specially crafted packages inserted into a connection could have lead to a client or server process crash via a NULL pointer dereference." ); script_set_attribute( attribute:"see_also", value:"https://bugzilla.opensuse.org/show_bug.cgi?id=928323" ); script_set_attribute( attribute:"solution", value:"Update the affected libssh packages." ); script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/I:N/A:P"); script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"); script_set_attribute(attribute:"plugin_type", value:"local"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libssh-debugsource"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libssh-devel"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libssh4"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libssh4-32bit"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libssh4-debuginfo"); script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libssh4-debuginfo-32bit"); script_set_attribute(attribute:"cpe", value:"cpe:/o:novell:opensuse:13.1"); script_set_attribute(attribute:"cpe", value:"cpe:/o:novell:opensuse:13.2"); script_set_attribute(attribute:"patch_publication_date", value:"2015/05/03"); script_set_attribute(attribute:"plugin_publication_date", value:"2015/05/13"); script_end_attributes(); script_category(ACT_GATHER_INFO); script_copyright(english:"This script is Copyright (C) 2015-2020 Tenable Network Security, Inc."); script_family(english:"SuSE Local Security Checks"); script_dependencies("ssh_get_info.nasl"); script_require_keys("Host/local_checks_enabled", "Host/SuSE/release", "Host/SuSE/rpm-list", "Host/cpu"); 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/SuSE/release"); if (isnull(release) || release =~ "^(SLED|SLES)") audit(AUDIT_OS_NOT, "openSUSE"); if (release !~ "^(SUSE13\.1|SUSE13\.2)$") audit(AUDIT_OS_RELEASE_NOT, "openSUSE", "13.1 / 13.2", release); if (!get_kb_item("Host/SuSE/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING); ourarch = get_kb_item("Host/cpu"); if (!ourarch) audit(AUDIT_UNKNOWN_ARCH); if (ourarch !~ "^(i586|i686|x86_64)$") audit(AUDIT_ARCH_NOT, "i586 / i686 / x86_64", ourarch); flag = 0; if ( rpm_check(release:"SUSE13.1", reference:"libssh-debugsource-0.5.5-2.15.1") ) flag++; if ( rpm_check(release:"SUSE13.1", reference:"libssh-devel-0.5.5-2.15.1") ) flag++; if ( rpm_check(release:"SUSE13.1", reference:"libssh4-0.5.5-2.15.1") ) flag++; if ( rpm_check(release:"SUSE13.1", reference:"libssh4-debuginfo-0.5.5-2.15.1") ) flag++; if ( rpm_check(release:"SUSE13.1", cpu:"x86_64", reference:"libssh4-32bit-0.5.5-2.15.1") ) flag++; if ( rpm_check(release:"SUSE13.1", cpu:"x86_64", reference:"libssh4-debuginfo-32bit-0.5.5-2.15.1") ) flag++; if ( rpm_check(release:"SUSE13.2", reference:"libssh-debugsource-0.6.3-2.7.1") ) flag++; if ( rpm_check(release:"SUSE13.2", reference:"libssh-devel-0.6.3-2.7.1") ) flag++; if ( rpm_check(release:"SUSE13.2", reference:"libssh4-0.6.3-2.7.1") ) flag++; if ( rpm_check(release:"SUSE13.2", reference:"libssh4-debuginfo-0.6.3-2.7.1") ) flag++; if ( rpm_check(release:"SUSE13.2", cpu:"x86_64", reference:"libssh4-32bit-0.6.3-2.7.1") ) flag++; if ( rpm_check(release:"SUSE13.2", cpu:"x86_64", reference:"libssh4-debuginfo-32bit-0.6.3-2.7.1") ) 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, "libssh-debugsource / libssh-devel / libssh4 / libssh4-32bit / etc"); }
NASL family Ubuntu Local Security Checks NASL id UBUNTU_USN-2912-1.NASL description Mariusz Ziulek discovered that libssh incorrectly handled certain packets. A remote attacker could possibly use this issue to cause libssh to crash, resulting in a denial of service. (CVE-2015-3146) Aris Adamantiadis discovered that libssh incorrectly generated ephemeral secret keys of 128 bits instead of the recommended 1024 or 2048 bits when using the diffie-hellman-group1 and diffie-hellman-group14 methods. If a remote attacker were able to perform a man-in-the-middle attack, this flaw could be exploited to view sensitive information. (CVE-2016-0739). Note that Tenable Network Security has extracted the preceding description block directly from the Ubuntu 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 88930 published 2016-02-24 reporter Ubuntu Security Notice (C) 2016-2019 Canonical, Inc. / NASL script (C) 2016-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/88930 title Ubuntu 12.04 LTS / 14.04 LTS / 15.10 : libssh vulnerabilities (USN-2912-1) NASL family SuSE Local Security Checks NASL id SUSE_SU-2015-1707-2.NASL description The encryption library libssh was updated to fix one security issue. The following vulnerability was fixed : - CVE-2015-3146: Unauthenticated remote attackers could crash the server or client with specially crafted packages. 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 86346 published 2015-10-12 reporter This script is Copyright (C) 2015-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/86346 title SUSE SLED12 Security Update : libssh (SUSE-SU-2015:1707-2) NASL family Fedora Local Security Checks NASL id FEDORA_2015-10962.NASL description Update to version 0.7.1 Add patch to fix undefined symbol: ssh_forward_listen (bug #1221310) Update to version 0.7.0 Security fix for CVE-2015-3146 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 2015-07-15 plugin id 84750 published 2015-07-15 reporter This script is Copyright (C) 2015-2020 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/84750 title Fedora 22 : libssh-0.7.1-1.fc22 (2015-10962) NASL family Debian Local Security Checks NASL id DEBIAN_DSA-3488.NASL description Aris Adamantiadis discovered that libssh, a tiny C SSH library, incorrectly generated a short ephemeral secret for the diffie-hellman-group1 and diffie-hellman-group14 key exchange methods. The resulting secret is 128 bits long, instead of the recommended sizes of 1024 and 2048 bits respectively. This flaw could allow an eavesdropper with enough resources to decrypt or intercept SSH sessions. last seen 2020-06-01 modified 2020-06-02 plugin id 88916 published 2016-02-24 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/88916 title Debian DSA-3488-1 : libssh - security update
References
- http://lists.fedoraproject.org/pipermail/package-announce/2015-July/161802.html
- http://lists.fedoraproject.org/pipermail/package-announce/2015-July/161802.html
- http://lists.fedoraproject.org/pipermail/package-announce/2015-May/158013.html
- http://lists.fedoraproject.org/pipermail/package-announce/2015-May/158013.html
- http://www.debian.org/security/2016/dsa-3488
- http://www.debian.org/security/2016/dsa-3488
- http://www.ubuntu.com/usn/USN-2912-1
- http://www.ubuntu.com/usn/USN-2912-1
- https://git.libssh.org/projects/libssh.git/commit/?h=libssh-0.6.5&id=94f6955fbaee6fda9385a23e505497efe21f5b4f
- https://git.libssh.org/projects/libssh.git/commit/?h=libssh-0.6.5&id=94f6955fbaee6fda9385a23e505497efe21f5b4f
- https://www.libssh.org/2015/04/30/libssh-0-6-5-security-and-bugfix-release/
- https://www.libssh.org/2015/04/30/libssh-0-6-5-security-and-bugfix-release/
- https://www.libssh.org/security/advisories/CVE-2015-3146.txt
- https://www.libssh.org/security/advisories/CVE-2015-3146.txt