bugThe FreeType Project - Bugs: bug #38589, Overlapping memory regions in...

 
 

bug #38589: Overlapping memory regions in calls to memcpy()

Submitted by:  None
Submitted on:  Mon 25 Mar 2013 02:22:14 PM UTC  
 
Severity: 3 - NormalItem Group: Crash
Status: FixedPrivacy: Public
Assigned to: Werner LEMBERG <wl>Open/Closed: Closed
Planned Release: 2.4.12

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Wed 03 Apr 2013 05:39:10 AM UTC, comment #1:

Fixed, thanks.

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Mon 25 Mar 2013 02:22:14 PM UTC, original submission:

There's an overlapping memory bug in latest upstream FreeType2, reproducible on a 64-bit Ubuntu system, the ftbench utility built with AddressSanitizer (https://code.google.com/p/address-sanitizer/wiki/AddressSanitizer) and the two attached malformed font files.

AddressSanitizer report:

--- cut ---
=================================================================
==30611== ERROR: AddressSanitizer: memcpy-param-overlap: memory ranges [0x7f3ef9692840,0x7f3ef9692b8c) and [0x7f3ef96928f4, 0x7f3ef9692c40) overlap
#0 0x9e6076 in memcpy ??:0
#1 0x74972f in _bdf_readstream freetype2/src/bdf/bdflib.c:757
#2 0x73fe90 in bdf_load_font freetype2/src/bdf/bdflib.c:2387
#3 0x733852 in BDF_Face_Init freetype2/src/bdf/bdfdrivr.c:367
#4 0x44d375 in open_face freetype2/src/base/ftobjs.c:1154
#5 0x4490c1 in FT_Open_Face freetype2/src/base/ftobjs.c:2082
#6 0x44736f in FT_New_Face freetype2/src/base/ftobjs.c:1216
#7 0x414e46 in get_face ft2demos-2.4.10/src/ftbench.c:624
#8 0x417162 in main ft2demos-2.4.10/src/ftbench.c:752
#9 0x7f3ef973a76c in __libc_start_main /build/buildd/eglibc-2.15/csu/libc-start.c:226
0x7f3ef9692840 is located 0 bytes inside of 1024-byte region [0x7f3ef9692840,0x7f3ef9692c40)
allocated by thread T0 here:
#0 0x9e9680 in malloc ??:0
#1 0x9d38a9 in ft_alloc freetype2/builds/unix/ftsystem.c:102
#2 0x4a3eb4 in ft_mem_qalloc freetype2/src/base/ftutil.c:76
#3 0x43125a in ft_mem_alloc freetype2/src/base/ftutil.c:55
#4 0x4b2685 in ft_mem_qrealloc freetype2/src/base/ftutil.c:146
#5 0x433599 in ft_mem_realloc freetype2/src/base/ftutil.c:102
#6 0x748247 in _bdf_readstream freetype2/src/bdf/bdflib.c:685
#7 0x73fe90 in bdf_load_font freetype2/src/bdf/bdflib.c:2387
#8 0x733852 in BDF_Face_Init freetype2/src/bdf/bdfdrivr.c:367
#9 0x44d375 in open_face freetype2/src/base/ftobjs.c:1154
0x7f3ef96928f4 is located 180 bytes inside of 1024-byte region [0x7f3ef9692840,0x7f3ef9692c40)
allocated by thread T0 here:
#0 0x9e9680 in malloc ??:0
#1 0x9d38a9 in ft_alloc freetype2/builds/unix/ftsystem.c:102
#2 0x4a3eb4 in ft_mem_qalloc freetype2/src/base/ftutil.c:76
#3 0x43125a in ft_mem_alloc freetype2/src/base/ftutil.c:55
#4 0x4b2685 in ft_mem_qrealloc freetype2/src/base/ftutil.c:146
#5 0x433599 in ft_mem_realloc freetype2/src/base/ftutil.c:102
#6 0x748247 in _bdf_readstream freetype2/src/bdf/bdflib.c:685
#7 0x73fe90 in bdf_load_font freetype2/src/bdf/bdflib.c:2387
#8 0x733852 in BDF_Face_Init freetype2/src/bdf/bdfdrivr.c:367
#9 0x44d375 in open_face freetype2/src/base/ftobjs.c:1154
Stats: 0M malloced (0M for red zones) by 579 calls
Stats: 0M realloced by 6 calls
Stats: 0M freed by 27 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:523; 8:28; 9:6; 10:9; 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:8; 11:3; 13:1;
rfrees by size class:
Stats: malloc large: 3 small slow: 10
==30611== ABORTING
--- cut ---

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #27676:  01-devnag18.asan.0.1.bdf added by None (32KiB - application/octet-stream)
file #27677:  10043.10020.asan.0.5.woff added by None (44KiB - 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 (Posted a comment)
  •  

    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 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 03 Apr 2013 05:39:10 AM UTCwlStatusNone=>Fixed
      PrivacyPrivate=>Public
      Assigned toNone=>wl
      Open/ClosedOpen=>Closed
      Planned ReleaseNone=>2.4.12
    Mon 25 Mar 2013 02:22:14 PM UTCNoneAttached File-=>Added 01-devnag18.asan.0.1.bdf, #27676
      Attached File-=>Added 10043.10020.asan.0.5.woff, #27677

    Back to the top


    Powered by Savane 3.1-cleanup1