Bug 174026 - CVE-2006-0225 local to local copy uses shell expansion twice
CVE-2006-0225 local to local copy uses shell expansion twice
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: openssh (Show other bugs)
All Linux
medium Severity low
: ---
: ---
Assigned To: Tomas Mraz
Brian Brock
: Security
Depends On:
  Show dependency treegraph
Reported: 2005-11-23 15:58 EST by Josh Bressers
Modified: 2007-11-30 17:06 EST (History)
1 user (show)

See Also:
Fixed In Version: RHSA-2006-0698
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-09-28 20:23:53 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Josh Bressers 2005-11-23 15:58:50 EST
+++ 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):

How reproducible:

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 4 Red Hat Bugzilla 2006-09-28 20:23:54 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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