{
  "threat_severity" : "Important",
  "public_date" : "2016-09-12T00:00:00Z",
  "bugzilla" : {
    "description" : "mysql: general_log can write to configuration files, leading to privilege escalation (CPU Oct 2016)",
    "id" : "1375198",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=1375198"
  },
  "cvss" : {
    "cvss_base_score" : "7.1",
    "cvss_scoring_vector" : "AV:N/AC:H/Au:S/C:C/I:C/A:C",
    "status" : "verified"
  },
  "cvss3" : {
    "cvss3_base_score" : "9.8",
    "cvss3_scoring_vector" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
    "status" : "verified"
  },
  "cwe" : "CWE-732",
  "details" : [ "Oracle MySQL through 5.5.52, 5.6.x through 5.6.33, and 5.7.x through 5.7.15; MariaDB before 5.5.51, 10.0.x before 10.0.27, and 10.1.x before 10.1.17; and Percona Server before 5.5.51-38.1, 5.6.x before 5.6.32-78.0, and 5.7.x before 5.7.14-7 allow local users to create arbitrary configurations and bypass certain protection mechanisms by setting general_log_file to a my.cnf configuration. NOTE: this can be leveraged to execute arbitrary code with root privileges by setting malloc_lib. NOTE: the affected MySQL version information is from Oracle's October 2016 CPU. Oracle has not commented on third-party claims that the issue was silently patched in MySQL 5.5.52, 5.6.33, and 5.7.15.", "It was discovered that the MySQL logging functionality allowed writing to MySQL configuration files. An administrative database user, or a database user with FILE privileges, could possibly use this flaw to run arbitrary commands with root privileges on the system running the database server." ],
  "statement" : "All MySQL and MariaDB packages in Red Hat Enterprise Linux and Red Hat Software Collections install the my.cnf configuration file in /etc as root-owned and not writeable to mysqld's mysql user. This default configuration stops the published exploit for this issue.\nAll MySQL and MariaDB packages for Red Hat Enterprise Linux 7 (either those directly included in Red Hat Enterprise Linux 7 or from Red Hat Software Collections for Red Hat Enterprise Linux 7) run mysqld_safe with mysql user privileges and not root privileges, limiting the potential impact to code execution as mysql system user.\nThe MySQL 5.1 packages in Red Hat Enterprise Linux 6 do not implement support for library preloading, completely preventing the remote attack vector used by the published exploit.\nFor additional details, refer to:\nhttps://bugzilla.redhat.com/show_bug.cgi?id=1375198#c12",
  "affected_release" : [ {
    "product_name" : "Red Hat Enterprise Linux 6",
    "release_date" : "2017-01-24T00:00:00Z",
    "advisory" : "RHSA-2017:0184",
    "cpe" : "cpe:/o:redhat:enterprise_linux:6",
    "package" : "mysql-0:5.1.73-8.el6_8"
  }, {
    "product_name" : "Red Hat Enterprise Linux 7",
    "release_date" : "2016-11-03T00:00:00Z",
    "advisory" : "RHSA-2016:2595",
    "cpe" : "cpe:/o:redhat:enterprise_linux:7",
    "package" : "mariadb-1:5.5.52-1.el7"
  }, {
    "product_name" : "Red Hat Enterprise Linux OpenStack Platform 5.0 (Icehouse) for RHEL 6",
    "release_date" : "2016-10-13T00:00:00Z",
    "advisory" : "RHSA-2016:2058",
    "cpe" : "cpe:/a:redhat:openstack:5::el6",
    "package" : "mariadb-galera-0:5.5.42-1.1.el6ost"
  }, {
    "product_name" : "Red Hat Enterprise Linux OpenStack Platform 5.0 (Icehouse) for RHEL 7",
    "release_date" : "2016-10-13T00:00:00Z",
    "advisory" : "RHSA-2016:2059",
    "cpe" : "cpe:/a:redhat:openstack:5::el7",
    "package" : "mariadb-galera-1:5.5.42-1.2.el7ost"
  }, {
    "product_name" : "Red Hat Enterprise Linux OpenStack Platform 6.0 (Juno) for RHEL 7",
    "release_date" : "2016-10-13T00:00:00Z",
    "advisory" : "RHSA-2016:2060",
    "cpe" : "cpe:/a:redhat:openstack:6::el7",
    "package" : "mariadb-galera-1:5.5.42-1.2.el7ost"
  }, {
    "product_name" : "Red Hat Enterprise Linux OpenStack Platform 7.0 (Kilo) for RHEL 7",
    "release_date" : "2016-10-13T00:00:00Z",
    "advisory" : "RHSA-2016:2061",
    "cpe" : "cpe:/a:redhat:openstack:7::el7",
    "package" : "mariadb-galera-1:5.5.42-5.el7ost"
  }, {
    "product_name" : "Red Hat OpenStack Platform 8.0 (Liberty)",
    "release_date" : "2016-10-18T00:00:00Z",
    "advisory" : "RHSA-2016:2077",
    "cpe" : "cpe:/a:redhat:openstack:8::el7",
    "package" : "mariadb-galera-1:5.5.42-5.el7ost"
  }, {
    "product_name" : "Red Hat OpenStack Platform 9.0 (Mitaka)",
    "release_date" : "2016-10-13T00:00:00Z",
    "advisory" : "RHSA-2016:2062",
    "cpe" : "cpe:/a:redhat:openstack:9::el7",
    "package" : "mariadb-galera-1:5.5.42-5.el7ost"
  }, {
    "product_name" : "Red Hat Software Collections for Red Hat Enterprise Linux 6",
    "release_date" : "2016-10-31T00:00:00Z",
    "advisory" : "RHSA-2016:2130",
    "cpe" : "cpe:/a:redhat:rhel_software_collections:2::el6",
    "package" : "mysql55-mysql-0:5.5.52-1.el6"
  }, {
    "product_name" : "Red Hat Software Collections for Red Hat Enterprise Linux 6",
    "release_date" : "2016-10-31T00:00:00Z",
    "advisory" : "RHSA-2016:2131",
    "cpe" : "cpe:/a:redhat:rhel_software_collections:2::el6",
    "package" : "mariadb55-mariadb-0:5.5.53-1.el6"
  }, {
    "product_name" : "Red Hat Software Collections for Red Hat Enterprise Linux 6",
    "release_date" : "2016-11-15T00:00:00Z",
    "advisory" : "RHSA-2016:2749",
    "cpe" : "cpe:/a:redhat:rhel_software_collections:2::el6",
    "package" : "rh-mysql56-mysql-0:5.6.34-2.el6"
  }, {
    "product_name" : "Red Hat Software Collections for Red Hat Enterprise Linux 6",
    "release_date" : "2016-12-08T00:00:00Z",
    "advisory" : "RHSA-2016:2927",
    "cpe" : "cpe:/a:redhat:rhel_software_collections:2::el6",
    "package" : "rh-mariadb100-mariadb-1:10.0.28-5.el6"
  }, {
    "product_name" : "Red Hat Software Collections for Red Hat Enterprise Linux 6",
    "release_date" : "2016-12-08T00:00:00Z",
    "advisory" : "RHSA-2016:2928",
    "cpe" : "cpe:/a:redhat:rhel_software_collections:2::el6",
    "package" : "rh-mariadb101-mariadb-1:10.1.19-6.el6"
  }, {
    "product_name" : "Red Hat Software Collections for Red Hat Enterprise Linux 6.6 EUS",
    "release_date" : "2016-10-31T00:00:00Z",
    "advisory" : "RHSA-2016:2130",
    "cpe" : "cpe:/a:redhat:rhel_software_collections:2::el6",
    "package" : "mysql55-mysql-0:5.5.52-1.el6"
  }, {
    "product_name" : "Red Hat Software Collections for Red Hat Enterprise Linux 6.6 EUS",
    "release_date" : "2016-10-31T00:00:00Z",
    "advisory" : "RHSA-2016:2131",
    "cpe" : "cpe:/a:redhat:rhel_software_collections:2::el6",
    "package" : "mariadb55-mariadb-0:5.5.53-1.el6"
  }, {
    "product_name" : "Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS",
    "release_date" : "2016-10-31T00:00:00Z",
    "advisory" : "RHSA-2016:2130",
    "cpe" : "cpe:/a:redhat:rhel_software_collections:2::el6",
    "package" : "mysql55-mysql-0:5.5.52-1.el6"
  }, {
    "product_name" : "Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS",
    "release_date" : "2016-10-31T00:00:00Z",
    "advisory" : "RHSA-2016:2131",
    "cpe" : "cpe:/a:redhat:rhel_software_collections:2::el6",
    "package" : "mariadb55-mariadb-0:5.5.53-1.el6"
  }, {
    "product_name" : "Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS",
    "release_date" : "2016-11-15T00:00:00Z",
    "advisory" : "RHSA-2016:2749",
    "cpe" : "cpe:/a:redhat:rhel_software_collections:2::el6",
    "package" : "rh-mysql56-mysql-0:5.6.34-2.el6"
  }, {
    "product_name" : "Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS",
    "release_date" : "2016-12-08T00:00:00Z",
    "advisory" : "RHSA-2016:2927",
    "cpe" : "cpe:/a:redhat:rhel_software_collections:2::el6",
    "package" : "rh-mariadb100-mariadb-1:10.0.28-5.el6"
  }, {
    "product_name" : "Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS",
    "release_date" : "2016-12-08T00:00:00Z",
    "advisory" : "RHSA-2016:2928",
    "cpe" : "cpe:/a:redhat:rhel_software_collections:2::el6",
    "package" : "rh-mariadb101-mariadb-1:10.1.19-6.el6"
  }, {
    "product_name" : "Red Hat Software Collections for Red Hat Enterprise Linux 7",
    "release_date" : "2016-10-31T00:00:00Z",
    "advisory" : "RHSA-2016:2130",
    "cpe" : "cpe:/a:redhat:rhel_software_collections:2::el7",
    "package" : "mysql55-mysql-0:5.5.52-1.el7"
  }, {
    "product_name" : "Red Hat Software Collections for Red Hat Enterprise Linux 7",
    "release_date" : "2016-10-31T00:00:00Z",
    "advisory" : "RHSA-2016:2131",
    "cpe" : "cpe:/a:redhat:rhel_software_collections:2::el7",
    "package" : "mariadb55-mariadb-0:5.5.53-1.el7"
  }, {
    "product_name" : "Red Hat Software Collections for Red Hat Enterprise Linux 7",
    "release_date" : "2016-11-15T00:00:00Z",
    "advisory" : "RHSA-2016:2749",
    "cpe" : "cpe:/a:redhat:rhel_software_collections:2::el7",
    "package" : "rh-mysql56-mysql-0:5.6.34-2.el7"
  }, {
    "product_name" : "Red Hat Software Collections for Red Hat Enterprise Linux 7",
    "release_date" : "2016-12-08T00:00:00Z",
    "advisory" : "RHSA-2016:2927",
    "cpe" : "cpe:/a:redhat:rhel_software_collections:2::el7",
    "package" : "rh-mariadb100-mariadb-1:10.0.28-5.el7"
  }, {
    "product_name" : "Red Hat Software Collections for Red Hat Enterprise Linux 7",
    "release_date" : "2016-12-08T00:00:00Z",
    "advisory" : "RHSA-2016:2928",
    "cpe" : "cpe:/a:redhat:rhel_software_collections:2::el7",
    "package" : "rh-mariadb101-mariadb-1:10.1.19-6.el7"
  }, {
    "product_name" : "Red Hat Software Collections for Red Hat Enterprise Linux 7.1 EUS",
    "release_date" : "2016-10-31T00:00:00Z",
    "advisory" : "RHSA-2016:2130",
    "cpe" : "cpe:/a:redhat:rhel_software_collections:2::el7",
    "package" : "mysql55-mysql-0:5.5.52-1.el7"
  }, {
    "product_name" : "Red Hat Software Collections for Red Hat Enterprise Linux 7.1 EUS",
    "release_date" : "2016-10-31T00:00:00Z",
    "advisory" : "RHSA-2016:2131",
    "cpe" : "cpe:/a:redhat:rhel_software_collections:2::el7",
    "package" : "mariadb55-mariadb-0:5.5.53-1.el7"
  }, {
    "product_name" : "Red Hat Software Collections for Red Hat Enterprise Linux 7.1 EUS",
    "release_date" : "2016-11-15T00:00:00Z",
    "advisory" : "RHSA-2016:2749",
    "cpe" : "cpe:/a:redhat:rhel_software_collections:2::el7",
    "package" : "rh-mysql56-mysql-0:5.6.34-2.el7"
  }, {
    "product_name" : "Red Hat Software Collections for Red Hat Enterprise Linux 7.2 EUS",
    "release_date" : "2016-10-31T00:00:00Z",
    "advisory" : "RHSA-2016:2130",
    "cpe" : "cpe:/a:redhat:rhel_software_collections:2::el7",
    "package" : "mysql55-mysql-0:5.5.52-1.el7"
  }, {
    "product_name" : "Red Hat Software Collections for Red Hat Enterprise Linux 7.2 EUS",
    "release_date" : "2016-10-31T00:00:00Z",
    "advisory" : "RHSA-2016:2131",
    "cpe" : "cpe:/a:redhat:rhel_software_collections:2::el7",
    "package" : "mariadb55-mariadb-0:5.5.53-1.el7"
  }, {
    "product_name" : "Red Hat Software Collections for Red Hat Enterprise Linux 7.2 EUS",
    "release_date" : "2016-11-15T00:00:00Z",
    "advisory" : "RHSA-2016:2749",
    "cpe" : "cpe:/a:redhat:rhel_software_collections:2::el7",
    "package" : "rh-mysql56-mysql-0:5.6.34-2.el7"
  }, {
    "product_name" : "Red Hat Software Collections for Red Hat Enterprise Linux 7.2 EUS",
    "release_date" : "2016-12-08T00:00:00Z",
    "advisory" : "RHSA-2016:2927",
    "cpe" : "cpe:/a:redhat:rhel_software_collections:2::el7",
    "package" : "rh-mariadb100-mariadb-1:10.0.28-5.el7"
  }, {
    "product_name" : "Red Hat Software Collections for Red Hat Enterprise Linux 7.2 EUS",
    "release_date" : "2016-12-08T00:00:00Z",
    "advisory" : "RHSA-2016:2928",
    "cpe" : "cpe:/a:redhat:rhel_software_collections:2::el7",
    "package" : "rh-mariadb101-mariadb-1:10.1.19-6.el7"
  }, {
    "product_name" : "Red Hat Software Collections for Red Hat Enterprise Linux 7.3 EUS",
    "release_date" : "2016-12-08T00:00:00Z",
    "advisory" : "RHSA-2016:2927",
    "cpe" : "cpe:/a:redhat:rhel_software_collections:2::el7",
    "package" : "rh-mariadb100-mariadb-1:10.0.28-5.el7"
  }, {
    "product_name" : "Red Hat Software Collections for Red Hat Enterprise Linux 7.3 EUS",
    "release_date" : "2016-12-08T00:00:00Z",
    "advisory" : "RHSA-2016:2928",
    "cpe" : "cpe:/a:redhat:rhel_software_collections:2::el7",
    "package" : "rh-mariadb101-mariadb-1:10.1.19-6.el7"
  } ],
  "package_state" : [ {
    "product_name" : "Red Hat Enterprise Linux 5",
    "fix_state" : "Not affected",
    "package_name" : "mysql",
    "cpe" : "cpe:/o:redhat:enterprise_linux:5"
  }, {
    "product_name" : "Red Hat Enterprise Linux 5",
    "fix_state" : "Will not fix",
    "package_name" : "mysql55-mysql",
    "cpe" : "cpe:/o:redhat:enterprise_linux:5"
  }, {
    "product_name" : "Red Hat Mobile Application Platform 4",
    "fix_state" : "Not affected",
    "package_name" : "millicore",
    "cpe" : "cpe:/a:redhat:mobile_application_platform:4"
  }, {
    "product_name" : "Red Hat OpenStack Platform 10 (Newton)",
    "fix_state" : "Not affected",
    "package_name" : "mariadb-galera",
    "cpe" : "cpe:/a:redhat:openstack:10"
  } ],
  "references" : [ "https://www.cve.org/CVERecord?id=CVE-2016-6662\nhttps://nvd.nist.gov/vuln/detail/CVE-2016-6662\nhttps://legalhackers.com/advisories/MySQL-Exploit-Remote-Root-Code-Execution-Privesc-CVE-2016-6662.txt" ],
  "name" : "CVE-2016-6662",
  "mitigation" : {
    "value" : "- Ensure all MySQL / MariaDB configuration files are not writeable to the mysql user. This is the default configuration in Red Hat products.\n- Ensure that non-administrative database users are not granted FILE privilege. Applications accessing data in MySQL / MariaDB databases, including web application potentially vulnerable to SQL injections, should use database accounts with the lowest privileges required.\n- If FILE permission needs to be granted to some non-administrative database users, use secure_file_priv setting to limit where files can be written to or read from.",
    "lang" : "en:us"
  },
  "csaw" : false
}