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

 
 

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

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

Submitter:  Mateusz Jurczyk <j00ru>
Submitted:  Fri 14 Dec 2012 09:10:17 AM UTC
   
 
Severity:  3 - Normal Item Group:  Crash
Status:  Works For Me Privacy:  Public
Assigned to:  wl Open/Closed:  Closed
Planned Release:  2.4.11

Sat 12 Jan 2013 07:47:54 AM UTC, comment #2: 

Closing this now.  Please reopen in case of problems.

Werner LEMBERG <wl>
Group administrator
Sat 15 Dec 2012 08:48:12 AM UTC, comment #1: 

Can't reproduce any more so I think that my last patches have caught this.  Please test.

Werner LEMBERG <wl>
Group administrator
Fri 14 Dec 2012 09:10:17 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/).

NOTE: This one is very similar to bug #37907 but with a slightly different stack-trace, so I am submitting it just in case.

Log from ASAN build:

=================================================================
==7932== ERROR: AddressSanitizer: heap-buffer-overflow on address 0x7f1faf77c01a at pc 0x7f1fb089cfa4 bp 0x7fff321cdbd0 sp 0x7fff321cdbc8
WRITE of size 2 at 0x7f1faf77c01a thread T0
    #0 0x7f1fb089cfa3 in _bdf_parse_glyphs freetype2/src/bdf/bdflib.c:1809
    #1 0x7f1fb08816f9 in _bdf_readstream freetype2/src/bdf/bdflib.c:773
    #2 0x7f1fb087777d in bdf_load_font freetype2/src/bdf/bdflib.c:2379
    #3 0x7f1fb086b121 in BDF_Face_Init freetype2/src/bdf/bdfdrivr.c:367
    #4 0x7f1fb0520924 in open_face freetype2/src/base/ftobjs.c:1154
    #5 0x7f1fb051c660 in FT_Open_Face freetype2/src/base/ftobjs.c:2082
    #6 0x7f1fb051a90e in FT_New_Face freetype2/src/base/ftobjs.c:1216
    #7 0x4125b6 in get_face ft2demos-2.4.10/src/ftbench.c:624
    #8 0x4148d2 in main ft2demos-2.4.10/src/ftbench.c:752
    #9 0x7f1faf921c4c in __libc_start_main /build/buildd/eglibc-2.11.1/csu/libc-start.c:226
0x7f1faf77c01a is located 38 bytes to the left of 7168-byte region [0x7f1faf77c040,0x7f1faf77dc40)
allocated by thread T0 here:
    #0 0x41e440 in __interceptor_malloc ??:0
    #1 0x7f1fb04efae8 in ft_alloc freetype2/builds/unix/ftsystem.c:102
    #2 0x7f1fb0578f03 in ft_mem_qalloc freetype2/src/base/ftutil.c:76
    #3 0x7f1fb0504809 in ft_mem_alloc freetype2/src/base/ftutil.c:55
    #4 0x7f1fb0587b74 in ft_mem_qrealloc freetype2/src/base/ftutil.c:145
    #5 0x7f1fb0506b38 in ft_mem_realloc freetype2/src/base/ftutil.c:101
    #6 0x7f1fb0897bcb in _bdf_parse_glyphs freetype2/src/bdf/bdflib.c:1529
    #7 0x7f1fb08816f9 in _bdf_readstream freetype2/src/bdf/bdflib.c:773
    #8 0x7f1fb087777d in bdf_load_font freetype2/src/bdf/bdflib.c:2379
Shadow byte and word:
  0x1fe3f5eef803: fa
  0x1fe3f5eef800: fa fa fa fa fa fa fa fa
More shadow bytes:
  0x1fe3f5eef7e0: fa fa fa fa fa fa fa fa
  0x1fe3f5eef7e8: fa fa fa fa fa fa fa fa
  0x1fe3f5eef7f0: fa fa fa fa fa fa fa fa
  0x1fe3f5eef7f8: fa fa fa fa fa fa fa fa
=>0x1fe3f5eef800: fa fa fa fa fa fa fa fa
  0x1fe3f5eef808: 00 00 00 00 00 00 00 00
  0x1fe3f5eef810: 00 00 00 00 00 00 00 00
  0x1fe3f5eef818: 00 00 00 00 00 00 00 00
  0x1fe3f5eef820: 00 00 00 00 00 00 00 00
Stats: 0M malloced (0M for red zones) by 334 calls
Stats: 0M realloced by 20 calls
Stats: 0M freed by 41 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:264; 8:27; 9:8; 10:10; 11:11; 12:9; 13:2; 15:1; 19:1; 20:1;
  frees   by size class: 7:3; 8:10; 9:4; 10:9; 11:7; 12:7; 13:1;
  rfrees  by size class:
Stats: malloc large: 3 small slow: 9
==7932== 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 #27093:  clB8x14-14.bdf.asan.26.940 added by j00ru (14KiB - 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
    2020-08-22 wl PrivacyPrivate Public
    2013-01-12 wl Open/ClosedOpen Closed
        Planned ReleaseNone 2.4.11
    2012-12-15 wl StatusNone Works For Me
        Assigned toNone wl
    2012-12-14 j00ru Attached File- Added clB8x14-14.bdf.asan.26.940, #27093

    Back to the top

    Powered by Savane 3.14-d582.
    Corresponding source code