bugThe FreeType Project - Bugs: bug #41694, Out-of-bounds read in...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #41694: Out-of-bounds read in FNT_Load_Glyph

Submitter:  Mateusz Jurczyk <j00ru>
Submitted:  Tue 25 Feb 2014 07:25:29 PM UTC
   
 
Severity:  3 - Normal Item Group:  Crash
Status:  Fixed Privacy:  Public
Assigned to:  wl Open/Closed:  Closed
Planned Release:  2.5.3

Wed 26 Feb 2014 05:13:54 PM UTC, comment #1: 

Fixed in git.  Thanks for the report.

Werner LEMBERG <wl>
Group administrator
Tue 25 Feb 2014 07:25:29 PM UTC, original submission:  

Tested on Ubuntu AMD64 with upstream FreeType2 and FreeType2-demos using ./ftbench <file>:

=================================================================
==26347==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x619000001df3 at pc 0x793f0b bp 0x7fffd63892f0 sp 0x7fffd63892e8
READ of size 1 at 0x619000001df3 thread T0
    #0 0x793f0a in FNT_Load_Glyph freetype2/src/winfonts/winfnt.c:1000
    #1 0x4a28e2 in FT_Load_Glyph freetype2/src/base/ftobjs.c:726
    #2 0x492475 in test_load freetype2-demos/src/ftbench.c:249
    #3 0x4930e7 in benchmark freetype2-demos/src/ftbench.c:216
    #4 0x48f692 in main freetype2-demos/src/ftbench.c:1020

0x619000001df3 is located 111 bytes to the right of 1028-byte region [0x619000001980,0x619000001d84)
allocated by thread T0 here:
    #0 0x474821 in __interceptor_malloc llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:74
    #1 0xa6611f in ft_alloc freetype2/src/base/ftsystem.c:74
    #2 0x519409 in ft_mem_qalloc freetype2/src/base/ftutil.c:76
    #3 0x518121 in FT_Stream_EnterFrame freetype2/src/base/ftstream.c:267
    #4 0x517a05 in FT_Stream_ExtractFrame freetype2/src/base/ftstream.c:200
    #5 0x79ecde in fnt_font_load freetype2/src/winfonts/winfnt.c:262
    #6 0x79a3bd in fnt_face_get_dll_font freetype2/src/winfonts/winfnt.c:384
    #7 0x78efa5 in FNT_Face_Init freetype2/src/winfonts/winfnt.c:704
    #8 0x4c95ce in open_face freetype2/src/base/ftobjs.c:1191
    #9 0x4c57cd in FT_Open_Face freetype2/src/base/ftobjs.c:2123
    #10 0x4c3ca4 in FT_New_Face freetype2/src/base/ftobjs.c:1254
    #11 0x491d0f in get_face freetype2-demos/src/ftbench.c:705
    #12 0x48e6c4 in main freetype2-demos/src/ftbench.c:924

SUMMARY: AddressSanitizer: heap-buffer-overflow freetype2/src/winfonts/winfnt.c:1000 FNT_Load_Glyph
Shadow bytes around the buggy address:
  0x0c327fff8360: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c327fff8370: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c327fff8380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c327fff8390: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c327fff83a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c327fff83b0: 04 fa fa fa fa fa fa fa fa fa fa fa fa fa[fa]fa
  0x0c327fff83c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c327fff83d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c327fff83e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c327fff83f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c327fff8400: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Heap right redzone:      fb
  Freed heap region:       fd
  Stac==26347==ABORTING

Mateusz Jurczyk <j00ru>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #30697:  asan_heap-oob_7d1411_1217_9x18B-ISO8859-13.fon added by j00ru (9KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by wl (Posted a comment)
  • -email is unavailable- added by j00ru (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-02-26 wl StatusNone Fixed
        PrivacyPrivate Public
        Assigned toNone wl
        Open/ClosedOpen Closed
        Planned ReleaseNone 2.5.3
    2014-02-25 j00ru Attached File- Added asan_heap-oob_7d18dd_2599_cov_268812378_aesymatt.otf.dfont, #30696
        Attached File- Added asan_heap-oob_7d1411_1217_9x18B-ISO8859-13.fon, #30697

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code