bugGNU patch - Bugs: bug #48744, segfault / null pointer access...

 
 

bug #48744: segfault / null pointer access with malformed patch

Submitted by:  Hanno Boeck <hanno>
Submitted on:  Wed 10 Aug 2016 07:01:43 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Wed 10 Aug 2016 07:31:01 AM UTC, comment #1:

Applied, thanks.

Andreas Gruenbacher <agruen>
Project Administrator
Wed 10 Aug 2016 07:01:43 AM UTC, original submission:

The attached example file will cause a null pointer access and thus a segfault in the patch tool.

I'll also attach a fix. The problem is in the function parse_name(), which calls parse_c_string(). This function can fail and will return 0, yet the return value is not checked. The patch adds this check.

Hanno Boeck <hanno>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by agruen (Posted a comment)
  • -unavailable- added by hanno (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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 10 Aug 2016 07:31:01 AM UTCagruenStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Wed 10 Aug 2016 07:01:43 AM UTChannoAttached File-=>Added nullptr-parse_name-sample.patch, #38163
      Attached File-=>Added patch-fix-nullptr-parse_name.patch, #38164

    Back to the top


    Powered by Savane 3.1-cleanup1