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

 
 

bug #37906: Out-of-bounds read in _bdf_parse_glyphs

Submitted by:  Mateusz Jurczyk <j00ru>
Submitted on:  Wed 12 Dec 2012 10:06:17 AM UTC  
 
Severity: 3 - NormalItem Group: Crash
Status: FixedPrivacy: Public
Assigned to: Werner LEMBERG <wl>Open/Closed: Closed
Planned Release: 2.4.11

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 15 Dec 2012 01:03:20 AM UTC, comment #1:

Fixed in git, thanks!

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Wed 12 Dec 2012 10:06: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/).

Log from ASAN build:

=================================================================
==28667== ERROR: AddressSanitizer: heap-buffer-overflow on address 0x7fc84ff656b0 at pc 0x765f8b bp 0x7fffc7effd90 sp 0x7fffc7effd88
READ of size 8 at 0x7fc84ff656b0 thread T0
#0 0x765f8a in _bdf_parse_glyphs freetype2/src/bdf/bdflib.c:1644
#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 0x7fc85019dc4c in __libc_start_main /build/buildd/eglibc-2.11.1/csu/libc-start.c:226
0x7fc84ff656b0 is located 148992 bytes to the right of 278640-byte region [0x7fc84fefd040,0x7fc84ff410b0)
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 0x743c7a in bdf_load_font freetype2/src/bdf/bdflib.c:2369
#5 0x737a52 in BDF_Face_Init freetype2/src/bdf/bdfdrivr.c:367
#6 0x44e085 in open_face freetype2/src/base/ftobjs.c:1154
#7 0x449dc1 in FT_Open_Face freetype2/src/base/ftobjs.c:2082
#8 0x44806f in FT_New_Face freetype2/src/base/ftobjs.c:1216
#9 0x416756 in get_face ft2demos-2.4.10/src/ftbench.c:624
Shadow byte and word:
0x1ff909fecad6: fa
0x1ff909fecad0: fa fa fa fa fa fa fa fa
More shadow bytes:
0x1ff909fecab0: fa fa fa fa fa fa fa fa
0x1ff909fecab8: fa fa fa fa fa fa fa fa
0x1ff909fecac0: fa fa fa fa fa fa fa fa
0x1ff909fecac8: fa fa fa fa fa fa fa fa
=>0x1ff909fecad0: fa fa fa fa fa fa fa fa
0x1ff909fecad8: fa fa fa fa fa fa fa fa
0x1ff909fecae0: fa fa fa fa fa fa fa fa
0x1ff909fecae8: fa fa fa fa fa fa fa fa
0x1ff909fecaf0: fa fa fa fa fa fa fa fa
Stats: 0M malloced (0M for red zones) by 551 calls
Stats: 0M realloced by 3 calls
Stats: 0M freed by 24 calls
Stats: 0M really freed by 0 calls
Stats: 6M (1542 full pages) mmaped in 11 calls
mmaps by size class: 7:4095; 8:2047; 9:1023; 10:511; 11:255; 12:128; 13:64; 14:32; 15:16; 19:1; 20:1;
mallocs by size class: 7:500; 8:26; 9:6; 10:6; 11:7; 12:1; 13:1; 14:1; 15:1; 19:1; 20:1;
frees by size class: 7:3; 8:10; 9:2; 10:5; 11:3; 13:1;
rfrees by size class:
Stats: malloc large: 3 small slow: 9
==28667== ABORTING

Mateusz Jurczyk <j00ru>
Project Member

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #27079:  zevv-peep-iso8859-15-07x14.bdf.asan.70.2494 added by j00ru (37KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by wl (Updated the item)
  • -unavailable- added by j00ru (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 15 Dec 2012 01:02:54 AM UTCwlStatusNone=>Fixed
      PrivacyPrivate=>Public
      Assigned toNone=>wl
      Open/ClosedOpen=>Closed
      Planned ReleaseNone=>2.4.11
    Wed 12 Dec 2012 10:06:17 AM UTCj00ruAttached File-=>Added zevv-peep-iso8859-15-07x14.bdf.asan.70.2494, #27079

    Back to the top


    Powered by Savane 3.1-cleanup1