Bug 885724 (CVE-2012-5644)

Summary: CVE-2012-5644 libuser: (Complete) Information disclosure when moving user's home directory
Product: [Other] Security Response Reporter: Jan Lieskovsky <jlieskov>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: fweimer, mitr, security-response-team, sonu.khan
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-22 16:06:04 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: 928846    
Bug Blocks: 884691, 1802635    

Description Jan Lieskovsky 2012-12-10 13:41:13 UTC
An information disclosure flaw was found in the way libuser, an user and group account administration library, performed movement of user's home directory. Previously, during the move the ownership of all the (sub)entries present in directory tree, to be moved, were changed from privileged user account to the effective user id of the user, the home directory should belong to. A local attacker could use this flaw to conduct hardlink attacks and possibly obtain unauthorized access to arbitrary system file.

This issue was found by Miloslav Trmač of Red Hat.

Comment 1 Jan Lieskovsky 2012-12-10 13:46:33 UTC
This issue affects the versions of the libuser package, as shipped with Red Hat Enterprise Linux 5 and 6.

--

This issue affects the versions of the libuser package, as shipped with Fedora release of 16 and 17.

Comment 5 Huzaifa S. Sidhpurwala 2012-12-18 03:34:16 UTC
This issue was assigned CVE-2012-5644

Comment 6 Huzaifa S. Sidhpurwala 2013-03-28 15:03:50 UTC
Created libuser tracking bugs for this issue

Affects: fedora-all [bug 928846]

Comment 9 Vincent Danen 2015-08-22 16:05:52 UTC
Statement:

Red Hat Product Security has rated this issue as having Low security impact. This issue is not currently planned to be addressed in future updates. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.

Comment 11 Sonu Khan 2020-01-28 13:25:29 UTC
Is there any steps for mitigation that we can apply for a workaround?
Also share steps for reproduction.

Comment 12 Miloslav Trmač 2020-01-28 13:31:28 UTC
(In reply to Sonu Khan from comment #11)
> Is there any steps for mitigation that we can apply for a workaround?
> Also share steps for reproduction.

I don’t think we typically share reproducers, anyway please contact Product Security at secalert .

Comment 13 Huzaifa S. Sidhpurwala 2020-02-27 05:39:41 UTC
Mitigation:

There are several restrictions to successful exploitation of this flaw:

~~~
1. ONLY applications compiled with libuser are affected. The affected code is hit only when a move operation is conducted on user home directory.
2. The attacker needs to have a shell account on the target machine.
3. Since this is a TOCTOU attack, precise timing is required for the attack. The attacker needs to know exactly when the move directory is moved in order successfully exploit this flaw.
~~~

Any other application acting on user directories (not compiled with libuser) for example usermod/userdel are not affected by this flaw.