Bug 880177 (CVE-2012-2252)

Summary: CVE-2012-2252 rssh: incorrect filtering of rsync --rsh command line option
Product: [Other] Security Response Reporter: Tomas Hoger <thoger>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: jlieskov, security-response-team, xavier
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: rssh 2.3.4 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-05-08 17:38:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 880991, 880992    
Bug Blocks:    
Attachments:
Description Flags
Updated rsync 3 patch from Debian none

Description Tomas Hoger 2012-11-26 12:44:55 UTC
It was discovered that rssh does not properly reject invocation of the rsync command with --rsh command line argument.  It rejected command if option was specified as --rsh=command, but not when specified as --rsh command.  The --rsh option makes rsync execute arbitrary command, resulting in bypass of the rssh restrictions.

This issue affects rssh packages in all current Fedora (16, 17) and EPEL (5, 6) versions.

Acknowledgement:

This issue was discovered by the Red Hat Security Response Team.

Comment 3 Tomas Hoger 2012-11-28 08:28:46 UTC
Created attachment 653346 [details]
Updated rsync 3 patch from Debian

Source:
http://patch-tracker.debian.org/patch/series/view/rssh/2.3.3-6/fixes/rsync-protocol.diff

Upstream fix for this issue replaced:

  if ( strstr(*cl, "--rsh=" ) ){

check by a:

  if ( strstr(*cl, "--rsh" ) ){

in check_command_line() in util.c.

In Fedora packages, where we already have a patch adding rsync 3 support, updated rsync-protocol.diff patch from Debian rssh packages should be considered instead (which checks both -e and --rsh in the rsync_e_okay()).

Comment 4 Tomas Hoger 2012-11-28 11:03:06 UTC
Created rssh tracking bugs for this issue

Affects: fedora-all [bug 880991]
Affects: epel-all [bug 880992]

Comment 5 Fedora Update System 2012-12-19 08:34:38 UTC
rssh-2.3.4-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2013-01-12 01:00:18 UTC
rssh-2.3.4-1.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.