search menu icon-carat-right cmu-wordmark

CERT Coordination Center

Microsoft MFC FindFile function heap buffer overflow

Vulnerability Note VU#611008

Original Release Date: 2007-09-20 | Last Revised: 2007-09-21

Overview

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

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 by other many other Windows applications such as 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.

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.

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.

    Vendor Information

    611008
     

    Hewlett-Packard Company Affected

    Updated:  September 19, 2007

    Status

    Affected

    Vendor Statement

    We have not received a statement from the vendor.

    Vendor Information

    The vendor has not provided us with any further information regarding this vulnerability.

    Microsoft Corporation Affected

    Updated:  September 19, 2007

    Status

    Affected

    Vendor Statement

    We have not received a statement from the vendor.

    Vendor Information

    The vendor has not provided us with any further information regarding this vulnerability.


    CVSS Metrics

    Group Score Vector
    Base
    Temporal
    Environmental

    References

    Acknowledgements

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

    This document was written by Joseph Pruszynski.

    Other Information

    CVE IDs: CVE-2007-4916
    Severity Metric: 12.93
    Date Public: 2007-09-14
    Date First Published: 2007-09-20
    Date Last Updated: 2007-09-21 15:09 UTC
    Document Revision: 33

    Sponsored by CISA.