Skip Navigation

  • Home
  • Contact us
  • FAQ
  • Glossary
  • Public key
  • Sitemap
  • Cymraeg
  • What's new
CPNI - Centre for the Protection of National Infastructure

Advanced search

  • About CPNI
  • The threats
  • Security planning
  • Methods of attack
  • Protecting your assets
  • Products and services
    • CSIRTUK advisories
      • Advisories archive
    • General protective security publications
    • InfoSec briefings
    • InfoSec technical notes
    • InfoSec vulnerability disclosures
    • Good practice guidelines
    • Viewpoints
    • Information exchanges
    • Risk Management Delivery Group
  • Research
Home > Products and services > CSIRTUK advisories > Advisories archive > September 2007 > 3399 - Microsoft MFC FindFile function heap buffer overflow

September 2007

3399 - Microsoft MFC FindFile function heap buffer overflow

ID: 3399
Date: 21 September 2007 12:49

Title: 3399 - Microsoft MFC FindFile function heap buffer overflow
Abstract: A buffer overflow vulnerability in the Microsoft Foundation Class (MFC) Library could allow an attacker to execute arbitrary code on an affected system.
Applications affected:Microsoft Visual Studio, Microsoft Windows, Hewlett-Packard All-in-One and Hewlett-Packard Photo and Imaging Gallery
Source: US-CERT
Reliability of source: Trusted
Source URL: http://www.kb.cert.org/vuls/id/611008
CVE: CVE-2007-4916

US-CERT Vulnerability Note VU#611008
Microsoft MFC FindFile function heap buffer overflow

Overview

 A buffer overflow vulnerability in the Microsoft Foundation Class
 (MFC) Library could allow an attacker to execute arbitrary code on
 an affected system.

I. Description

 The Microsoft Foundation Class (MFC) Library is a Microsoft library
 that wraps parts of the Windows API in C++ classes. The MFC libraries
 contain a function called FindFile(). The FindFile() function manages
 file searches across a filesystem, enabling users to specify the type
 of file to search.

 MFC is included in Microsoft Visual Studio and Microsoft Windows. MFC
 is also used in Hewlett-Packard All-in-One and in Hewlett-Packard
 Photo and Imaging Gallery. Note, however, that the use of MFC library
 is not necessarily limited to these applications; other applications
 may also be using the vulnerable libraries. Additionally, the list
 of vendors under the "Systems Affected" section of this vulnerability
 may not be an exhaustive list.

 The MFC42 and MFC71 libraries contain a heap-based buffer overflow
 vulnerability in the FindFile() function's argument handling. This
 vulnerability could allow an attacker to execute arbitrary code or
 cause a denial of service.

II. Impact

 An attacker may be able to execute arbitrary code in the context of
 an application that uses the vulnerable function. The scope of the
 impact depends on how the affected application works. Applications
 that process filename input from the network, such as some web
 applications, would be vulnerable to a remote attacker. Applications
 that only process filename input from a local user would only be
 vulnerable to a local attacker.


 Note that applications may be linking to the MFC library dynamically
 or statically. It will be necessary to recompile any applications
 that are statically linked to the MFC library.

III. Solution

 We are currently unaware of a practical solution to this problem.

 Note, however, that the MFC libraries can be used by multiple
 applications on most systems. Once a solution is made available by
 the vendor, it may be necessary for application users (system
 administrators, developers) to upgrade or apply multiple patches and
 then recompile statically linked applications.

 Applications that are statically linked must be recompiled using
 patched libraries. Applications that are dynamically linked do not
 need to be recompiled; however, running services need to be restarted
 in order to use the patched libraries.

 System administrators should consider the following process when
 addressing this issue:

    1. Patch or obtain updated MFC libraries.
    2. Restart any dynamically linked services that make use of the
       MFC libraries.
    3. Recompile any statically linked applications using the patched
       or updated MFC libraries.

 Note this is an iterative process for each set of patches being applied.

Systems Affected

 Vendor                   Status      Date Updated
 Hewlett-Packard Company  Vulnerable  19-Sep-2007
 Microsoft Corporation    Vulnerable  19-Sep-2007

References

 http://goodfellas.shellcode.com.ar/own/VULWKU200706142
 http://secunia.com/advisories/26800/

Credit

 This vulnerability was reported by Jonathan Sarba of GoodFellas
 Security Research Team.

 This document was written by Joseph Pruszynski.

Other Information

 Date Public 09/14/2007
 Date First Published 09/20/2007 08:17:28 AM
 Date Last Updated 09/20/2007
 CERT Advisory 
 CVE Name CVE-2007-4916
 Metric 12.93
 Document Revision 31

This advisory contains information released by the original author. Some of the information may have changed since it was released. If the issue affects you, it may be prudent to retrieve the advisory from the site of the original source to ensure that you receive the most current information concerning that problem. Reference to any specific commercial product, process, or service by trade name, trademark manufacturer, or otherwise, does not constitute or imply its endorsement, recommendation, or favouring by CPNI.

The views and opinions of authors expressed within this notice shall not be used for advertising or product endorsement purposes. CPNI shall not accept responsibility for any errors or omissions contained within this advisory. In particular, they shall not be liable for any loss or damage whatsoever, arising from or in connection with the usage of information contained within this advisory.

CSIRTUK is a member of the Forum of Incident Response and Security Teams (FIRST) and has contacts with other international Incident Response Teams (IRTs) in order to foster cooperation and coordination in incident prevention, to prompt rapid reaction to incidents, and to promote information sharing amongst its members and the community at large.

  • Accessibility |
  • Terms and conditions |
  • Privacy statement |
  • Data protection act |
  • Freedom of information |