bugThe FreeType Project - Bugs: bug #37907, Out-of-bounds write in...

 
 

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

bug #37907: Out-of-bounds write in _bdf_parse_glyphs

Submitter:  Mateusz Jurczyk <j00ru>
Submitted:  Wed 12 Dec 2012 10:09:33 AM UTC
   
 
Severity:  3 - Normal Item Group:  Crash
Status:  Fixed Privacy:  Public
Assigned to:  wl Open/Closed:  Closed
Planned Release:  2.4.11

Sat 15 Dec 2012 08:41:07 AM UTC, comment #1: 

Fixed in git, thanks!

Werner LEMBERG <wl>
Group administrator
Wed 12 Dec 2012 10:09:33 AM UTC, original submission:  

Crash tested with ftbench (freetype2 and ft2demos git upstream), compiled under Ubuntu amd64 with AddressSanitizer (http://code.google.com/p/address-sanitizer/).

Log from ASAN build:

=================================================================
==29370== ERROR: AddressSanitizer: heap-buffer-overflow on address 0x7fe544cb0018 at pc 0x769454 bp 0x7fff60930cd0 sp 0x7fff60930cc8
WRITE of size 2 at 0x7fe544cb0018 thread T0
    #0 0x769453 in _bdf_parse_glyphs freetype2/src/bdf/bdflib.c:1793
    #1 0x74e01a in _bdf_readstream freetype2/src/bdf/bdflib.c:773
    #2 0x744090 in bdf_load_font freetype2/src/bdf/bdflib.c:2379
    #3 0x737a52 in BDF_Face_Init freetype2/src/bdf/bdfdrivr.c:367
    #4 0x44e085 in open_face freetype2/src/base/ftobjs.c:1154
    #5 0x449dc1 in FT_Open_Face freetype2/src/base/ftobjs.c:2082
    #6 0x44806f in FT_New_Face freetype2/src/base/ftobjs.c:1216
    #7 0x416756 in get_face ft2demos-2.4.10/src/ftbench.c:624
    #8 0x418a72 in main ft2demos-2.4.10/src/ftbench.c:752
    #9 0x7fe544d53c4c in __libc_start_main /build/buildd/eglibc-2.11.1/csu/libc-start.c:226
0x7fe544cb0018 is located 40 bytes to the left of 1120-byte region [0x7fe544cb0040,0x7fe544cb04a0)
allocated by thread T0 here:
    #0 0x9f5640 in __interceptor_malloc ??:0
    #1 0x9df859 in ft_alloc freetype2/builds/unix/ftsystem.c:102
    #2 0x4a6674 in ft_mem_qalloc freetype2/src/base/ftutil.c:76
    #3 0x431f3a in ft_mem_alloc freetype2/src/base/ftutil.c:55
    #4 0x4b52b5 in ft_mem_qrealloc freetype2/src/base/ftutil.c:145
    #5 0x434279 in ft_mem_realloc freetype2/src/base/ftutil.c:101
    #6 0x7644e9 in _bdf_parse_glyphs freetype2/src/bdf/bdflib.c:1529
    #7 0x74e01a in _bdf_readstream freetype2/src/bdf/bdflib.c:773
    #8 0x744090 in bdf_load_font freetype2/src/bdf/bdflib.c:2379
    #9 0x737a52 in BDF_Face_Init freetype2/src/bdf/bdfdrivr.c:367
Shadow byte and word:
  0x1ffca8996003: fa
  0x1ffca8996000: fa fa fa fa fa fa fa fa
More shadow bytes:
  0x1ffca8995fe0: 00 00 00 00 00 00 00 00
  0x1ffca8995fe8: 00 00 00 00 00 00 00 00
  0x1ffca8995ff0: 00 00 00 00 00 00 00 00
  0x1ffca8995ff8: 00 fb fb fb fb fb fb fb
=>0x1ffca8996000: fa fa fa fa fa fa fa fa
  0x1ffca8996008: 00 00 00 00 00 00 00 00
  0x1ffca8996010: 00 00 00 00 00 00 00 00
  0x1ffca8996018: 00 00 00 00 00 00 00 00
  0x1ffca8996020: 00 00 00 00 00 00 00 00
Stats: 0M malloced (0M for red zones) by 166 calls
Stats: 0M realloced by 1 calls
Stats: 0M freed by 22 calls
Stats: 0M really freed by 0 calls
Stats: 5M (1413 full pages) mmaped in 10 calls
  mmaps   by size class: 7:4095; 8:2047; 9:1023; 10:511; 11:255; 12:128; 13:64; 15:16; 19:1; 20:1;
  mallocs by size class: 7:116; 8:25; 9:7; 10:5; 11:8; 12:1; 13:1; 15:1; 19:1; 20:1;
  frees   by size class: 7:3; 8:8; 9:2; 10:5; 11:3; 13:1;
  rfrees  by size class:
Stats: malloc large: 3 small slow: 7
==29370== 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 #27080:  sym8.bdf.asan.39.2321 added by j00ru (2KiB - 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 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-12-15 wl StatusNone Fixed
        PrivacyPrivate Public
        Assigned toNone wl
        Open/ClosedOpen Closed
        Planned ReleaseNone 2.4.11
    2012-12-12 j00ru Attached File- Added sym8.bdf.asan.39.2321, #27080

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code