Bug 1293854 (CVE-2014-9512)

Summary: CVE-2014-9512 rsync: Transferring file outside destination path via just-sent symlink
Product: [Other] Security Response Reporter: Adam Mariš <amaris>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: anemec, cbuissar, luhliari, psimerda, slawomir, ssorce
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: rsync 3.1.2 Doc Type: Bug Fix
Doc Text:
It was discovered that rsync did not properly perform sanity checks on certain meta-information. By sending specially crafted meta-information, a remote attacker could possibly exploit this flaw to cause an rsync endpoint to write data to files outside of the expected destination path.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-18 10:51:02 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: 1293856    
Bug Blocks: 1295358    

Description Adam Mariš 2015-12-23 09:38:47 UTC
A security fix in rsync 3.1.2 was released, adding extra check to the file list to prevent the malicious sender to use unsafe destination path for transferred file, such as just-sent symlink. Affects versions older than 3.1.2.

Upstream patches:

 - Complain if an inc-recursive path is not right for its dir.
https://git.samba.org/rsync.git/?p=rsync.git;a=commit;h=962f8b90045ab331fc04c9e65f80f1a53e68243b

 - Add parent-dir validation for --no-inc-recurse too.
https://git.samba.org/rsync.git/?p=rsync.git;a=commitdiff;h=e12a6c087ca1eecdb8eae5977be239c24f4dd3d9

Additional similar security patches:

 - Receiver now rejects invalid filenames in filelist.
https://git.samba.org/rsync.git/?p=rsync.git;a=commitdiff;h=4cad402ea8a91031f86c53961d78bb7f4f174790

 - Have receiver strip bogus leading slashes on filenames.
https://git.samba.org/rsync.git/?p=rsync.git;a=commitdiff;h=371242e4e8150d4f9cc74cdf2d75d8250535175e

Comment 1 Adam Mariš 2015-12-23 09:39:12 UTC
Created rsync tracking bugs for this issue:

Affects: fedora-all [bug 1293856]

Comment 2 Fedora Update System 2016-01-10 19:23:32 UTC
rsync-3.1.1-8.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 3 Fedora Update System 2016-01-22 03:18:55 UTC
rsync-3.1.1-7.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 4 Andrej Nemec 2016-01-22 08:05:53 UTC
Assigned CVE-2014-9512 as reported in https://packetstormsecurity.com/files/135351/USN-2879-1.txt