bugThe FreeType Project - Bugs: bug #45966, leaks in parse_encoding,...

 
 

bug #45966: leaks in parse_encoding, parse_blend_design_map, t42_parse_encoding

Submitted by:  Kostya Serebryany <kcc>
Submitted on:  Mon 14 Sep 2015 09:35:44 PM UTC  
 
Severity: 3 - NormalItem Group: None
Status: FixedPrivacy: Public
Assigned to: Werner LEMBERG <wl>Open/Closed: Closed
Planned Release: 2.6.1

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Tue 15 Sep 2015 06:53:07 AM UTC, comment #1:

Fixed in git, thanks.

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Mon 14 Sep 2015 09:35:44 PM UTC, original submission:

found on fresh git with libFuzzer+AddressSanitizer

Feed the attached files into FT_New_Memory_Face
and you will see a memory leak (can see it with valgrind too).
3 files for 3 different leaks attached.

==12046==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 2048 byte(s) in 1 object(s) allocated from:
#0 0x4abe6b in malloc /usr/local/google/home/kcc/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:40:3
#1 0x4f9a6f in ft_mem_qalloc src/base/ftutil.c:76:15
#2 0x4f9a6f in ft_mem_alloc src/base/ftutil.c:55
#3 0x4f9a6f in ft_mem_qrealloc src/base/ftutil.c:146
#4 0x639a7a in ps_table_new src/psaux/psobjs.c:77:10
#5 0x541642 in parse_encoding src/type1/t1load.c:1203:12
#6 0x53fa5e in t1_load_keyword src/type1/t1load.c:932:7
#7 0x53fa5e in parse_dict src/type1/t1load.c:2005
#8 0x530fd9 in T1_Open_Face src/type1/t1load.c:2113:13
#9 0x530fd9 in T1_Face_Init src/type1/t1objs.c:339
#10 0x4e152a in open_face src/base/ftobjs.c:1166:15

Direct leak of 64 byte(s) in 2 object(s) allocated from:
#0 0x4abe6b in malloc /usr/local/google/home/kcc/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:40:3
#1 0x4f9a6f in ft_mem_qalloc src/base/ftutil.c:76:15
#2 0x4f9a6f in ft_mem_alloc src/base/ftutil.c:55
#3 0x4f9a6f in ft_mem_qrealloc src/base/ftutil.c:146
#4 0x545d2b in parse_blend_design_map src/type1/t1load.c:791:12
#5 0x53fa5e in t1_load_keyword src/type1/t1load.c:932:7
#6 0x53fa5e in parse_dict src/type1/t1load.c:2005
#7 0x530fd9 in T1_Open_Face src/type1/t1load.c:2113:13
#8 0x530fd9 in T1_Face_Init src/type1/t1objs.c:339
#9 0x4e152a in open_face src/base/ftobjs.c:1166:15

Direct leak of 2048 byte(s) in 1 object(s) allocated from:
#0 0x4abe6b in malloc /usr/local/google/home/kcc/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:40:3
#1 0x4f9a6f in ft_mem_qalloc src/base/ftutil.c:76:15
#2 0x4f9a6f in ft_mem_alloc src/base/ftutil.c:55
#3 0x4f9a6f in ft_mem_qrealloc src/base/ftutil.c:146
#4 0x596f59 in t42_parse_encoding src/type42/t42parse.c:342:12
#5 0x593030 in t42_load_keyword src/type42/t42parse.c:1030:7
#6 0x593030 in t42_parse_dict src/type42/t42parse.c:1177
#7 0x593030 in T42_Open_Face src/type42/t42objs.c:63
#8 0x593030 in T42_Face_Init src/type42/t42objs.c:202
#9 0x4e152a in open_face src/base/ftobjs.c:1166:15

These are probably 3 unrelated bugs...

Kostya Serebryany <kcc>
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 #34883:  025d83ef1ce0d30e171585c076a5989ac8b76a15 added by kcc (8KiB - application/octet-stream)
file #34884:  008f9147dff88a130c4a2267ce8b57164319660c added by kcc (17KiB - application/octet-stream)
file #34885:  003a7c0bad433dd97b8a5ba1fcc0ced30d729530 added by kcc (951B - 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)
  • -unavailable- added by kcc (Submitted the item)
  • -unavailable- added by kcc
  •  

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

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 15 Sep 2015 06:53:07 AM UTCwlStatusNone=>Fixed
      Assigned toNone=>wl
      Open/ClosedOpen=>Closed
      Planned ReleaseNone=>2.6.1
    Mon 14 Sep 2015 09:35:44 PM UTCkccAttached File-=>Added 025d83ef1ce0d30e171585c076a5989ac8b76a15, #34883
      Attached File-=>Added 008f9147dff88a130c4a2267ce8b57164319660c, #34884
      Attached File-=>Added 003a7c0bad433dd97b8a5ba1fcc0ced30d729530, #34885
      Carbon-Copy-=>Added j00ru

    Back to the top


    Powered by Savane 3.1-cleanup1