News

MySQL Databases Subject to Password Verification Flaw

The flaw, reported this week, could allow an incorrect password to be verified as correct due to an error in the token calculation, according to Sergei Golubchik, security coordinator for MariaDB, in a posted statement. It could give remote attackers access the contents of the databases by bypassing the password authentication process in unpatched systems.

"When a user connects to MariaDB/MySQL, a token (SHA over a password and a random scramble string) is calculated and compared with the expected value," said Golubchik. "Because of incorrect casting, it might've happened that the token and the expected value were considered equal, even if the memcmp() returned a non-zero value. In this case MySQL/MariaDB would think that the password is correct, even while it is not.  Because the protocol uses random strings, the probability of hitting this bug is about 1/256."

Golubchik explained that by using a legitimate username and repeating connection attempts with any password, hackers can gain access in seconds, making any password protection protocol in place "as good as nonexistent."   While a large majority of MariaDB and MySQL databases use the flawed code, HD Moore, Rapid7's CSO, said that only a few select systems running these databases are vulnerable to attack.

"It boils down to whether the memcmp() routine returns values outside of the unsigned character range," said Moore in a blog post. "According to Sergei, this is normally not the case, and the routine is normally compiled into the server as an inline function."

Those systems that have been confirmed to be vulnerable include Ubuntu Linux 64-bit, Debian unstable 64-bit 5.5.23-2, Fedora, Arch Linux and OpenSuSE 12.1 64-bit MySQL 5.5.23-log.

Official builds from MySQL and MariaDB on Windows, and versions found on Red Hat Enterprise Linux 4, 5 and 6, are all safe from the flaw. As for the vulnerable builds, once MySQL patches 5.1.63 and 5.5.24 are applied, the systems should be secured, officials claim.

Moore has also provided a workaround for those who cannot patch.

"If you are responsible for a MySQL server that is currently exposed to the network unnecessarily, the easiest thing to do is to modify the my.cnf file in order to restrict access to the local system," Moore explained in his blog post. "Open my.cnf with the editor of your choice, find the section labeled [mysqld] and change (or add a new line to set) the 'bind-address' parameter to "127.0.0.1". Restart the MySQL service to apply this setting."

About the Author

Chris Paoli is the site producer for Redmondmag.com and MCPmag.com.

Featured

  • Microsoft Clarifies Project Cortex's Scope, IT Controls and Product Delivery in Q&A

    Microsoft recently offered a Q&A session on Project Cortex, its emerging "knowledge network" solution for Microsoft 365 users.

  • How To Use .CSV Files with PowerShell, Part 2

    In the second part of this series, Brien shows how to import a .CSV file into a PowerShell array, including two methods for zooming in on just the specific data you need and filtering out the rest.

  • Windows 10 Preview Adds Ability To Display Linux Distro Files

    Microsoft on Wednesday announced Windows 10 preview build 19603, which adds easier access to installed Linux distro files using Windows File Explorer.

  • Microsoft 365 Business To Get Azure Active Directory Premium P1 Perks

    Subscribers to Microsoft 365 Business (which is being renamed this month to "Microsoft 365 Business Premium") will be getting Azure Active Directory Premium P1 licensing at no additional cost.

comments powered by Disqus

Office 365 Watch

Sign up for our newsletter.

Terms and Privacy Policy consent

I agree to this site's Privacy Policy.