GNU libcdio库cd-info/iso-info文件栈溢出漏洞
发布日期:2007-12-30
更新日期:2008-01-07
受影响系统:GNU libcdio 0.79
描述:
BUGTRAQ ID:
27131
CVE(CAN) ID:
CVE-2007-6613
GNU压缩磁盘输入和控制库(libcdio)是用于访问CD-ROM和CD镜像的函数库。
libcdio库的cd-info.c和iso-info.c文件中的print_iso9660_recurse()函数中存在栈溢出漏洞,本地攻击者可能利用此漏洞提升自己的权限。
如果用户受骗使用该库加载了包含有超长joilet文件名的磁盘或镜像的话,就可能导致拒绝服务(core dump)或执行任意指令。以下是src/iso-info.c的print_iso9660_recurse函数中的漏洞代码:
_CDIO_LIST_FOREACH (entnode, entlist)
{
iso9660_stat_t *p_statbuf = _cdio_list_node_data (entnode);
char *psz_iso_name = p_statbuf->filename;
char _fullname[4096] = { 0, };
char translated_name[MAX_ISONAME+1];
if (yep != p_statbuf->rr.b3_rock || 1 == opts.no_rock_ridge) {
iso9660_name_translate_ext(psz_iso_name, translated_name,
i_joliet_level);
snprintf (_fullname, sizeof (_fullname), "%s%s", psz_path,
translated_name);
} else {
snprintf (_fullname, sizeof (_fullname), "%s%s", psz_path,
psz_iso_name);
<*来源:Devon Miller (
devon.miller@verizon.net)
链接:
http://secunia.com/advisories/28308/
http://bugs.gentoo.org/show_bug.cgi?format=multiple&id=203777
http://lists.gnu.org/archive/html/libcdio-devel/2007-12/msg00009.html
*>
测试方法:
警 告
以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!
1. mkdir -p tmp/dir1
2. echo file_with_really_really_long_silly_name_to_test_iso_info_buffer
3. mkisofs -J -R -volid My_Image -o test.iso tmp
4. iso-info -l test.iso
建议:
厂商补丁:
GNU
---
目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载:
http://bugs.gentoo.org/attachment.cgi?id=140011浏览次数:2713
严重程度:0(网友投票)