漏洞信息详情
Microsoft MFC库CFileFind::FindFile堆溢出漏洞
- CNNVD编号:CNNVD-200709-214
- 危害等级: 超危
- CVE编号:
CVE-2007-4916
- 漏洞类型:
缓冲区溢出
- 发布时间:
2007-09-17
- 威胁类型:
远程
- 更新时间:
2007-10-08
- 厂 商:
hp - 漏洞来源:
Jonathan Sarba※ sa… -
漏洞简介
Microsoft Windows是美国微软(Microsoft)公司发布的一系列操作系统。
Windows系统中所提供的MFC42和MFC71库的CFileFind类在处理FindFile()函数参数时存在堆溢出漏洞,本地攻击者可能利用此漏洞提升自己的权限。
MFC[42|71].dll@CFileFind::FindFile(char const *,unsigned long)
.text:73D6CD3F mov edi, edi
.text:73D6CD41 push ebp
.text:73D6CD42 push esi ; unsigned int
.text:73D6CD43 push edi ; unsigned __int8 *
.text:73D6CD44 mov esi, ecx
.text:73D6CD46 call CFileFind::Close(void)
.text:73D6CD4B push 140h ; int << 320 bytes
.text:73D6CD50 call @operator new(uint) << buffer Allocate [1]
.text:73D6CD55 mov ebp, [esp+14h]
.text:73D6CD59 and dword ptr [esi+10h], 0
.text:73D6CD5D test ebp, ebp
.text:73D6CD5F pop ecx
.text:73D6CD60 mov [esi+8], eax
.text:73D6CD63 jnz short loc_73D6CD6A
.text:73D6CD65 mov ebp, offset a__1 ; \”*.*\” << si arg_0 == NULL
.text:73D6CD6A loc_73D6CD6A; CODE XREF: CFileFind::FindFile(char const*,ulong)+24j
.text:73D6CD6A push ebp ; lpString2
.text:73D6CD6B add eax, 2Ch
.text:73D6CD6E push eax ; lpString1
.text:73D6CD6F call ds:__imp__lstrcpyA@8 ; lstrcpyA(x,x) << [2]
.text:73D6CD75 push dword ptr [esi+8] ; lpFindFileData
.text:73D6CD78 push ebp ; lpFileName
.text:73D6CD79 call ds:__imp__FindFirstFileA@8 ; FindFirstFileA(x,x)
[…]
MFC[42|71]u.dll@CFileFind::FindFile(char const *,unsigned long)
.text:5F817BFC push ebx ; wchar_t
.text:5F817BFD push esi ; wchar_t *
.text:5F817BFE push edi
.text:5F817BFF mov esi, ecx
.text:5F817C01 call CFileFind::Close(void)
.text:5F817C06 push 250h ; int << 592 bytes
.text:5F817C0B call @operator new(uint) << buffer allocate [1]
.text:5F817C10 mov ebx, [esp+14h]
.text:5F817C14 and dword ptr [esi+10h], 0
.text:5F817C18 test ebx, ebx
.text:5F817C1A pop ecx
.text:5F817C1B mov [esi+8], eax
.text:5F817C1E jnz short loc_5F817C25
.text:5F817C20 mov ebx, offset a_ ; \”*.*\” << si arg_0 == NULL
.text:5F817C25 loc_5F817C25; CODE XREF: CFileFind::FindFile(ushort const*,ulong)+22j
.text:5F817C25 push ebx ; lpString2
.text:5F817C26 add eax, 2Ch
.text:5F817C29 push eax ; lpString1
.text:5F817C2A call ds:__imp__lstrcpyW@8 ; lstrcpyW(x,x) << [2]
.text:5F817C30 push dword ptr [esi+8] ; lpFindFileData
.text:5F817C33 push ebx ; lpFileName
.text:5F817C34 call ds:__imp__FindFirstFileW@8 ;
FindFirstFileW(x,x)
[…]
FindFile方式为[1]处的缓冲区分配内存,然后未经检查便储存了[2]处函数的第一个参数的内容。如果用户提交了超长参数的话就可以触发堆溢出,导致执行任意指令。
漏洞公告
目前厂商还没有提供此漏洞的相关补丁或者升级程序,建议使用此软件的用户随时关注厂商的主页以获取最新版本:
http://www.microsoft.com/technet/security/
参考网址
来源: US-CERT
名称: VU#611008
链接:http://www.kb.cert.org/vuls/id/611008
来源: BUGTRAQ
名称: 20070914 [GOODFELLAS-VULN] FileFind class from MFC Library cause heapoverflow
链接:http://www.securityfocus.com/archive/1/archive/1/479443/100/0/threaded
来源: BUGTRAQ
名称: 20070914 [GOODFELLAS-VULN] ActiveX hpqutil!ListFiles hpqutil.dll – Remoteheap overflow
链接:http://www.securityfocus.com/archive/1/archive/1/479442/100/0/threaded
来源: MISC
链接:http://goodfellas.shellcode.com.ar/own/VULWKU200706142
来源: MISC
链接:http://goodfellas.shellcode.com.ar/own/VULWAR200706041
来源: XF
名称: hp-hpqutillistfiles-bo(36609)
链接:http://xforce.iss.net/xforce/xfdb/36609
来源: XF
名称: visual-mfc-findfile-bo(36608)
链接:http://xforce.iss.net/xforce/xfdb/36608
来源: SECTRACK
名称: 1018698
链接:http://www.securitytracker.com/id?1018698
来源: BID
名称: 25697
链接:http://www.securityfocus.com/bid/25697
来源: BID
名称: 25673
链接:http://www.securityfocus.com/bid/25673
来源: VUPEN
名称: ADV-2007-3182
链接:http://www.frsirt.com/english/advisories/2007/3182
来源: SREASON
名称: 3143
链接:http://securityreason.com/securityalert/3143
来源: SECUNIA
名称: 26800