VulDB: Oracle MySQL bis 5.5.22 Password Authentication sql/password.c memcmp() unbekannte Schwachstelle
Allgemein

scipID: 5503
Betroffen: Oracle MySQL bis 5.5.22
Veröffentlicht: 09.06.2012 (Sergei Golubchik)
Risiko:
sehr kritisch
Eintrag: 100% komplett
Erstellt: 11.06.2012
Aktualisiert: 21.12.2012
Beschreibung
In Oracle MySQL bis 5.5.22 wurde eine sehr kritische Schwachstelle gefunden. Betroffen hiervon ist die Funktion memcmp() der Datei sql/password.c der Komponente Password Authentication. Auswirken tut sich dies auf Vertraulichkeit, Integrität und Verfügbarkeit.
Die Schwachstelle wurde am 09.06.2012 durch Sergei Golubchik von MariaDB in Form eines Mailinglist Posts (oss-sec mailing list) öffentlich gemacht. Bereitgestellt wird das Advisory unter seclists.org. Die Veröffentlichung passierte hierbei ohne Koordination mit Oracle. Die Verwundbarkeit wird seit dem 04.04.2012 als CVE-2012-2122 geführt. Die Schwachstelle ist relativ beliebt, was mitunter auf ihre geringe Komplexität zurückzuführen ist. Der Angriff kann über das Netzwerk angegangen werden. Um eine Ausnutzung durchzusetzen, muss keine spezifische Authentisierung umgesetzt werden. Es sind technische Details sowie ein öffentlicher Exploit zur Schwachstelle bekannt. Die Ausprägung dieser Schwachstelle führt zu einem gewissen historischen Interesse an ihr. HD Moore erklärt in seinem Blog Post: “This flaw was rooted in an assumption that the memcmp() function would always return a value within the range -127 to 127 (signed character). On some platforms and with certain optimizations enabled, this routine can return values outside of this range, eventually causing the code that compares a hashed password to sometimes return true even when the wrong password is specified. Since the authentication protocol generates a different hash each time this comparison is done, there is a 1 in 256 chance that ANY password would be accepted for authentication.”
Ein Exploit wurde durch HD Moore (HDM) in Shell-Skript realisiert und 2 Tage nach dem Advisory veröffentlicht. Er wird als Proof-of-Concept gehandelt. Der Exploit wird unter community.rapid7.com bereitgestellt. Für den Vulnerability Scanner Nessus wurde am 12.06.2012 ein Plugin mit der ID 59452 (USN-1467-1 : mysql-5.1, mysql-5.5, mysql-dfsg-5.0, mysql-dfsg-5.1 vulnerabilities) herausgegeben, womit die Existenz der Schwachstelle geprüft werden kann. Es wird der Family Ubuntu Local Security Checks zugeordnet und im Kontext local ausgeführt. Die Existenz der Schwachstelle kann wie folgt geprüft werden: for i in `seq 1 1000`; do mysql -u root --password=bad -h 127.0.0.1 2>/dev/null; done
Screenshot

CVSS
Base Score: 5.1 (CVSS2#AV:N/AC:H/Au:N/C:P/I:P/A:P) [?]
| Access Vector | Access Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Local | High | Multiple | None | None | None |
| Adjacent | Medium | Single | Partial | Partial | Partial |
| Network | Low | None | Complete | Complete | Complete |
Exploiting
Lokal: Nein
Remote: Ja
Verfügbarkeit: Ja
Zugang: öffentlich
Status: Proof-of-Concept
Programmiersprache: Shell-Skript
Autor: HD Moore (HDM)
Download: community.rapid7.com
Nessus ID: 59452
Nessus Name: USN-1467-1 : mysql-5.1, mysql-5.5, mysql-dfsg-5.0, mysql-dfsg-5.1 vulnerabilities
Nessus Family: Ubuntu Local Security Checks
Nessus Context: local
Gegenmassnahmen
Empfehlung: Patch
0-Day Time: 0 Tage seit gefunden
Exploit Delay Time: 2 Tage seit bekannt
Patch: bazaar.launchpad.net
Firewalling: tcp/3306 (mysql)
Timeline
04.04.2012 | CVE zugewiesen
07.05.2012 | Gegenmassnahme veröffentlicht
09.06.2012 | Advisory veröffentlicht
11.06.2012 | Exploit veröffentlicht
11.06.2012 | VulDB Eintrag erstellt
12.06.2012 | Nessus Plugin veröffentlicht
21.12.2012 | VulDB Eintrag aktualisiert
Quellen
Advisory: seclists.org
Person: Sergei Golubchik
Firma: MariaDB
Bestätigung: bugs.mysql.com
CVE: CVE-2012-2122 (mitre.org) (nist.org) (cvedetails.com)
SecurityFocus: 53911



















