Ubuntu 6.06 LTS / 6.10 / 7.04 / 7.10 : mysql-dfsg-5.0 vulnerabilities (USN-588-1) - Nessus

High   Plugin ID: 31638

This page contains detailed information about the Ubuntu 6.06 LTS / 6.10 / 7.04 / 7.10 : mysql-dfsg-5.0 vulnerabilities (USN-588-1) Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 31638
Name: Ubuntu 6.06 LTS / 6.10 / 7.04 / 7.10 : mysql-dfsg-5.0 vulnerabilities (USN-588-1)
Filename: ubuntu_USN-588-1.nasl
Vulnerability Published: N/A
This Plugin Published: 2008-03-21
Last Modification Time: 2021-01-19
Plugin Version: 1.20
Plugin Type: local
Plugin Family: Ubuntu Local Security Checks
Dependencies: ssh_get_info.nasl
Required KB Items [?]: Host/cpu, Host/Debian/dpkg-l, Host/Ubuntu, Host/Ubuntu/release

Vulnerability Information


Severity: High
Vulnerability Published: N/A
Patch Published: 2008-03-19
CVE [?]: CVE-2006-7232, CVE-2007-2692, CVE-2007-6303, CVE-2008-0226, CVE-2008-0227
CPE [?]: cpe:/o:canonical:ubuntu_linux:6.06:-:lts, cpe:/o:canonical:ubuntu_linux:6.10, cpe:/o:canonical:ubuntu_linux:7.04, cpe:/o:canonical:ubuntu_linux:7.10, p-cpe:/a:canonical:ubuntu_linux:libmysqlclient15off, p-cpe:/a:canonical:ubuntu_linux:libmysqlclient15-dev, p-cpe:/a:canonical:ubuntu_linux:mysql-client, p-cpe:/a:canonical:ubuntu_linux:mysql-client-5.0, p-cpe:/a:canonical:ubuntu_linux:mysql-common, p-cpe:/a:canonical:ubuntu_linux:mysql-server, p-cpe:/a:canonical:ubuntu_linux:mysql-server-4.1, p-cpe:/a:canonical:ubuntu_linux:mysql-server-5.0

Synopsis

The remote Ubuntu host is missing one or more security-related patches.

Description

Masaaki Hirose discovered that MySQL could be made to dereference a NULL pointer. An authenticated user could cause a denial of service (application crash) via an EXPLAIN SELECT FROM on the INFORMATION_SCHEMA table. This issue only affects Ubuntu 6.06 and 6.10. (CVE-2006-7232)

Alexander Nozdrin discovered that MySQL did not restore database access privileges when returning from SQL SECURITY INVOKER stored routines. An authenticated user could exploit this to gain privileges. This issue does not affect Ubuntu 7.10. (CVE-2007-2692)

Martin Friebe discovered that MySQL did not properly update the DEFINER value of an altered view. An authenticated user could use CREATE SQL SECURITY DEFINER VIEW and ALTER VIEW statements to gain privileges. (CVE-2007-6303)

Luigi Auriemma discovered that yaSSL as included in MySQL did not properly validate its input. A remote attacker could send crafted requests and cause a denial of service or possibly execute arbitrary code. This issue did not affect Ubuntu 6.06 in the default installation. (CVE-2008-0226, CVE-2008-0227).

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.

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 Ubuntu 6.06 LTS / 6.10 / 7.04 / 7.10 : mysql-dfsg-5.0 vulnerabilities (USN-588-1) 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/tomwillfixit/alpine-cvecheck
    [CVE-2007-2692]
  7. GitHub: https://github.com/CoolerVoid/Vision
    [CVE-2007-6303]
  8. GitHub: https://github.com/CoolerVoid/Vision2
    [CVE-2007-6303]
  9. GitHub: https://github.com/tomwillfixit/alpine-cvecheck
    [CVE-2007-6303]

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/E:F/RL:OF/RC:C
CVSS Base Score:7.5 (High)
Impact Subscore:6.4
Exploitability Subscore:10.0
CVSS Temporal Score:6.2 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:6.2 (Medium)

Go back to menu.

Plugin Source


This is the ubuntu_USN-588-1.nasl nessus plugin source code. Ubuntu Security Notice (C) 2008-2019 Canonical, Inc. / NASL script (C) 2018 and is owned by Tenable, Inc. or an Affiliate thereof.

#%NASL_MIN_LEVEL 70300
#
# (C) Tenable Network Security, Inc.
#
# The descriptive text and package checks in this plugin were
# extracted from Ubuntu Security Notice USN-588-1. The text 
# itself is copyright (C) Canonical, Inc. See 
# <http://www.ubuntu.com/usn/>. Ubuntu(R) is a registered 
# trademark of Canonical, Inc.
#

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

if (description)
{
  script_id(31638);
  script_version("1.20");
  script_set_attribute(attribute:"plugin_modification_date", value:"2021/01/19");

  script_cve_id("CVE-2006-7232", "CVE-2007-2692", "CVE-2007-6303", "CVE-2008-0226", "CVE-2008-0227");
  script_bugtraq_id(24011, 26832);
  script_xref(name:"USN", value:"588-1");

  script_name(english:"Ubuntu 6.06 LTS / 6.10 / 7.04 / 7.10 : mysql-dfsg-5.0 vulnerabilities (USN-588-1)");
  script_summary(english:"Checks dpkg output for updated packages.");

  script_set_attribute(
    attribute:"synopsis", 
    value:
"The remote Ubuntu host is missing one or more security-related
patches."
  );
  script_set_attribute(
    attribute:"description", 
    value:
"Masaaki Hirose discovered that MySQL could be made to dereference a
NULL pointer. An authenticated user could cause a denial of service
(application crash) via an EXPLAIN SELECT FROM on the
INFORMATION_SCHEMA table. This issue only affects Ubuntu 6.06 and
6.10. (CVE-2006-7232)

Alexander Nozdrin discovered that MySQL did not restore database
access privileges when returning from SQL SECURITY INVOKER stored
routines. An authenticated user could exploit this to gain privileges.
This issue does not affect Ubuntu 7.10. (CVE-2007-2692)

Martin Friebe discovered that MySQL did not properly update the
DEFINER value of an altered view. An authenticated user could use
CREATE SQL SECURITY DEFINER VIEW and ALTER VIEW statements to gain
privileges. (CVE-2007-6303)

Luigi Auriemma discovered that yaSSL as included in MySQL did not
properly validate its input. A remote attacker could send crafted
requests and cause a denial of service or possibly execute arbitrary
code. This issue did not affect Ubuntu 6.06 in the default
installation. (CVE-2008-0226, CVE-2008-0227).

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."
  );
  script_set_attribute(
    attribute:"see_also",
    value:"https://usn.ubuntu.com/588-1/"
  );
  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_cvss_temporal_vector("CVSS2#E:F/RL:OF/RC:C");
  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(89, 119);

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:libmysqlclient15-dev");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:libmysqlclient15off");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:mysql-client");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:mysql-client-5.0");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:mysql-common");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:mysql-server");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:mysql-server-4.1");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:mysql-server-5.0");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:canonical:ubuntu_linux:6.06:-:lts");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:canonical:ubuntu_linux:6.10");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:canonical:ubuntu_linux:7.04");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:canonical:ubuntu_linux:7.10");

  script_set_attribute(attribute:"patch_publication_date", value:"2008/03/19");
  script_set_attribute(attribute:"plugin_publication_date", value:"2008/03/21");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_copyright(english:"Ubuntu Security Notice (C) 2008-2019 Canonical, Inc. / NASL script (C) 2018 and is owned by Tenable, Inc. or an Affiliate thereof.");
  script_family(english:"Ubuntu Local Security Checks");

  script_dependencies("ssh_get_info.nasl");
  script_require_keys("Host/cpu", "Host/Ubuntu", "Host/Ubuntu/release", "Host/Debian/dpkg-l");

  exit(0);
}


include("audit.inc");
include("ubuntu.inc");
include("misc_func.inc");

if ( ! get_kb_item("Host/local_checks_enabled") ) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
release = get_kb_item("Host/Ubuntu/release");
if ( isnull(release) ) audit(AUDIT_OS_NOT, "Ubuntu");
release = chomp(release);
if (! ereg(pattern:"^(6\.06|6\.10|7\.04|7\.10)$", string:release)) audit(AUDIT_OS_NOT, "Ubuntu 6.06 / 6.10 / 7.04 / 7.10", "Ubuntu " + release);
if ( ! get_kb_item("Host/Debian/dpkg-l") ) 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, "Ubuntu", cpu);

flag = 0;

if (ubuntu_check(osver:"6.06", pkgname:"libmysqlclient15-dev", pkgver:"5.0.22-0ubuntu6.06.8")) flag++;
if (ubuntu_check(osver:"6.06", pkgname:"libmysqlclient15off", pkgver:"5.0.22-0ubuntu6.06.8")) flag++;
if (ubuntu_check(osver:"6.06", pkgname:"mysql-client", pkgver:"5.0.22-0ubuntu6.06.8")) flag++;
if (ubuntu_check(osver:"6.06", pkgname:"mysql-client-5.0", pkgver:"5.0.22-0ubuntu6.06.8")) flag++;
if (ubuntu_check(osver:"6.06", pkgname:"mysql-common", pkgver:"5.0.22-0ubuntu6.06.8")) flag++;
if (ubuntu_check(osver:"6.06", pkgname:"mysql-server", pkgver:"5.0.22-0ubuntu6.06.8")) flag++;
if (ubuntu_check(osver:"6.06", pkgname:"mysql-server-5.0", pkgver:"5.0.22-0ubuntu6.06.8")) flag++;
if (ubuntu_check(osver:"6.10", pkgname:"libmysqlclient15-dev", pkgver:"5.0.24a-9ubuntu2.4")) flag++;
if (ubuntu_check(osver:"6.10", pkgname:"libmysqlclient15off", pkgver:"5.0.24a-9ubuntu2.4")) flag++;
if (ubuntu_check(osver:"6.10", pkgname:"mysql-client", pkgver:"5.0.24a-9ubuntu2.4")) flag++;
if (ubuntu_check(osver:"6.10", pkgname:"mysql-client-5.0", pkgver:"5.0.24a-9ubuntu2.4")) flag++;
if (ubuntu_check(osver:"6.10", pkgname:"mysql-common", pkgver:"5.0.24a-9ubuntu2.4")) flag++;
if (ubuntu_check(osver:"6.10", pkgname:"mysql-server", pkgver:"5.0.24a-9ubuntu2.4")) flag++;
if (ubuntu_check(osver:"6.10", pkgname:"mysql-server-5.0", pkgver:"5.0.24a-9ubuntu2.4")) flag++;
if (ubuntu_check(osver:"7.04", pkgname:"libmysqlclient15-dev", pkgver:"5.0.38-0ubuntu1.4")) flag++;
if (ubuntu_check(osver:"7.04", pkgname:"libmysqlclient15off", pkgver:"5.0.38-0ubuntu1.4")) flag++;
if (ubuntu_check(osver:"7.04", pkgname:"mysql-client", pkgver:"5.0.38-0ubuntu1.4")) flag++;
if (ubuntu_check(osver:"7.04", pkgname:"mysql-client-5.0", pkgver:"5.0.38-0ubuntu1.4")) flag++;
if (ubuntu_check(osver:"7.04", pkgname:"mysql-common", pkgver:"5.0.38-0ubuntu1.4")) flag++;
if (ubuntu_check(osver:"7.04", pkgname:"mysql-server", pkgver:"5.0.38-0ubuntu1.4")) flag++;
if (ubuntu_check(osver:"7.04", pkgname:"mysql-server-4.1", pkgver:"5.0.38-0ubuntu1.4")) flag++;
if (ubuntu_check(osver:"7.04", pkgname:"mysql-server-5.0", pkgver:"5.0.38-0ubuntu1.4")) flag++;
if (ubuntu_check(osver:"7.10", pkgname:"libmysqlclient15-dev", pkgver:"5.0.45-1ubuntu3.3")) flag++;
if (ubuntu_check(osver:"7.10", pkgname:"libmysqlclient15off", pkgver:"5.0.45-1ubuntu3.3")) flag++;
if (ubuntu_check(osver:"7.10", pkgname:"mysql-client", pkgver:"5.0.45-1ubuntu3.3")) flag++;
if (ubuntu_check(osver:"7.10", pkgname:"mysql-client-5.0", pkgver:"5.0.45-1ubuntu3.3")) flag++;
if (ubuntu_check(osver:"7.10", pkgname:"mysql-common", pkgver:"5.0.45-1ubuntu3.3")) flag++;
if (ubuntu_check(osver:"7.10", pkgname:"mysql-server", pkgver:"5.0.45-1ubuntu3.3")) flag++;
if (ubuntu_check(osver:"7.10", pkgname:"mysql-server-5.0", pkgver:"5.0.45-1ubuntu3.3")) flag++;

if (flag)
{
  security_report_v4(
    port       : 0,
    severity   : SECURITY_HOLE,
    extra      : ubuntu_report_get()
  );
  exit(0);
}
else
{
  tested = ubuntu_pkg_tests_get();
  if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
  else audit(AUDIT_PACKAGE_NOT_INSTALLED, "libmysqlclient15-dev / libmysqlclient15off / mysql-client / etc");
}

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

  • Linux / Unix:
    /opt/nessus/lib/nessus/plugins/ubuntu_USN-588-1.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\ubuntu_USN-588-1.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/ubuntu_USN-588-1.nasl

Go back to menu.

How to Run


Here is how to run the Ubuntu 6.06 LTS / 6.10 / 7.04 / 7.10 : mysql-dfsg-5.0 vulnerabilities (USN-588-1) 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 Ubuntu Local Security Checks plugin family.
  6. On the right side table select Ubuntu 6.06 LTS / 6.10 / 7.04 / 7.10 : mysql-dfsg-5.0 vulnerabilities (USN-588-1) plugin ID 31638.
  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 ubuntu_USN-588-1.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a ubuntu_USN-588-1.nasl -t <IP/HOST>

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

/opt/nessus/bin/nasl -T - ubuntu_USN-588-1.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 ubuntu_USN-588-1.nasl -t <IP/HOST>

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: USN | Ubuntu Security Notice: CWE | Common Weakness Enumeration:
  • CWE-89 (Weakness) Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
  • CWE-119 (Weakness) Improper Restriction of Operations within the Bounds of a Memory Buffer
See also: Similar and related Nessus plugins:
  • 29752 - CentOS 4 : mysql (CESA-2007:1222-001)
  • 28336 - Debian DSA-1413-1 : mysql - multiple vulnerabilities
  • 30125 - Debian DSA-1478-1 : mysql-dfsg-5.0 - buffer overflows
  • 78218 - F5 Networks BIG-IP : MySQL vulnerabilities (SOL8178)
  • 29712 - Fedora 8 : mysql-5.0.45-6.fc8 (2007-4465)
  • 29714 - Fedora 7 : mysql-5.0.45-6.fc7 (2007-4471)
  • 31835 - GLSA-200804-04 : MySQL: Multiple vulnerabilities
  • 34374 - Mac OS X Multiple Vulnerabilities (Security Update 2008-007)
  • 26009 - Mandrake Linux Security Advisory : MySQL (MDKSA-2007:177)
  • 36404 - Mandriva Linux Security Advisory : mysql (MDVSA-2008:017)
  • 36399 - Mandriva Linux Security Advisory : mysql (MDVSA-2008:028)
  • 36561 - Mandriva Linux Security Advisory : mysql (MDVSA-2008:150)
  • 17832 - MySQL 5.0 < 5.0.40 Multiple Vulnerabilities
  • 34159 - MySQL Community Server 5.0 < 5.0.67 Multiple Vulnerabilities
  • 25242 - MySQL 5.1 < 5.1.18 Multiple Vulnerabilities
  • 29345 - MySQL Community Server < 5.1.23 / 6.0.4 Multiple Vulnerabilities
  • 17813 - MySQL < 5.0.51a / 5.1.23 / 6.0.4 Multiple Vulnerabilities
  • 17814 - yaSSL 1.7.5 Buffer Overflow
  • 29346 - MySQL Enterprise Server 5.0 < 5.0.52 Multiple Vulnerabilities
  • 25198 - MySQL Crafted IF Clause Divide-by-zero NULL Dereference DoS
  • 32425 - RHEL 5 : mysql (RHSA-2008:0364)
  • 60406 - Scientific Linux Security Update : mysql on SL5.x i386/x86_64
  • 41184 - SuSE9 Security Update : MySQL (YOU Patch Number 12044)
  • 41217 - SuSE9 Security Update : MySQL (YOU Patch Number 12175)
  • 30180 - openSUSE 10 Security Update : libmysqlclient-devel (libmysqlclient-devel-4873)
  • 33885 - openSUSE 10 Security Update : libmysqlclient-devel (libmysqlclient-devel-5341)
  • 30182 - SuSE 10 Security Update : MySQL (ZYPP Patch Number 4879)
  • 33886 - SuSE 10 Security Update : MySQL (ZYPP Patch Number 5338)
  • 31783 - Ubuntu 6.06 LTS : mysql-dfsg-5.0 regression (USN-588-2)
  • 29793 - Ubuntu 6.06 LTS / 6.10 / 7.04 / 7.10 : mysql-dfsg-5.0 vulnerabilities (USN-559-1)

Version


This page has been produced using Nessus Professional 10.1.2 (#68) LINUX, Plugin set 202205072148.
Plugin file ubuntu_USN-588-1.nasl version 1.20. For more plugins, visit the Nessus Plugin Library.

Go back to menu.