bugGNU patch - Bugs: bug #44059, directory traversal via file rename

 
 

bug #44059: directory traversal via file rename

Submitted by:  Laszlo Boszormenyi (GCS) <gcs>
Submitted on:  Wed 21 Jan 2015 07:39:33 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.

 

Mon 16 Feb 2015 01:54:40 PM UTC, comment #3:

As far as I can see this is fixed since GNU patch version 2.7.3, presumably by this commit:

For renames and copies, make sure that both file names are validhttp://git.savannah.gnu.org/cgit/patch.git/commit/?id=17953b5893f7c9835f0dd2a704ba04e0371d2cbd

So I think this bug can be closed as fixed?

Jean Delvare <khali>
Wed 21 Jan 2015 12:37:29 PM UTC, comment #2:

Ah, I see -- here's a proposed fix.

(file #32884)

Andreas Gruenbacher <agruen>
Project Administrator
Wed 21 Jan 2015 08:47:18 AM UTC, comment #1:

> There's a typo in the CVE number for the last directory traversal. It's CVE-2015-1196 (missing the 6 digit on the end).


Oops, sorry. I can't fix the commit message anymore now.

Andreas Gruenbacher <agruen>
Project Administrator
Wed 21 Jan 2015 07:39:33 AM UTC, original submission:

There's a typo in the CVE number for the last directory traversal. It's CVE-2015-1196 (missing the 6 digit on the end).

The fix for that doesn't prevent the following:
$ ls /tmp/moo
/bin/ls: cannot access /tmp/moo: No such file or directory

$ mkdir empty && cd empty

$ patch -p1 < traversal2.diff
patching file moo
patching file ../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../tmp/moo (renamed from moo)

$ ls /tmp/moo
/tmp/moo

Laszlo Boszormenyi (GCS) <gcs>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #32884:  rename-path-traversal.diff added by agruen (2KiB - text/x-patch)
file #32881:  traversal2.diff added by gcs (270B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by khali (Posted a comment)
  • -unavailable- added by agruen (Posted a comment)
  • -unavailable- added by gcs (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
    Mon 16 Feb 2015 02:00:07 PM UTCagruenStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Wed 21 Jan 2015 12:37:29 PM UTCagruenAttached File-=>Added rename-path-traversal.diff, #32884
    Wed 21 Jan 2015 07:39:33 AM UTCgcsAttached File-=>Added traversal2.diff, #32881

    Back to the top


    Powered by Savane 3.1-cleanup1