Bug 179621 - CVE-2006-0225 local to local copy uses shell expansion twice
Summary: CVE-2006-0225 local to local copy uses shell expansion twice
Keywords:
Status: CLOSED DUPLICATE of bug 170463
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: openssh
Version: 3.0
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: Tomas Mraz
QA Contact: Brian Brock
URL:
Whiteboard: impact=low,reported=20050913,public=2...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-02-01 18:34 UTC by Tomas Mraz
Modified: 2007-11-30 22:07 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-02-01 19:51:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Tomas Mraz 2006-02-01 18:34:32 UTC
+++ This bug was initially created as a clone of Bug #168167 +++

Description of problem:
scp currently implements local-to-local copy by constructing a command line
using 'cp' in a string and then using system().  Beside the fact the using
system() is really always wrong (only lazy people use it) which has the added
problem that the file name is exposed twice to shell expansion.  The file name
could contain characters which need quoting, like $ or spaces.  This second
expansion must be avoided.

Version-Release number of selected component (if applicable):
openssh-clients-4.2p1-1.x86_64

How reproducible:
always

Steps to Reproduce:
1.touch foo\ bar
2.mkdir somedir
3.scp foo\ bar somedir
  
Actual results:
cp: cannot stat `foo': No such file or directory
cp: cannot stat `bar': No such file or directory


Expected results:
no message, file copied

Additional info:
I'll attach a patch.  Upstream would probably not like it but it glibc is
advanced enough to provide the necessary functions.

There are also a few more places where I've seen TEMP_FAILURE_RETRY or
equivalent code missing.

Comment 2 Tomas Mraz 2006-02-01 19:51:36 UTC

*** This bug has been marked as a duplicate of 170463 ***


Note You need to log in before you can comment on or make changes to this bug.