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

 
 

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

bug #45966: leaks in parse_encoding, parse_blend_design_map, t42_parse_encoding

Submitter:  Kostya Serebryany <kcc>
Submitted:  Mon 14 Sep 2015 09:35:44 PM UTC
   
 
Severity:  3 - Normal Item Group:  None
Status:  Fixed Privacy:  Public
Assigned to:  wl Open/Closed:  Closed
Planned Release:  2.6.1

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

Fixed in git, thanks.

Werner LEMBERG <wl>
Group administrator
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>
Group Member

 

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

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
  • -email is unavailable- added by wl (Posted a comment)
  • -email is unavailable- added by kcc (Submitted the item)
  • -email is unavailable- added by kcc
  •  

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

    Date Changed by Updated Field Previous Value => Replaced by
    2015-09-15 wl StatusNone Fixed
        Assigned toNone wl
        Open/ClosedOpen Closed
        Planned ReleaseNone 2.6.1
    2015-09-14 kcc Attached 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.13-4b48.
    Corresponding source code