Bug 865591 - fdupes: possible file linking of files with different owner/group/permissions
Summary: fdupes: possible file linking of files with different owner/group/permissions
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 865592
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-11 20:58 UTC by Vincent Danen
Modified: 2019-09-29 12:56 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-02 19:55:07 UTC
Embargoed:


Attachments (Terms of Use)

Description Vincent Danen 2012-10-11 20:58:41 UTC
A SUSE bug report [1] noted a problem with how fdupes is used in the %fdupes RPM macro.  When there are two files with identical content that differs in owner/group/permissions, the %fdupes macro overwrites one of the files with a link that effectively gives both files the same owner/group/permissions.  If one of the files has tighter permissions than the other, this could result in one of the files having more relaxed permissions than appropriate.

It looks as though our implementation of %fdupes is taken from SUSE's, so we would be susceptible to the same issues.  Suggested means of resolving this are to test for equality of owner/group/permissions before duping a file.  It might also be prudent to set some areas as "off limits", such as files in /etc/ or other locations that may contain user-changed configuration files.

[1] https://bugzilla.novell.com/show_bug.cgi?id=784670

Comment 1 Vincent Danen 2012-10-11 21:01:03 UTC
Created fdupes tracking bugs for this issue

Affects: fedora-all [bug 865592]

Comment 2 Richard Shaw 2012-10-22 14:25:35 UTC
Looks like the Suse guys have found a solution. I'll be implementing it as soon as I have a chance.

Comment 3 Vincent Danen 2013-08-02 19:55:07 UTC
This has been corrected in Fedora 17, 18, and 19 with the update to fdupes-1.51-1.


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