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
Priority:  5 - Normal Item Group:  None
Status:  Fixed Privacy:  Public
Assigned to:  None Open/Closed:  Closed
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

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.savann ... 704ba04e0371d2cbd

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>

 

Attached Files

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

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

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

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)
  •  

    Votes

    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.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

    History

    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.16-a7ba.
    Corresponding source code