Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 133158 - Buffer overflows in <=freetype-2.2.0
Summary: Buffer overflows in <=freetype-2.2.0
Status: RESOLVED DUPLICATE of bug 124828
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Security
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-12 18:17 UTC by Donnie Berkholz (RETIRED)
Modified: 2006-05-13 11:01 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Donnie Berkholz (RETIRED) gentoo-dev 2006-05-12 18:17:00 UTC
Here's part of the relevant ChangeLog message from freetype 2.2.1:

2006-05-02  David Turner  <david@freetype.org>

    Update the memory management functions and macros to safely deal
    with array size buffer overflows.  This corresponds to attemps to
    allocate arrays that are too large.  For an example, consider the
    following code:

      count = read_uint32_from_file(); array = malloc( sizeof ( Item ) *
      count ); for ( nn = 0; nn < count; nn++ )
        array[nn] = read_item_from_file();

    If `count' is larger than `FT_UINT_MAX/sizeof(Item)', the
    multiplication overflows, and the array allocated os smaller than
    the data read from the file.  In this case, the heap will be
    trashed, and this can be used as a denial-of-service attack, or make
    the engine crash later.

    The FT_ARRAY_NEW and FT_ARRAY_RENEW macros now ensure that the new
    count is no larger than `FT_INT_MAX/item_size', otherwise a new
    error code `FT_Err_Array_Too_Large' will be returned.

    Note that the memory debugger now works again when FT_DEBUG_MEMORY
    is defined.  FT_STRICT_ALIASING has disappeared; the corresponding
    code is now the default.
Comment 1 Thierry Carrez (RETIRED) gentoo-dev 2006-05-13 11:01:12 UTC
foser was working on it, prework now public

*** This bug has been marked as a duplicate of 124828 ***