Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 170463 - CVE-2006-0225 local to local copy uses shell expansion twice
Summary: CVE-2006-0225 local to local copy uses shell expansion twice
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: openssh
Version: 3.0
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Tomas Mraz
QA Contact: Brian Brock
Whiteboard: impact=low,reported=20050913,public=2...
: 179621 (view as bug list)
Depends On:
Blocks: RHEL3U8CanFix
TreeView+ depends on / blocked
Reported: 2005-10-11 23:08 UTC by Tomas Mraz
Modified: 2007-11-30 22:07 UTC (History)
2 users (show)

Fixed In Version: RHSA-2006-0298
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2006-07-20 12:53:56 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2006:0298 normal SHIPPED_LIVE Low: openssh security update 2006-07-20 12:53:00 UTC

Description Tomas Mraz 2005-10-11 23:08:43 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):

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 Tomas Mraz 2006-02-01 19:51:49 UTC
*** Bug 179621 has been marked as a duplicate of this bug. ***

Comment 8 Bob Johnson 2006-04-11 16:00:38 UTC
This issue is on Red Hat Engineering's list of planned work items 
for the upcoming Red Hat Enterprise Linux 3.8 release.  Engineering 
resources have been assigned and barring unforeseen circumstances, Red 
Hat intends to include this item in the 3.8 release.

Comment 12 Red Hat Bugzilla 2006-07-20 12:53:56 UTC
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.