banner

Blogs

Fixing Root Privilege Escalation Vulnerability (CVE-2016-6664) in MySQL, PerconaDB & MariaDB

  • February 3rd, 2017
  • By Amal S
  • Blog
  • Phishing is always a threat to the proper functioning of the servers. It is the server vulnerabilities that help the hackers to get into a server. The only way to manage such vulnerabilities is to gain deep knowledge about such limitations. We have been educating our readers with highly effective techniques to solve all server related issues. In previous blogs, we have covered a couple of errors which adversely affect the tasks of server administrators. In this blog, as a server maintenance services provider, we will guide you to Fix Root Privilege Escalation vulnerability (CVE-2016-6664) in MySQL, PerconaDB & MariaDB.

    Root Privilege Escalation Vulnerability of MySQL

    Server phishing happens due to the exploitation of the two vulnerabilities of the server, namely CVE-2016-6663 aka Privilege Escalation / Race Condition and CVE-2016-6664‘or ‘Root Privilege Escalation. A local MySQL user can escalate his privileges in CVE-2016-6663 server by exploiting this first liability. A person who gets higher privileges can hack the confidential data by executing malicious code in the database server. In CVE-2016-6664 vulnerability, the hacker makes use of the less-privileged user accounts and escalates their privilege to the root level. The hacker can exploit the critical or confidential information after getting the access to the database server. So In order to avoid any server failure or business downtime, these two vulnerabilities need to be fixed without any delay.

    Database servers which are affected by Root Privilege Escalation Vulnerability include MySQL server and its derivatives such as Percona and Maria DB. The vulnerable versions are:

    MySQL
    <= 5.5.51
    <= 5.6.32
    <= 5.7.14
    MariaDB
    All current
    Percona Server
    <5.5.51-38.2
    <5.6.32-78-1
    <5.7.14-8
    Percona XtraDB Cluster
    <5.6.32-25.17
    <5.7.14-26.17
    <5.5.41-37.0
     

    Root Privilege Escalation Bug Fixing in MySQL

    In the latest database versions, MySQL has fixed the vulnerability issues. In order to update your server follow the below instructions.

    Use ‘yum’ for updating the MySQL server for CentOS and RedHat servers.

    sudo yum update mysql-server

    In every version change, before installing the new version, the previous version has to be removed.

    The ‘apt-get’ can be used to update the ‘mysql-server’ package in Debian and Ubuntu servers.

    [email protected] ~ $ sudo apt-get update
    [email protected] ~ $ sudo apt-get install mysql-server

    The execution of mysql_upgrade prior to every restart, after update, helps you to check and resolve any incompatibilities between the old data and the upgraded software.
     

    Fixing Root Privilege Escalation Exploit in Percona

    The critical vulnerabilities are fixed by Percona in its last few versions for MySQL and Percona XtraDB Cluster.
    Patched Versions of Percona Server
    5.5.51-38.2
    5.6.32-78-1
    5.7.14-8
    Secure versions of Percona XtraDB Cluster:
    5.5.41-37.0
    5.6.32-25.17
    5.7.14-26.17
    The users need to upgrade their relevant incremental release in order to secure the Percona database servers from root privilege exploit issues. So, how to get this done? Well, here is the solution:
    1. First, go to the official website and download the latest version of Percona. Make sure that you have chosen the OS and hardware before downloading.
    2. Do Source page extraction.
    3. Use rpm for Red Hat Enterprise Linux and CentOS servers and dpkg for installation in Debian servers.
    4. To update database server in Ubuntu, use ‘apt-get’ and on the other hand, RedHat can be updated using ‘yum’.
     

    Root Privilege Escalation in MariaDB

    MariaDB has updated their software to prevent CVE-2016-6663 but has not yet released a secure version to address CVE-2016-6664. So fixing vulnerabilities in MariaDB implies to update MariaDB to the following secure versions.

    5.5.52
    10.0.28
    10.1.18

    The MariaDB server can be updated to the latest versions with the following steps.

    1. From MariaDB website, download the desired version.
    2. Shut down the old version.
    3. To update the permissions and table compatibility, run the mysql_upgrade command.
    4. After updating to the latest version, restart the MariaDB instance.

    We can expect the fix for CVE-2016-6664 in their upcoming versions.
     

    Conclusion

    Even though absolute perfection is almost unattainable, we can aim it to better ourselves. In reality, the only person you have to compete with is yourselves. Likewise, zero vulnerability is almost impossible but acting immediately to fix it helps you to avoid catastrophic business downtimes. Being an active player in the server industry, we have some recommendations for you to avoid server vulnerabilities.
    • Take a regular backup of the configuration files and databases of the server before installing an upgrade.
    • Depending on the server configuration, make upgrades.
    • Restart the database prior to every update and then add custom configurations.
    • Test the software applications and websites in order to ensure proper functioning of the server.

    Recent Post