Mandriva Linux Security Advisory : mysql (MDVSA-2008:150) - Nessus

High   Plugin ID: 36561

This page contains detailed information about the Mandriva Linux Security Advisory : mysql (MDVSA-2008:150) Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 36561
Name: Mandriva Linux Security Advisory : mysql (MDVSA-2008:150)
Filename: mandriva_MDVSA-2008-150.nasl
Vulnerability Published: N/A
This Plugin Published: 2009-04-23
Last Modification Time: 2021-01-06
Plugin Version: 1.16
Plugin Type: local
Plugin Family: Mandriva Local Security Checks
Dependencies: ssh_get_info.nasl
Required KB Items [?]: Host/cpu, Host/local_checks_enabled, Host/Mandrake/release, Host/Mandrake/rpm-list

Vulnerability Information


Severity: High
Vulnerability Published: N/A
Patch Published: 2008-07-19
CVE [?]: CVE-2008-0226, CVE-2008-0227, CVE-2008-2079
CPE [?]: cpe:/o:mandriva:linux:2007.1, cpe:/o:mandriva:linux:2008.0, p-cpe:/a:mandriva:linux:lib64mysql15, p-cpe:/a:mandriva:linux:lib64mysql-devel, p-cpe:/a:mandriva:linux:lib64mysql-static-devel, p-cpe:/a:mandriva:linux:libmysql15, p-cpe:/a:mandriva:linux:libmysql-devel, p-cpe:/a:mandriva:linux:libmysql-static-devel, p-cpe:/a:mandriva:linux:mysql, p-cpe:/a:mandriva:linux:mysql-bench, p-cpe:/a:mandriva:linux:mysql-client, p-cpe:/a:mandriva:linux:mysql-common, p-cpe:/a:mandriva:linux:mysql-max, p-cpe:/a:mandriva:linux:mysql-ndb-extra, p-cpe:/a:mandriva:linux:mysql-ndb-management, p-cpe:/a:mandriva:linux:mysql-ndb-storage, p-cpe:/a:mandriva:linux:mysql-ndb-tools

Synopsis

The remote Mandriva Linux host is missing one or more security updates.

Description

Multiple buffer overflows in yaSSL, which is used in MySQL, allowed remote attackers to execute arbitrary code (CVE-2008-0226) or cause a denial of service via a special Hello packet (CVE-2008-0227).

Sergei Golubchik found that MySQL did not properly validate optional data or index directory paths given in a CREATE TABLE statement; as well it would not, under certain conditions, prevent two databases from using the same paths for data or index files. This could allow an authenticated user with appropriate privilege to create tables in one database to read and manipulate data in tables later created in other databases, regardless of GRANT privileges (CVE-2008-2079).

The updated packages have been patched to correct these issues.

Solution

Update the affected packages.

Public Exploits


Target Network Port(s): N/A
Target Asset(s): N/A
Exploit Available: True (Metasploit Framework, Exploit-DB, GitHub, Core Impact)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the Mandriva Linux Security Advisory : mysql (MDVSA-2008:150) vulnerability:

  1. Metasploit: exploit/linux/mysql/mysql_yassl_hello
    [MySQL yaSSL SSL Hello Message Buffer Overflow]
  2. Metasploit: exploit/windows/mysql/mysql_yassl_hello
    [MySQL yaSSL SSL Hello Message Buffer Overflow]
  3. Exploit-DB: exploits/linux/remote/9953.rb
    [EDB-9953: MySQL 6.0 yaSSL 1.7.5 - Hello Message Buffer Overflow (Metasploit)]
  4. Exploit-DB: exploits/windows/remote/16701.rb
    [EDB-16701: MySQL yaSSL (Windows) - SSL Hello Message Buffer Overflow (Metasploit)]
  5. Exploit-DB: exploits/linux/remote/16849.rb
    [EDB-16849: MySQL yaSSL (Linux) - SSL Hello Message Buffer Overflow (Metasploit)]
  6. GitHub: https://github.com/CoolerVoid/Vision
    [CVE-2008-2079]
  7. GitHub: https://github.com/CoolerVoid/Vision2
    [CVE-2008-2079]
  8. GitHub: https://github.com/tomwillfixit/alpine-cvecheck
    [CVE-2008-2079]

Before running any exploit against any system, make sure you are authorized by the owner of the target system(s) to perform such activity. In any other case, this would be considered as an illegal activity.

WARNING: Beware of using unverified exploits from sources such as GitHub or Exploit-DB. These exploits and PoCs could contain malware. For more information, see how to use exploits safely.

Risk Information


CVSS V2 Vector [?]: AV:N/AC:L/Au:N/C:P/I:P/A:P
CVSS Base Score:7.5 (High)
Impact Subscore:6.4
Exploitability Subscore:10.0
CVSS Temporal Score:NA (None)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:7.5 (High)

Go back to menu.

Plugin Source


This is the mandriva_MDVSA-2008-150.nasl nessus plugin source code. This script is Copyright (C) 2009-2021 Tenable Network Security, Inc.

#%NASL_MIN_LEVEL 70300

#
# (C) Tenable Network Security, Inc.
#
# The descriptive text and package checks in this plugin were  
# extracted from Mandriva Linux Security Advisory MDVSA-2008:150. 
# The text itself is copyright (C) Mandriva S.A.
#

include('deprecated_nasl_level.inc');
include('compat.inc');

if (description)
{
  script_id(36561);
  script_version("1.16");
  script_set_attribute(attribute:"plugin_modification_date", value:"2021/01/06");

  script_cve_id("CVE-2008-0226", "CVE-2008-0227", "CVE-2008-2079");
  script_xref(name:"MDVSA", value:"2008:150");

  script_name(english:"Mandriva Linux Security Advisory : mysql (MDVSA-2008:150)");
  script_summary(english:"Checks rpm output for the updated packages");

  script_set_attribute(
    attribute:"synopsis", 
    value:
"The remote Mandriva Linux host is missing one or more security
updates."
  );
  script_set_attribute(
    attribute:"description", 
    value:
"Multiple buffer overflows in yaSSL, which is used in MySQL, allowed
remote attackers to execute arbitrary code (CVE-2008-0226) or cause a
denial of service via a special Hello packet (CVE-2008-0227).

Sergei Golubchik found that MySQL did not properly validate optional
data or index directory paths given in a CREATE TABLE statement; as
well it would not, under certain conditions, prevent two databases
from using the same paths for data or index files. This could allow an
authenticated user with appropriate privilege to create tables in one
database to read and manipulate data in tables later created in other
databases, regardless of GRANT privileges (CVE-2008-2079).

The updated packages have been patched to correct these issues."
  );
  script_set_attribute(attribute:"solution", value:"Update the affected packages.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"exploit_framework_core", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'MySQL yaSSL SSL Hello Message Buffer Overflow');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
  script_cwe_id(119, 264);

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:lib64mysql-devel");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:lib64mysql-static-devel");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:lib64mysql15");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:libmysql-devel");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:libmysql-static-devel");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:libmysql15");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:mysql");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:mysql-bench");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:mysql-client");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:mysql-common");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:mysql-max");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:mysql-ndb-extra");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:mysql-ndb-management");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:mysql-ndb-storage");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:mandriva:linux:mysql-ndb-tools");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:mandriva:linux:2007.1");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:mandriva:linux:2008.0");

  script_set_attribute(attribute:"patch_publication_date", value:"2008/07/19");
  script_set_attribute(attribute:"plugin_publication_date", value:"2009/04/23");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_copyright(english:"This script is Copyright (C) 2009-2021 Tenable Network Security, Inc.");
  script_family(english:"Mandriva Local Security Checks");

  script_dependencies("ssh_get_info.nasl");
  script_require_keys("Host/local_checks_enabled", "Host/cpu", "Host/Mandrake/release", "Host/Mandrake/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);
if (!get_kb_item("Host/Mandrake/release")) audit(AUDIT_OS_NOT, "Mandriva / Mandake Linux");
if (!get_kb_item("Host/Mandrake/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);

cpu = get_kb_item("Host/cpu");
if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
if (cpu !~ "^(amd64|i[3-6]86|x86_64)$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Mandriva / Mandrake Linux", cpu);


flag = 0;
if (rpm_check(release:"MDK2007.1", cpu:"x86_64", reference:"lib64mysql-devel-5.0.45-8.2mdv2007.1", yank:"mdv")) flag++;
if (rpm_check(release:"MDK2007.1", cpu:"x86_64", reference:"lib64mysql-static-devel-5.0.45-8.2mdv2007.1", yank:"mdv")) flag++;
if (rpm_check(release:"MDK2007.1", cpu:"x86_64", reference:"lib64mysql15-5.0.45-8.2mdv2007.1", yank:"mdv")) flag++;
if (rpm_check(release:"MDK2007.1", cpu:"i386", reference:"libmysql-devel-5.0.45-8.2mdv2007.1", yank:"mdv")) flag++;
if (rpm_check(release:"MDK2007.1", cpu:"i386", reference:"libmysql-static-devel-5.0.45-8.2mdv2007.1", yank:"mdv")) flag++;
if (rpm_check(release:"MDK2007.1", cpu:"i386", reference:"libmysql15-5.0.45-8.2mdv2007.1", yank:"mdv")) flag++;
if (rpm_check(release:"MDK2007.1", reference:"mysql-5.0.45-8.2mdv2007.1", yank:"mdv")) flag++;
if (rpm_check(release:"MDK2007.1", reference:"mysql-bench-5.0.45-8.2mdv2007.1", yank:"mdv")) flag++;
if (rpm_check(release:"MDK2007.1", reference:"mysql-client-5.0.45-8.2mdv2007.1", yank:"mdv")) flag++;
if (rpm_check(release:"MDK2007.1", reference:"mysql-common-5.0.45-8.2mdv2007.1", yank:"mdv")) flag++;
if (rpm_check(release:"MDK2007.1", reference:"mysql-max-5.0.45-8.2mdv2007.1", yank:"mdv")) flag++;
if (rpm_check(release:"MDK2007.1", reference:"mysql-ndb-extra-5.0.45-8.2mdv2007.1", yank:"mdv")) flag++;
if (rpm_check(release:"MDK2007.1", reference:"mysql-ndb-management-5.0.45-8.2mdv2007.1", yank:"mdv")) flag++;
if (rpm_check(release:"MDK2007.1", reference:"mysql-ndb-storage-5.0.45-8.2mdv2007.1", yank:"mdv")) flag++;
if (rpm_check(release:"MDK2007.1", reference:"mysql-ndb-tools-5.0.45-8.2mdv2007.1", yank:"mdv")) flag++;

if (rpm_check(release:"MDK2008.0", cpu:"x86_64", reference:"lib64mysql-devel-5.0.45-8.2mdv2008.0", yank:"mdv")) flag++;
if (rpm_check(release:"MDK2008.0", cpu:"x86_64", reference:"lib64mysql-static-devel-5.0.45-8.2mdv2008.0", yank:"mdv")) flag++;
if (rpm_check(release:"MDK2008.0", cpu:"x86_64", reference:"lib64mysql15-5.0.45-8.2mdv2008.0", yank:"mdv")) flag++;
if (rpm_check(release:"MDK2008.0", cpu:"i386", reference:"libmysql-devel-5.0.45-8.2mdv2008.0", yank:"mdv")) flag++;
if (rpm_check(release:"MDK2008.0", cpu:"i386", reference:"libmysql-static-devel-5.0.45-8.2mdv2008.0", yank:"mdv")) flag++;
if (rpm_check(release:"MDK2008.0", cpu:"i386", reference:"libmysql15-5.0.45-8.2mdv2008.0", yank:"mdv")) flag++;
if (rpm_check(release:"MDK2008.0", reference:"mysql-5.0.45-8.2mdv2008.0", yank:"mdv")) flag++;
if (rpm_check(release:"MDK2008.0", reference:"mysql-bench-5.0.45-8.2mdv2008.0", yank:"mdv")) flag++;
if (rpm_check(release:"MDK2008.0", reference:"mysql-client-5.0.45-8.2mdv2008.0", yank:"mdv")) flag++;
if (rpm_check(release:"MDK2008.0", reference:"mysql-common-5.0.45-8.2mdv2008.0", yank:"mdv")) flag++;
if (rpm_check(release:"MDK2008.0", reference:"mysql-max-5.0.45-8.2mdv2008.0", yank:"mdv")) flag++;
if (rpm_check(release:"MDK2008.0", reference:"mysql-ndb-extra-5.0.45-8.2mdv2008.0", yank:"mdv")) flag++;
if (rpm_check(release:"MDK2008.0", reference:"mysql-ndb-management-5.0.45-8.2mdv2008.0", yank:"mdv")) flag++;
if (rpm_check(release:"MDK2008.0", reference:"mysql-ndb-storage-5.0.45-8.2mdv2008.0", yank:"mdv")) flag++;
if (rpm_check(release:"MDK2008.0", reference:"mysql-ndb-tools-5.0.45-8.2mdv2008.0", yank:"mdv")) flag++;


if (flag)
{
  if (report_verbosity > 0) security_hole(port:0, extra:rpm_report_get());
  else security_hole(0);
  exit(0);
}
else audit(AUDIT_HOST_NOT, "affected");

The latest version of this script can be found in these locations depending on your platform:

  • Linux / Unix:
    /opt/nessus/lib/nessus/plugins/mandriva_MDVSA-2008-150.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\mandriva_MDVSA-2008-150.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/mandriva_MDVSA-2008-150.nasl

Go back to menu.

How to Run


Here is how to run the Mandriva Linux Security Advisory : mysql (MDVSA-2008:150) as a standalone plugin via the Nessus web user interface (https://localhost:8834/):

  1. Click to start a New Scan.
  2. Select Advanced Scan.
  3. Navigate to the Plugins tab.
  4. On the top right corner click to Disable All plugins.
  5. On the left side table select Mandriva Local Security Checks plugin family.
  6. On the right side table select Mandriva Linux Security Advisory : mysql (MDVSA-2008:150) plugin ID 36561.
  7. Specify the target on the Settings tab and click to Save the scan.
  8. Run the scan.

Here are a few examples of how to run the plugin in the command line. Note that the examples below demonstrate the usage on the Linux / Unix platform.

Basic usage:

/opt/nessus/bin/nasl mandriva_MDVSA-2008-150.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a mandriva_MDVSA-2008-150.nasl -t <IP/HOST>

Run the plugin with trace script execution written to the console (useful for debugging):

/opt/nessus/bin/nasl -T - mandriva_MDVSA-2008-150.nasl -t <IP/HOST>

Run the plugin with using a state file for the target and updating it (useful for running multiple plugins on the target):

/opt/nessus/bin/nasl -K /tmp/state mandriva_MDVSA-2008-150.nasl -t <IP/HOST>

Go back to menu.

References


MDVSA | Mandriva Security Advisory:
  • 2008:150
CWE | Common Weakness Enumeration:
  • CWE-119 (Weakness) Improper Restriction of Operations within the Bounds of a Memory Buffer
  • CWE-264 (Category) Permissions, Privileges, and Access Controls
See also: Similar and related Nessus plugins:
  • 43782 - CentOS 5 : mysql (CESA-2009:1289)
  • 44948 - CentOS 5 : mysql (CESA-2010:0109)
  • 44647 - CentOS 4 : mysql (CESA-2010:0110)
  • 30125 - Debian DSA-1478-1 : mysql-dfsg-5.0 - buffer overflows
  • 33492 - Debian DSA-1608-1 : mysql-dfsg-5.0 - authorization bypass
  • 34151 - FreeBSD : mysql -- MyISAM table privileges security bypass vulnerability (388d9ee4-7f22-11dd-a66a-0019666436c2)
  • 35279 - FreeBSD : mysql -- MyISAM table privileges security bypass vulnerability for symlinked paths (738f8f9e-d661-11dd-a765-0030843d3802)
  • 34093 - GLSA-200809-04 : MySQL: Privilege bypass
  • 34374 - Mac OS X Multiple Vulnerabilities (Security Update 2008-007)
  • 40945 - Mac OS X Multiple Vulnerabilities (Security Update 2009-005)
  • 37407 - Mandriva Linux Security Advisory : mysql (MDVSA-2008:149)
  • 32137 - MySQL 4.1 < 4.1.24 MyISAM Create Table Privilege Check Bypass
  • 34159 - MySQL Community Server 5.0 < 5.0.67 Multiple Vulnerabilities
  • 42900 - MySQL 5.1 < 5.1.41 Multiple Vulnerabilities
  • 17814 - yaSSL 1.7.5 Buffer Overflow
  • 32138 - MySQL Enterprise Server 5.0 < 5.0.60 MyISAM CREATE TABLE Privilege Check Bypass
  • 34727 - MySQL Enterprise Server 5.0 < 5.0.70 Privilege Bypass
  • 67997 - Oracle Linux 5 : mysql (ELSA-2010-0109)
  • 67998 - Oracle Linux 4 : mysql (ELSA-2010-0110)
  • 33585 - RHEL 4 : mysql (RHSA-2008:0768)
  • 63890 - RHEL 5 : mysql (RHSA-2009:1289)
  • 44634 - RHEL 5 : mysql (RHSA-2010:0109)
  • 44635 - RHEL 4 : mysql (RHSA-2010:0110)
  • 60451 - Scientific Linux Security Update : mysql on SL4.x i386/x86_64
  • 60655 - Scientific Linux Security Update : mysql on SL5.x i386/x86_64
  • 60735 - Scientific Linux Security Update : mysql on SL4.x i386/x86_64
  • 60736 - Scientific Linux Security Update : mysql on SL5.x i386/x86_64
  • 41217 - SuSE9 Security Update : MySQL (YOU Patch Number 12175)
  • 33885 - openSUSE 10 Security Update : libmysqlclient-devel (libmysqlclient-devel-5341)
  • 33886 - SuSE 10 Security Update : MySQL (ZYPP Patch Number 5338)
  • 31638 - Ubuntu 6.06 LTS / 6.10 / 7.04 / 7.10 : mysql-dfsg-5.0 vulnerabilities (USN-588-1)
  • 31783 - Ubuntu 6.06 LTS : mysql-dfsg-5.0 regression (USN-588-2)
  • 37299 - Ubuntu 6.06 LTS / 7.10 / 8.04 LTS : mysql-dfsg-5.0 vulnerabilities (USN-671-1)

Version


This page has been produced using Nessus Professional 10.1.2 (#68) LINUX, Plugin set 202205072148.
Plugin file mandriva_MDVSA-2008-150.nasl version 1.16. For more plugins, visit the Nessus Plugin Library.

Go back to menu.