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

  • Surface and ARM: Why Microsoft Shouldn't Follow Apple's Lead and Dump Intel

    Microsoft's current Surface flagship, the Surface Pro X, already runs on ARM. But as the ill-fated Surface RT showed, going all-in on ARM never did Microsoft many favors.

  • IT Security Isn't Supposed To Be Easy

    Joey explains why it's worth it to endure a little inconvenience for the long-term benefits of a password manager and multifactor authentication.

  • Microsoft Makes It Easier To Self-Provision PCs via Windows Autopilot When VPNs Are Used

    Microsoft announced this week that the Windows Autopilot service used with Microsoft Intune now supports enrolling devices, even in cases where virtual private networks (VPNs) might get in the way.

  • Most Microsoft Retail Locations To Shut Down

    Microsoft is pivoting its retail operations to focus more on online sales, a plan that would mean the closing of most physical Microsoft Store locations.

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.