bugThe FreeType Project - Bugs: bug #46313, Malformed pfr font spends much...

 
 

bug #46313: Malformed pfr font spends much time in af_latin_hints_link_segments.

Submitted by:  bungeman <bungeman>
Submitted on:  Wed 28 Oct 2015 03:51:42 PM UTC  
 
Severity: 3 - NormalItem Group: None
Status: InvalidPrivacy: Public
Assigned to: Werner LEMBERG <wl>Open/Closed: Closed
Planned Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Wed 28 Oct 2015 06:40:54 PM UTC, comment #1:

I've downloaded the original, unmodified file `AssLtts13.pfr', and it is indeed an abnormal font: The `.notdef' glyph (showing a lion in Assyrian style) has 4229 points!

Due to the fact that the fuzzer changes the internal scaling factor from 0.03 to 8 in your sample file, increasing the glyph sizes by a factor of 256, you get 576 horizontal segments instead of 30 in the original font, for example.

In other words, slow processing is expected for this malformed font, and I don't think we have a bug here. Maybe you shouldn't use those Assyrian fonts for fuzzing...

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Wed 28 Oct 2015 03:51:42 PM UTC, original submission:

Found with libFuzzer, reproduction attached.

With the attached malformed pfr font, runinput takes about a half second. Profiling with perf indicates that this spends a great deal of time in af_latin_hints_link_segments and af_* generally. This may simply be expected behavior for a malformed font, but it seems like this is taking long enough that it should be understood why. This behavior has also dragged pfr fuzzing back down to an average of ~5 executions a second.

bungeman <bungeman>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #35326:  d2a8692b5b7453ef780108255b293e75014ea950 added by bungeman (66KiB - 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 bungeman (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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 28 Oct 2015 06:40:54 PM UTCwlItem GroupWishlist=>None
      StatusNone=>Invalid
      Assigned toNone=>wl
      Open/ClosedOpen=>Closed
    Wed 28 Oct 2015 03:51:42 PM UTCbungemanAttached File-=>Added d2a8692b5b7453ef780108255b293e75014ea950, #35326

    Back to the top


    Powered by Savane 3.1-cleanup1