Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server > Metin2 PServer Guides & Strategies
You last visited: Today at 23:36

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Security vulnerability in MySQL/MariaDB sql/password.c

Discussion on Security vulnerability in MySQL/MariaDB sql/password.c within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Reply
 
Old   #1
 
.Rebel's Avatar
 
elite*gold: 60
Join Date: May 2010
Posts: 766
Received Thanks: 1,025
Security vulnerability in MySQL/MariaDB sql/password.c

Something very important for all

that article is not mine i am just sharing information


"Hi

We have recently found a serious security bug in MariaDB and MySQL.
So, here, we'd like to let you know about what the issue and its impact
is. At the end you can find a patch, in case you need to patch an older
unsuported MySQL version.

All MariaDB and MySQL versions up to 5.1.61, 5.2.11, 5.3.5, 5.5.22 are
vulnerable.
MariaDB versions from 5.1.62, 5.2.12, 5.3.6, 5.5.23 are not.
MySQL versions from 5.1.63, 5.5.24, 5.6.6 are not.

This issue got assigned an id CVE-2012-2122.

Here's the issue. 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. 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.

Which means, if one knows a user name to connect (and "root" almost
always exists), she can connect using *any* password by repeating
connection attempts. ~300 attempts takes only a fraction of second, so
basically account password protection is as good as nonexistent.
Any client will do, there's no need for a special libmysqlclient library.

But practically it's better than it looks - many MySQL/MariaDB builds
are not affected by this bug.

Whether a particular build of MySQL or MariaDB is vulnerable, depends on
how and where it was built. A prerequisite is a memcmp() that can return
an arbitrary integer (outside of -128..127 range). To my knowledge gcc
builtin memcmp is safe, BSD libc memcmp is safe. Linux glibc
sse-optimized memcmp is not safe, but gcc usually uses the inlined
builtin version.

As far as I know, official vendor MySQL and MariaDB binaries are not
vulnerable.

Regards,
Sergei Golubchik
MariaDB Security Coordinator

References:

MariaDB bug report:
MariaDB fix:

MySQL bug report:
MySQL fix:
MySQL changelog:

http://dev.mysql.com/doc/refman/5.5/en/news-5-5-24.html"

how to see if my server is vulnerable?

ther the vulnerable tester


PHP Code:
/*
 *
 * CVE-2012-2122 checker
 *
 * You may get differing results with/without -m32
 *
 * Joshua J. Drake
 */

#include <stdio.h>
#include <stdlib.h>
#include <time.h>

int main(void) {
        
int onetworet;
        
time_t start time(0);
        
time_t now;

        
srand(getpid()*start);
        while (
1) {
                
one rand();
                
two rand();
                
ret memcmp(&one, &twosizeof(int));
                if (
ret < -128 || ret 127)
                        break;
                
time(&now);
                if (
now start 10) {
                        
printf("Not triggered in 10 seconds, *probably* not vulnerable..\n");
                        return 
1;
                }
        }
        
printf("Vulnerable! memcmp returned: %d\n"ret);
        return 
0;

.Rebel is offline  
Thanks
1 User
Old 06/12/2012, 19:51   #2
 
MissUnderstoodOne's Avatar
 
elite*gold: 0
Join Date: Jan 2012
Posts: 322
Received Thanks: 505
Everyone who knows how to fix it already got it...
And it's the wrong section
MissUnderstoodOne is offline  
Old 06/13/2012, 05:16   #3
 
.Rebel's Avatar
 
elite*gold: 60
Join Date: May 2010
Posts: 766
Received Thanks: 1,025
how you know already if this bug was detected only in (Jun 09 2012)

let me guess you already know after i say so

and is not on the wrong section because metin is all in mysql

but again you guys dont diserve nothing at all
have fun this section is becoming very noob
.Rebel is offline  
Old 06/13/2012, 07:56   #4
 
elite*gold: 0
Join Date: Dec 2008
Posts: 40
Received Thanks: 21
Quote:
Originally Posted by .Rebel View Post
Something very important for all

that article is not mine i am just sharing information


"Hi

We have recently found a serious security bug in MariaDB and MySQL.
So, here, we'd like to let you know about what the issue and its impact
is. At the end you can find a patch, in case you need to patch an older
unsuported MySQL version.

All MariaDB and MySQL versions up to 5.1.61, 5.2.11, 5.3.5, 5.5.22 are
vulnerable.
MariaDB versions from 5.1.62, 5.2.12, 5.3.6, 5.5.23 are not.
MySQL versions from 5.1.63, 5.5.24, 5.6.6 are not.

This issue got assigned an id CVE-2012-2122.

Here's the issue. 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. 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.

Which means, if one knows a user name to connect (and "root" almost
always exists), she can connect using *any* password by repeating
connection attempts. ~300 attempts takes only a fraction of second, so
basically account password protection is as good as nonexistent.
Any client will do, there's no need for a special libmysqlclient library.

But practically it's better than it looks - many MySQL/MariaDB builds
are not affected by this bug.

Whether a particular build of MySQL or MariaDB is vulnerable, depends on
how and where it was built. A prerequisite is a memcmp() that can return
an arbitrary integer (outside of -128..127 range). To my knowledge gcc
builtin memcmp is safe, BSD libc memcmp is safe. Linux glibc
sse-optimized memcmp is not safe, but gcc usually uses the inlined
builtin version.

As far as I know, official vendor MySQL and MariaDB binaries are not
vulnerable.

Regards,
Sergei Golubchik
MariaDB Security Coordinator

References:

MariaDB bug report:
MariaDB fix:

MySQL bug report:
MySQL fix:
MySQL changelog:

http://dev.mysql.com/doc/refman/5.5/en/news-5-5-24.html"

how to see if my server is vulnerable?

ther the vulnerable tester


PHP Code:
/*
 *
 * CVE-2012-2122 checker
 *
 * You may get differing results with/without -m32
 *
 * Joshua J. Drake
 */

#include <stdio.h>
#include <stdlib.h>
#include <time.h>

int main(void) {
        
int onetworet;
        
time_t start time(0);
        
time_t now;

        
srand(getpid()*start);
        while (
1) {
                
one rand();
                
two rand();
                
ret memcmp(&one, &twosizeof(int));
                if (
ret < -128 || ret 127)
                        break;
                
time(&now);
                if (
now start 10) {
                        
printf("Not triggered in 10 seconds, *probably* not vulnerable..\n");
                        return 
1;
                }
        }
        
printf("Vulnerable! memcmp returned: %d\n"ret);
        return 
0;

in don't know how to fix if you say tell me
gio011 is offline  
Old 06/13/2012, 15:36   #5
 
elite*gold: 14
Join Date: Nov 2011
Posts: 208
Received Thanks: 1,148
Quote:
Originally Posted by gio011 View Post
in don't know how to fix if you say tell me
And I don't know who teached you english. A worm or something comparable?

Auf Deutsch, das ist ein C++ Quellcode, wie ich dem Header entnehmen konnte. Ihr müsst ihn also kompilieren. (Edit: Platform: x86 Unix)

Update: Tutorial hier zu finden:
Teh Daroo is offline  
Old 06/13/2012, 16:05   #6
 
Mi4uric3's Avatar
 
elite*gold: 405
Join Date: Dec 2007
Posts: 6,615
Received Thanks: 6,358
Quote:
Originally Posted by Teh Daroo View Post
And I don't know who teached you english.
Wer im Glashaus sitzt.. [...]
"taught" nicht "teached" lol
Mi4uric3 is offline  
Thanks
6 Users
Old 06/13/2012, 16:41   #7
 
elite*gold: 14
Join Date: Nov 2011
Posts: 208
Received Thanks: 1,148
Quote:
Originally Posted by Mi4uric3 View Post
Wer im Glashaus sitzt.. [...]
"taught" nicht "teached" lol
Tut nichts zur Sache, da du verstanden hast, was ich sagen wollte, was auf meine Vorposter leider nicht zutrifft. Ein Flüchtigkeitsfehler kann jedem mal passieren, was jedoch kein Grund ist, jemanden direkt wegen so etwas trivialem direkt an den Pranger zu stellen.
Teh Daroo is offline  
Old 06/13/2012, 16:56   #8
 
elite*gold: 0
Join Date: Oct 2010
Posts: 115
Received Thanks: 14
Freebsd is not vulnerable!
5203307a is offline  
Old 06/13/2012, 19:19   #9
 
Sphinx²'s Avatar
 
elite*gold: 1918
Join Date: Feb 2008
Posts: 1,368
Received Thanks: 1,287
Nur so nebenbei:
-> mysql Ver 14.12 Distrib 5.0.92, for portbld-freebsd7.4 (i386) using 5.2 <-
Vulnerable?

So wie es oben steht ist es anscheinend nicht "Vulnerable".

Gruss
Sphinx
Sphinx² is offline  
Old 06/14/2012, 09:32   #10
 
Mi4uric3's Avatar
 
elite*gold: 405
Join Date: Dec 2007
Posts: 6,615
Received Thanks: 6,358
Quote:
Originally Posted by Teh Daroo View Post
Tut nichts zur Sache, da du verstanden hast, was ich sagen wollte, was auf meine Vorposter leider nicht zutrifft. Ein Flüchtigkeitsfehler kann jedem mal passieren, was jedoch kein Grund ist, jemanden direkt wegen so etwas trivialem direkt an den Pranger zu stellen.
Höh? Du weißt schon, was die Bedeutung hinter dem Spruch mit dem Glashaus ist, oder?
Du sagst, dass er schlecht Englisch spricht und machst in dem Satz, in dem du ihn anprangerst selbst einen Fehler. Somit ist das von mir kein Anprangern sondern nur ein kleiner Hinweis, dass du vielleicht erstmal auf dich selbst achten solltest :b
Mi4uric3 is offline  
Thanks
1 User
Old 06/15/2012, 13:13   #11
 
elite*gold: 0
Join Date: Jun 2012
Posts: 127
Received Thanks: 66
thanks x3
Brigatagraz is offline  
Reply


Similar Threads Similar Threads
This looks like fun (RoM password security)
06/18/2010 - General Gaming Discussion - 26 Replies
Seems like a bunch of people are raging now on both EU and US forums after this video was made about unencrypted passwords. Looks like fun to me lol EU thread: IMba security for our accounts? Yea hacked by any 10 yo who learned some CCNA. - Forum Video: YouTube - Runes of Magic - Login security I so do love how secure Runes of Magic is. :D
NCsoft Password Security Update
05/13/2010 - Aion - 1 Replies
As of May 12, 2010, the NCsoft Account Management and game account password features were updated to provide better security for our customers. For customers with existing accounts, these updates will take effect after you have logged into your NCsoft master account to update your NCsoft master account password and password hints. For customers creating new accounts, the new features will automatically take effect. The new features include: Removal of date of birth verification for the...
NCsoft Password Security Update
05/13/2010 - Lineage 2 - 1 Replies
As of May 12, 2010, the NCsoft Account Management and game account password features were updated to provide better security for our customers. For customers with existing accounts, these updates will take effect after you have logged into your NCsoft master account to update your NCsoft master account password and password hints. For customers creating new accounts, the new features will automatically take effect. The new features include: Removal of date of birth verification for the...
Change Password without Security Question???
06/16/2008 - Silkroad Online - 4 Replies
Hi guys; is it possible to change my password in Silkroad without answering the Security Question (i forgot the answer, so long ago:().



All times are GMT +1. The time now is 23:36.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.