This is also important in other environments, for instance shared hosting where you may connect to localhost, or places where you may have given non-admin shell access to a developer (assuming they could not connect to mysql root user). This is a serious vulnerability. Especially since the latest ubuntu seems to be affected(I'm on mint 13, and it is) See Ready shodanhq query for latest mysql version: http://www.shoda…
Security vulnerability in MySQL ubuntu
21–30 of 116 posts
Re: Security vulnerability in MySQL ubuntu
#22Re: Security vulnerability in MySQL ubuntu
#23That's two months ago. Looking at the changelog (http://dev.mysql.com/doc/refman/5.1/en/news-5-1-63.html), they piled in a bunch of other changes like "use less disk space". This should have gone out pronto. I feel it's not the kind of thing you sit on until your next quarterly release is scheduled.
[oh wait, this is worse. mysql 5.1.63 was actually released a month ago. But they only now tell us what the security bug was? Meanwhile the bad people have had a month to diff sources? Double unhappy.]
Re: Security vulnerability in MySQL ubuntu
#24I'd love to see the code; quite how they are not comparing a memcmp to 0 would be interesting to see...
This is why real C programmers use int as their bool type. :)
Re: Security vulnerability in MySQL ubuntu
#25Debian lenny 32-bit 5.0.51a-24+lenny5
Debian lenny 64-bit 5.0.51a-24+lenny5
Debian lenny 64-bit 5.1.51-1-log
Debian squeeze 64-bit 5.1.49-3-log
Debian squeeze 32-bit 5.1.61-0+squeeze1
Debian squeeze 64-bit 5.1.61-0+squeeze1
Ubuntu lucid 64-bit 5.1.62-0ubuntu0.10.04.1
So I'm not inclined to think it's as bad as made out by the simple exploit above.
Re: Security vulnerability in MySQL ubuntu
#26Re: Security vulnerability in MySQL ubuntu
#27I'd love to see the code; quite how they are not comparing a memcmp to 0 would be interesting to see...
There is a check_scramble function which returns a my_bool , presumably a char typedef. That function itself directly returns the result of memcmp . If your memcmp implementation returns the full range of int values (allowed), 1/256 of them will have a 0 low order byte, which will then compare equal to zero when the check_scramble call is tested. This is why real C programmers use int as their bool type. :)
It has the same problem if a wider type (e.g. long) is assigned to it. Use _Bool instead.
Re: Security vulnerability in MySQL ubuntu
#28Earlier quoted context omitted.
There is a check_scramble function which returns a my_bool , presumably a char typedef. That function itself directly returns the result of memcmp . If your memcmp implementation returns the full range of int values (allowed), 1/256 of them will have a 0 low order byte, which will then compare equal to zero when the check_scramble call is tested. This is why real C programmers use int as their bool type. :)
> This is why real C programmers use int as their bool type. :) It has the same problem if a wider type (e.g. long) is assigned to it. Use _Bool instead.
Re: Security vulnerability in MySQL ubuntu
#29Is the bug limited to ubuntu?
Re: Security vulnerability in MySQL ubuntu
#30I've been trying this on lots of our customers' boxes and can't exploit it - no matter how many times I've tried I always get turned away when retrying root's password, e.g. trying "while true; do mysql -u root mysql --password=baha; done" does not yield access on any of: Debian lenny 32-bit 5.0.51a-24+lenny5 Debian lenny 64-bit 5.0.51a-24+lenny5 Debian lenny 64-bit 5.1.51-1-log Debian squeeze 64-bit 5.1.49-3-log Deb…