Bug 722694 (CVE-2011-4099)

Summary: CVE-2011-4099 capsh: does not chdir after chroot
Product: [Other] Security Response Reporter: Steve Grubb <sgrubb>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: ebenes, mvadkert, pknirsch, security-response-team
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-07 09:09:41 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:    
Bug Blocks: 734217    
Attachments:
Description Flags
Patch fixing bug none

Description Steve Grubb 2011-07-16 16:51:54 UTC
Description of problem:
The capsh program has a --chroot commandline option. Inspecting the code shows that it does not do a chdir("/") after calling chroot. This means that '.' is outside the chroot.

Additional info:
http://cwe.mitre.org/data/definitions/243.html

Comment 3 Steve Grubb 2011-07-16 16:59:43 UTC
Created attachment 513490 [details]
Patch fixing bug

The attached patch will be sent upstream.

Comment 4 Steve Grubb 2011-07-26 16:43:05 UTC
Upstream said they included the fix in 2.22. Its now public:

http://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.22.tar.gz

So, I would say we should push fixes out in Fedora at least.

Comment 12 Huzaifa S. Sidhpurwala 2011-11-18 06:04:59 UTC
This issue does not affect the version of libcap as shipped with Red Hat Enterprise Linux 4 and 5.

Comment 13 errata-xmlrpc 2011-12-06 17:12:51 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 6

Via RHSA-2011:1694 https://rhn.redhat.com/errata/RHSA-2011-1694.html