bugThe FreeType Project - Bugs: bug #50745, global-buffer-overflow in...

 
 

bug #50745: global-buffer-overflow in f_face_globals_compute_style_coverage()

Submitted by:  Tyson Smith <twsmith>
Submitted on:  Fri 07 Apr 2017 10:44:24 AM UTC  
 
Severity: 3 - NormalItem Group: Incorrect behaviour
Status: FixedPrivacy: Public
Assigned to: Werner LEMBERG <wl>Open/Closed: Closed
Planned Release: 2.8

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Fri 07 Apr 2017 03:25:40 PM UTC, comment #1:

Fixed in git; thanks for the report!

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Fri 07 Apr 2017 10:44:24 AM UTC, original submission:

Found in FreeType git revision 2c256e6dac16c1
Build with clang 4.0

==13905==ERROR: AddressSanitizer: global-buffer-overflow on address 0x00000073b788 at pc 0x00000069734b bp 0x7ffe864879b0 sp 0x7ffe864879a8
READ of size 4 at 0x00000073b788 thread T0
#0 0x69734a in af_face_globals_compute_style_coverage src/autofit/afglobal.c:214:22
#1 0x69734a in af_face_globals_new src/autofit/afglobal.c:371
#2 0x67788b in af_loader_reset src/autofit/afloader.c:56:15
#3 0x67788b in af_loader_load_glyph src/autofit/afloader.c:262
#4 0x67788b in af_autofitter_load_glyph src/autofit/afmodule.c:561
#5 0x5141b0 in FT_Load_Glyph src/base/ftobjs.c:749:19
#6 0x510b86 in LLVMFuzzerTestOneInput src/tools/ftfuzzer/ftfuzzer.cc:192:18
#7 0x5111bd in main src/tools/ftfuzzer/ftfuzzer.cc:241:9
#8 0x7f314a5e982f in __libc_start_main /build/glibc-9tT8Do/glibc-2.23/csu/../csu/libc-start.c:291
#9 0x419fb8 in _start (ftfuzzer+0x419fb8)

0x00000073b788 is located 56 bytes to the left of global variable 'af_grek_uniranges' defined in 'src/autofit/afranges.c:262:32' (0x73b7c0) of size 24
0x00000073b788 is located 0 bytes to the right of global variable 'af_glag_nonbase_uniranges' defined in 'src/autofit/afranges.c:256:32' (0x73b780) of size 8
SUMMARY: AddressSanitizer: global-buffer-overflow src/autofit/afglobal.c:214:22 in af_face_globals_compute_style_coverage
Shadow bytes around the buggy address:
0x0000800df6a0: 00 00 00 f9 f9 f9 f9 f9 00 00 00 00 00 00 00 00
0x0000800df6b0: f9 f9 f9 f9 00 00 00 00 00 f9 f9 f9 f9 f9 f9 f9
0x0000800df6c0: 00 00 f9 f9 f9 f9 f9 f9 00 00 f9 f9 f9 f9 f9 f9
0x0000800df6d0: 00 f9 f9 f9 f9 f9 f9 f9 00 00 00 f9 f9 f9 f9 f9
0x0000800df6e0: 00 f9 f9 f9 f9 f9 f9 f9 00 00 00 f9 f9 f9 f9 f9
=>0x0000800df6f0: 00[f9]f9 f9 f9 f9 f9 f9 00 00 00 f9 f9 f9 f9 f9
0x0000800df700: 00 00 00 00 00 00 00 00 f9 f9 f9 f9 00 00 f9 f9
0x0000800df710: f9 f9 f9 f9 00 00 00 00 00 00 f9 f9 f9 f9 f9 f9
0x0000800df720: 00 00 f9 f9 f9 f9 f9 f9 00 00 00 00 00 00 f9 f9
0x0000800df730: f9 f9 f9 f9 00 00 00 f9 f9 f9 f9 f9 00 00 00 00
0x0000800df740: 00 00 f9 f9 f9 f9 f9 f9 00 00 f9 f9 f9 f9 f9 f9
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb

Tyson Smith <twsmith>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #40306:  test_case.ttf added by twsmith (24KiB - application/x-font-ttf)

 

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 twsmith (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
    Fri 07 Apr 2017 03:25:40 PM UTCwlStatusNone=>Fixed
      PrivacyPrivate=>Public
      Assigned toNone=>wl
      Open/ClosedOpen=>Closed
      Planned ReleaseNone=>2.8
    Fri 07 Apr 2017 10:44:24 AM UTCtwsmithAttached File-=>Added test_case.ttf, #40306

    Back to the top


    Powered by Savane 3.1-cleanup1