Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 177913 - dev-db/mysql IF Query Denial of Service Vulnerability (CVE-2007-2583)
Summary: dev-db/mysql IF Query Denial of Service Vulnerability (CVE-2007-2583)
Status: RESOLVED DUPLICATE of bug 171934
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Security
URL: http://secunia.com/advisories/25188/
Whiteboard: B3 [glsa] jaervosz
Keywords:
Depends on: 179398
Blocks:
  Show dependency tree
 
Reported: 2007-05-10 13:22 UTC by Lars Hartmann
Modified: 2020-03-28 23:11 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Hartmann 2007-05-10 13:22:39 UTC
Description:
Neil Kettle has reported a vulnerability in MySQL, which can be exploited by malicious users to cause a DoS (Denial of Service).

The vulnerability is caused due to an error when handling specially crafted IF queries, which can be exploited to crash the server.

The vulnerability is reported in versions prior to 5.0.40.

Solution:
Update to version 5.0.40.

Reproducible: Always
Comment 1 Lars Hartmann 2007-05-10 13:23:43 UTC
maintainers - please provide an updated ebuild
Comment 2 Lars Hartmann 2007-05-10 13:25:00 UTC
maintainers - please provide an updated ebuild
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2007-05-11 08:48:54 UTC
5.0.40 in the tree now.
There may be an -r1 as well with some cleanups, but -r0 is good for the arches.
Comment 4 Lars Hartmann 2007-05-12 15:06:57 UTC
arches - please test
target keywords are alpha, amd64, arm, hppa, ia64, mips, ppc, ppc64, s390,
sparc, x86
Comment 5 Lars Hartmann 2007-05-12 17:41:12 UTC
target ebuild is dev-db/mysql-5.0.40
Comment 6 Markus Rothe (RETIRED) gentoo-dev 2007-05-13 10:19:25 UTC
ppc64 stable
Comment 7 Raúl Porcel (RETIRED) gentoo-dev 2007-05-13 15:07:12 UTC
ia64 + x86 stable
Comment 8 Jeroen Roovers (RETIRED) gentoo-dev 2007-05-14 05:26:51 UTC
Stable for HPPA.
Comment 9 Gustavo Zacarias (RETIRED) gentoo-dev 2007-05-14 21:33:21 UTC
sparc stable.
Comment 10 Roeland Douma 2007-05-15 11:21:21 UTC
I just compiled mysql-5.0.40 and all test cases failed. So i'm geussing there is a problem. I uploaded the complete build log ( http://rullzer.com/gentoo/mysql-5.0.40-build.log )  since well there are a lot of test cases... They all fail because it can't start the mysql server. Why this is i do not know. Version 5.0.38 works like a charm..

emerge --info:
Portage 2.1.2.2 (default-linux/amd64/2006.1/no-multilib, gcc-4.1.1, glibc-2.5-r2, 2.6.19-gentoo-r5 x86_64)
=================================================================
System uname: 2.6.19-gentoo-r5 x86_64 AMD Sempron(tm) Processor 2800+
Gentoo Base System release 1.12.9
Timestamp of tree: Tue, 15 May 2007 01:20:01 +0000
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/php/apache1-php5/ext-active/ /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=athlon64 -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="collision-protect distlocks metadata-transfer multilib-strict sandbox sfperms strict test"
GENTOO_MIRRORS="ftp://gentoo.tiscali.nl/pub/mirror/gentoo/"
LINGUAS="en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/overlay"
SYNC="rsync://rsync.nl.gentoo.org/gentoo-portage"
USE="amd64 apache2 authdaemond bitmap-fonts bzip2 calendar cli cracklib crypt dri gdbm gpm iconv imap isdnlog libg++ libwww logrotate maildir midi ncurses nls nptl nptlonly pcre perl ppds pppd prcre python readline reflection session spell spl ssl tcpd test truetype-fonts type1-fonts unicode vda winbind xml xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="apm ark ati chips cirrus cyrix dummy fbdev glint i128 i810 mga neomagic nv rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 11 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2007-05-15 12:45:04 UTC
roeland: please tar up ${S}/mysql-tests/ after the tests fail and email it to me, robbat2@gentoo.org.
Comment 12 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2007-05-15 12:46:29 UTC
oh, and all of the testcases do pass on my Core 2 Duo that runs ~amd64 as well as my ~ppc G5. On x86 I'm aware of a weird blip with mysql_client_test, but every other test passes fine, and i'm suspecting a testcase oddity there.
Comment 13 Jose Luis Rivero (yoswink) (RETIRED) gentoo-dev 2007-05-15 22:42:38 UTC
Robin, in alpha we also have the same problem as comment #10. I will mail you the result of the tests or we can open a new bug for this, as you prefer.

Anyway, mysql works fine with my manual tests: mysql client conexion and phpmyadmin, alpha stable. 

Comment 14 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2007-05-15 23:01:55 UTC
yoswink: Please tar up that directory after the tests fail, and email it to me (i'm certain it will be over the bugzilla size limit).
Comment 15 Daniel Gryniewicz (RETIRED) gentoo-dev 2007-05-16 01:03:14 UTC
FTR, I have all the same failure on my core2duo ~amd64 box.
Comment 16 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2007-05-16 01:13:39 UTC
roeland/yoswink/dang:
Looking at the log that roeland sent me (specifically the ${S}/mysql-tests/var/log/master.err file), I see that MySQL is refusing to run for security reasons):
CURRENT_TEST: alias
070515 14:06:58 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
070515 14:06:58 [ERROR] Aborting
070515 14:06:58 [Note] /var/tmp/portage/dev-db/mysql-5.0.40/work/mysql/sql/mysqld: Shutdown complete

Could you confirm that all of you are using FEATURES=-userpriv, and change to using userpriv to see if things change for you?
Comment 17 Roeland Douma 2007-05-16 14:14:27 UTC
Yup it was disabled.

FEATURES=userpriv emerge mysql

this compiled fine and testing went OK.
Running it now i can use it fine with phpmyadmin and with griffith that uses the database. So running good here on AMD64
Comment 18 Jose Luis Rivero (yoswink) (RETIRED) gentoo-dev 2007-05-16 16:43:28 UTC
(In reply to comment #16)
>
> Could you confirm that all of you are using FEATURES=-userpriv, and change to
> using userpriv to see if things change for you?
> 

Confirmed, with FEATURES=userpriv all went fine, except one of the test failed in alpha, this is the summary:

----
execution_constants            [ fail ]
2013: 'Lost connection to MySQL server during query', instead of 0...
----

Seems like a temporary problem with database connection and nothing related with the test itself, so I think we can live with it.

Thanks Robin and if you need any more info feel free to ask.

Comment 19 Tobias Scherbaum (RETIRED) gentoo-dev 2007-05-16 20:43:55 UTC
ppc stable
Comment 20 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2007-05-16 23:36:53 UTC
yoswink:
could you try to run just that test again?
FEATURES='userpriv test' ebuild mysql-5.0.40.ebuild compile
cd ${S}/mysql-test
su -s /bin/sh -c './mysql-test-run.pl --force execution_constants' portage

If it still fails, tar up and email to me:
${S}/mysql-test/r/execution_constants*
${S}/mysql-test/var/
Comment 21 Christoph Mende (RETIRED) gentoo-dev 2007-05-31 22:06:52 UTC
amd64 stable
Comment 22 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2007-06-01 05:55:33 UTC
This one is ready for GLSA decision. I vote YES.
Comment 23 Raphael Marichez (Falco) (RETIRED) gentoo-dev 2007-06-01 15:08:44 UTC
Yes too
Comment 24 Raphael Marichez (Falco) (RETIRED) gentoo-dev 2007-06-02 18:37:59 UTC
I'm very sorry but mysql-5.0.38 is not affected by this issue (i've just checked here). It was already fixed with GLSA 200705-11.

See also http://secunia.com/advisories/25196/ which mentions exactly SA 25188

*** This bug has been marked as a duplicate of bug 171934 ***