漏洞信息详情
Xine FFmpeg 4xm安全漏洞
- CNNVD编号:CNNVD-200902-514
- 危害等级: 中危
- CVE编号: CVE-2009-0698
- 漏洞类型: 其他
- 发布时间: 2009-01-28
- 威胁类型: 远程
- 更新时间: 2021-07-14
- 厂 商: xine
- 漏洞来源: Tobias Klein
漏洞简介
Xine FFmpeg 4xm是一组软件库,可以记录、转换和流式传输多种格式的数字音频和视频。
Fmpeg在解析畸形的4X电影文件时存在类型转换漏洞,以下是libavformat/4xm.c文件中的有漏洞代码段:
[..]
93 static int fourxm_read_header(AVFormatContext *s,
94 AVFormatParameters *ap)
95 {
..
103 [8] int current_track = -1;
..
106 [9] fourxm->track_count = 0;
107 [10] fourxm->tracks = NULL;
..
160 } else if (fourcc_tag == strk_TAG) {
161 /* check that there is enough data */
162 if (size != strk_SIZE) {
163 av_free(header);
164 return AVERROR_INVALIDDATA;
165 }
166 [1] current_track = AV_RL32(&header[i + 8]);
167 [2] if (current_track + 1 > fourxm->track_count) {
168 fourxm->track_count = current_track + 1;
169 if((unsigned)fourxm->track_count >= UINT_MAX /
sizeof(AudioTrack))
170 return -1;
171 [3] fourxm->tracks = av_realloc(fourxm->tracks,
172 fourxm->track_count * sizeof(AudioTrack));
173 if (!fourxm->tracks) {
174 av_free(header);
175 return AVERROR(ENOMEM);
176 }
177 }
178 [4] fourxm->tracks[current_track].adpcm = AV_RL32(&header[i + 12]);
179 [5] fourxm->tracks[current_track].channels = AV_RL32(&header[i + 36]);
180 [6] fourxm->tracks[current_track].sample_rate = AV_RL32(&header[i+40]);
181 [7] fourxm->tracks[current_track].bits = AV_RL32(&header[i + 44]);
[..]
[1] 使用来自媒体文件的用户提供数据填充有符型int变量current_track(见[8])
[2] 这个语句检查current_track值是否大于fourxm->track_count。用0初始化了fourxm->track_count变量(见[9]),对current_track提供大于等于0x80000000的值就会导致current_track为负数。如果current_track为负数,if语句总会返回false,无法到达
[3]处的缓冲区分配。
[4] 由于用NULL初始化了fourxm->tracks(见[10])且无法到达171行,这导致可利用的空指针引用。可以向NULL + current_track内存位置写入4个字节的用户控制数据。由于current_track值也是用户可控的,还可以向很大的内存地址范围写入4字节的任意数据。
[5] 同[4]
[6] 同[4]
[7] 同[4]
漏洞公告
目前厂商已经发布了升级补丁以修复这个安全问题,补丁下载链接:
http://svn.ffmpeg.org/ffmpeg?view=revamp;revision=16846
参考网址
来源: sourceforge.net
链接:http://sourceforge.net/project/shownotes.php?release_id=660071
来源: XF
名称: xinelib-4xmdemuxer-code-execution(48954)
链接:http://xforce.iss.net/xforce/xfdb/48954
来源: UBUNTU
名称: USN-746-1
链接:http://www.ubuntu.com/usn/USN-746-1
来源: MISC
链接:http://www.trapkit.de/advisories/TKADV2009-004.txt
来源: BUGTRAQ
名称: 20090128 [TKADV2009-004] FFmpeg 链接:http://www.securityfocus.com/archive/1/archive/1/500514/100/0/threaded
来源: MANDRIVA
名称: MDVSA-2009:299
链接:http://www.mandriva.com/security/advisories?name=MDVSA-2009:299
来源: MANDRIVA
名称: MDVSA-2009:298
链接:http://www.mandriva.com/security/advisories?name=MDVSA-2009:298
来源: SUSE
名称: SUSE-SR:2009:009
链接:http://lists.opensuse.org/opensuse-security-announce/2009-04/msg00010.HTML
来源: bugs.xine-project.org
链接:http://bugs.xine-project.org/show_bug.cgi?id=205
受影响实体
- Xine Xine-Lib:1.1.16.1
补丁
暂无
![weinxin](http://zone.ci/zone_ci_images/zone.ci.png)
评论