bugmake - Bugs: bug #45050, Invalid read / heap overflow in...

 
 

bug #45050: Invalid read / heap overflow in unescape_char()

Submitted by:  Hanno Boeck <hanno>
Submitted on:  Thu 07 May 2015 10:12:01 PM UTC  
 
Severity:  3 - Normal Item Group:  None
Status:  Fixed Privacy:  Public
Assigned to:  Paul D. Smith <psmith> Open/Closed:  Closed
Component Version:  4.1 Operating System:  None
Fixed Release:  4.2 Triage Status:  None

Add a New Comment (Rich Markup)
   

You are not logged in

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

 

Mon 13 Jul 2015 04:14:41 AM UTC, comment #2: 

I pushed a fix for this to Git.  Thanks for the report!

Paul D. Smith <psmith>
Project AdministratorIn charge of this item.
Mon 11 May 2015 01:30:51 AM UTC, comment #1: 

after some check, I believe that the problem is in the code:

char * unescape_char(char *string, int c) {
    .....

    /* here, s can point to 0, however, after ++, the s might skip the 0 and continue reading "wild memory" */
    (p++) = (s++); 
    .....
}

chen <chenzero>
Thu 07 May 2015 10:12:01 PM UTC, original submission:  

Attached file will cause a heap overflow / invalid read error in make. This can be seen with address sanitizer or valgrind.

I'll attach Address Sanitizer output. This was found with american fuzzy lop.

Hanno Boeck <hanno>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #33960:  Makefile.heapoverflow-unescape_char added by hanno (3B - 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 psmith (Posted a comment)
  • -email is unavailable- added by chenzero (Posted a comment)
  • -email is unavailable- added by hanno (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-07-13 psmith Component VersionNone => 4.1
        Fixed ReleaseNone => 4.2
    2015-07-13 psmith StatusNone => Fixed
        Assigned toNone => psmith
        Open/ClosedOpen => Closed
    2015-05-07 hanno Attached File- => Added Makefile.heapoverflow-unescape_char, #33960
        Attached File- => Added Makefile.heapoverflow-unescape_char.asan.txt, #33961

    Back to the top


    Powered by Savane 3.5