安全研究
安全漏洞
OpenOffice rtl_allocateMemory()函数堆溢出漏洞
发布日期:2008-06-10
更新日期:2008-06-13
受影响系统:
OpenOffice OpenOffice 2.0 - 2.4不受影响系统:
OpenOffice OpenOffice 2.4.1描述:
BUGTRAQ ID: 29622
CVE(CAN) ID: CVE-2008-2152
OpenOffice是个整合性的软件,包含了许多文字处理、表格、公式等办公工具。
OpenOffice的rtl_allocateMemory()函数没有执行整数溢出检查便以8字节为边界环绕分配请求,以下是sal/rtl/source/alloc_global.c中的漏洞代码:
191 void *
192 SAL_CALL rtl_allocateMemory (sal_Size n)
193 {
194 void * p = 0;
195 if (n > 0)
196 {
197 char * addr;
198 sal_Size size = RTL_MEMORY_ALIGN(n + RTL_MEMALIGN, RTL_MEMALIGN);
199
200 int index = (size - 1) >> RTL_MEMALIGN_SHIFT;
201 OSL_ASSERT(RTL_MEMALIGN >= sizeof(sal_Size));
202
203 try_alloc:
204 if (index < RTL_MEMORY_CACHED_LIMIT >> RTL_MEMALIGN_SHIFT)
205 addr = (char*)rtl_cache_alloc(g_alloc_table[index]);
206 else
207 addr = (char*)rtl_arena_alloc (gp_alloc_arena, &size);
208
在198行,如果n > UINT_MAX - RTL_MEMALIGN的话n + RTL_MEMALIGN计算就可能溢出,导致在try_alloc分配了不充分的缓冲区,然后将这个缓冲区返回给了调用函数。由于调用函数所认为缓冲区大小比实际大小大得多,因此可能触发堆溢出。
<*来源:Sean Larsson
链接:http://secunia.com/advisories/30599
http://www.openoffice.org/security/cves/CVE-2008-2152.html
https://www.redhat.com/support/errata/RHSA-2008-0538.html
https://www.redhat.com/support/errata/RHSA-2008-0537.html
http://sunsolve.sun.com/search/printfriendly.do?assetkey=1-66-237944-1
http://labs.idefense.com/intelligence/vulnerabilities/display.php?id=714
http://security.gentoo.org/glsa/glsa-200807-05.xml
*>
建议:
厂商补丁:
RedHat
------
RedHat已经为此发布了一个安全公告(RHSA-2008:0537-01)以及相应补丁:
RHSA-2008:0537-01:Important: openoffice.org security update
链接:https://www.redhat.com/support/errata/RHSA-2008-0537.html
Sun
---
Sun已经为此发布了一个安全公告(Sun-Alert-237944)以及相应补丁:
Sun-Alert-237944:A Security Vulnerability in StarOffice/StarSuite 8 may allow file manipulation and Arbitrary Code execution
链接:http://sunsolve.sun.com/search/printfriendly.do?assetkey=1-66-237944-1
Gentoo
------
Gentoo已经为此发布了一个安全公告(GLSA-200807-05)以及相应补丁:
GLSA-200807-05:OpenOffice.org: User-assisted execution of arbitrary code
链接:http://security.gentoo.org/glsa/glsa-200807-05.xml
所有OpenOffice.org用户都应升级到最新版本:
# emerge --sync
# emerge --ask --oneshot --verbose ">=app-office/openoffice-2.4.1"
所有OpenOffice.org二进制程序用户都应升级到最新版本:
# emerge --sync
# emerge --ask --oneshot --verbose ">=app-office/openoffice-bin-2.4.1"
OpenOffice
----------
目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载:
http://www.openoffice.org/
浏览次数:2572
严重程度:0(网友投票)
绿盟科技给您安全的保障
