Bug 130050 - CAN-2004-0792 rsync path sanitizing bug
Summary: CAN-2004-0792 rsync path sanitizing bug
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: rsync
Version: 3.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jay Fenlason
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-08-16 19:09 UTC by Josh Bressers
Modified: 2014-08-31 23:26 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-09-01 18:52:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2004:436 0 high SHIPPED_LIVE Moderate: rsync security update 2004-09-01 04:00:00 UTC

Description Josh Bressers 2004-08-16 19:09:22 UTC
There is a path-sanitizing bug that affects daemon mode in all recent
rsync versions (including 2.6.2) but only if chroot is disabled. It
does NOT affect the normal send/receive filenames that specify what
files should be transferred (this is because these names happen to get
sanitized twice, and thus the second call removes any lingering
leading slash(es) that the first call left behind). It does affect
certain option paths that cause auxilliary files to be read or written.

More information here
http://samba.org/rsync/#security_aug04

FC is handled by bug 130044

Comment 1 Josh Bressers 2004-08-16 21:51:20 UTC
Here is the upstream patch to fix this issue.

--- orig/util.c	2004-04-27 12:59:37 -0700
+++ util.c	2004-08-11 23:37:27 -0700
@@ -743,7 +743,7 @@
 				allowdotdot = 1;
 			} else {
 				p += 2;
-				if (*p == '/')
+				while (*p == '/')
 					p++;
 				if (sanp != start) {
 					/* back up sanp one level */

Comment 2 Josh Bressers 2004-08-16 22:13:04 UTC
This is going to be RHSA-2004:436

Comment 3 Josh Bressers 2004-08-17 16:43:12 UTC
MITRE has assigned CAN-2004-0792 to this issue.

Comment 4 Josh Bressers 2004-09-01 18:52:20 UTC
An errata 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.

http://rhn.redhat.com/errata/RHSA-2004-436.html



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