Vulnerabilities > CVE-2007-4916 - Improper Restriction of Operations Within the Bounds of A Memory Buffer vulnerability in HP All-In-On Printer and Photo and Imaging Gallery

047910
CVSS 10.0 - CRITICAL
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
COMPLETE
Integrity impact
COMPLETE
Availability impact
COMPLETE
network
low complexity
hp
CWE-119
critical
exploit available

Summary

Heap-based buffer overflow in the FileFind::FindFile method in (1) MFC42.dll, (2) MFC42u.dll, (3) MFC71.dll, and (4) MFC71u.dll in Microsoft Foundation Class (MFC) Library 8.0, as used by the ListFiles method in hpqutil.dll 2.0.0.138 in Hewlett-Packard (HP) All-in-One and Photo & Imaging Gallery 1.1 and probably other products, allows context-dependent attackers to cause a denial of service (crash) or possibly execute arbitrary code via a long first argument.

Vulnerable Configurations

Part Description Count
Application
Hp
1
Hardware
Hp
1

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Buffer Overflow via Environment Variables
    This attack pattern involves causing a buffer overflow through manipulation of environment variables. Once the attacker finds that they can modify an environment variable, they may try to overflow associated buffers. This attack leverages implicit trust often placed in environment variables.
  • Overflow Buffers
    Buffer Overflow attacks target improper or missing bounds checking on buffer operations, typically triggered by input injected by an attacker. As a consequence, an attacker is able to write past the boundaries of allocated buffer regions in memory, causing a program crash or potentially redirection of execution as per the attackers' choice.
  • Client-side Injection-induced Buffer Overflow
    This type of attack exploits a buffer overflow vulnerability in targeted client software through injection of malicious content from a custom-built hostile service.
  • Filter Failure through Buffer Overflow
    In this attack, the idea is to cause an active filter to fail by causing an oversized transaction. An attacker may try to feed overly long input strings to the program in an attempt to overwhelm the filter (by causing a buffer overflow) and hoping that the filter does not fail securely (i.e. the user input is let into the system unfiltered).
  • MIME Conversion
    An attacker exploits a weakness in the MIME conversion routine to cause a buffer overflow and gain control over the mail server machine. The MIME system is designed to allow various different information formats to be interpreted and sent via e-mail. Attack points exist when data are converted to MIME compatible format and back.

Exploit-Db

descriptionMicrosoft MFC Library CFileFind::FindFile Buffer Overflow Vulnerability. CVE-2007-4916. Dos exploit for windows platform
idEDB-ID:30593
last seen2016-02-03
modified2007-09-14
published2007-09-14
reporterJonathan Sarba
sourcehttps://www.exploit-db.com/download/30593/
titleMicrosoft MFC Library CFileFind::FindFile Buffer Overflow Vulnerability

Seebug

bulletinFamilyexploit
descriptionBUGTRAQ ID: 25697 CVE(CAN) ID: CVE-2007-4916 Microsoft Windows是微软发布的非常流行的操作系统。 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 &lt;&lt; 320 bytes .text:73D6CD50 call @operator new(uint) &lt;&lt; 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 ; &quot;*.*&quot; &lt;&lt; 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) &lt;&lt; [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 &lt;&lt; 592 bytes .text:5F817C0B call @operator new(uint) &lt;&lt; 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_ ; &quot;*.*&quot; &lt;&lt; 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) &lt;&lt; [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]处函数的第一个参数的内容。如果用户提交了超长参数的话就可以触发堆溢出,导致执行任意指令。 Microsoft Windows XP SP2 Microsoft --------- 目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本: <a href=http://www.microsoft.com/technet/security/ target=_blank>http://www.microsoft.com/technet/security/</a>
idSSV:2642
last seen2017-11-19
modified2007-12-20
published2007-12-20
reporterRoot
titleMicrosoft MFC库CFileFind::FindFile堆溢出漏洞