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: impact=moderate,public=20121127,reported=20121123,source=redhat,cvss2=6.5/AV:N/AC:L/Au:S/C:P/I:P/A:P,fedora-all/rssh=affected,epel-all/rssh=affected
Fixed In Version: rssh 2.3.4 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-05-08 13:38:50 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On: 880991, 880992    
Bug Blocks:    
Attachments:
Description Flags
Updated rsync 3 patch from Debian none

Description Tomas Hoger 2012-11-26 07:44:55 EST
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 03:28:46 EST
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 06:03:06 EST
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 03:34:38 EST
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-11 20:00:18 EST
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.