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

 
 

bug #44059: directory traversal via file rename

Submitter:  Laszlo Boszormenyi (GCS) <gcs>
Submitted:  Wed 21 Jan 2015 07:39:33 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group 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>
Group 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 Files:
   
   
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
  • -email is unavailable- added by khali (Posted a comment)
  • -email is unavailable- added by agruen (Posted a comment)
  • -email is unavailable- added by gcs (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-02-16 agruen StatusNone Fixed
        Open/ClosedOpen Closed
    2015-01-21 agruen Attached File- Added rename-path-traversal.diff, #32884
    2015-01-21 gcs Attached File- Added traversal2.diff, #32881

    Back to the top

    Powered by Savane 3.14-1244.
    Corresponding source code