Bug 639044 (CVE-2010-3389)
| Summary: | CVE-2010-3389 rgmanager: insecure library loading vulnerability | ||
|---|---|---|---|
| Product: | [Other] Security Response | Reporter: | Vincent Danen <vdanen> |
| Component: | vulnerability | Assignee: | Red Hat Product Security <security-response-team> |
| Status: | CLOSED ERRATA | QA Contact: | |
| Severity: | low | Docs Contact: | |
| Priority: | low | ||
| Version: | unspecified | CC: | andrew, bressers, cluster-maint, edamato, fdinitto, lhh, mgrac |
| 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: | 2011-12-07 09:00:34 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: | 639045, 671073, 705763, 710637 | ||
| Bug Blocks: | 734217 | ||
Created resource-agents tracking bugs for this issue Affects: fedora-all [bug 639045] I doublechecked that DIR_EXECUTABLE is always set to something when prior to the current resetting of LD_LIBRARY_PATH.
It is; consequently the patch, as more or less suggested, will work:
- LD_LIBRARY_PATH=$DIR_EXECUTABLE:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH
+ LD_LIBRARY_PATH=$DIR_EXECUTABLE${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+ export LD_LIBRARY_PATH
Acknowledgements: Red Hat would like to thank Raphael Geissert for reporting this issue. http://git.fedorahosted.org/git/?p=resource-agents.git;a=commitdiff;h=394c23c8f9e1e0fb934ba994e2e5a786467d6bec Patch available upstream, will be part of the upcoming release/update This issue has been addressed in following products: CLuster Suite for RHEL 4 Via RHSA-2011:0264 https://rhn.redhat.com/errata/RHSA-2011-0264.html This issue has been addressed in following products: Red Hat Enterprise Linux 5 Via RHSA-2011:1000 https://rhn.redhat.com/errata/RHSA-2011-1000.html This issue has been addressed in following products: Red Hat Enterprise Linux 5 Via RHSA-2011:1000 https://rhn.redhat.com/errata/RHSA-2011-1000.html This issue has been addressed in following products: Red Hat Enterprise Linux 6 Via RHSA-2011:1580 https://rhn.redhat.com/errata/RHSA-2011-1580.html |
Raphael Geissert conducted a review of various packages in Debian and found that cluster-agents contained a script that could be abused by an attacker to execute arbitrary code [1]. The vulnerability is due to an insecure change to LD_LIBRARY_PATH, and environment variable used by ld.so(8) to look for libraries in directories other than the standard paths. When there is an empty item in the colon-separated list of directories in LD_LIBRARY_PATH, ld.so(8) treats it as a '.' (current working directory). If the given script is executed from a directory where a local attacker could write files, there is a chance for exploitation. In Fedora, resource-agents contains rgmanager, which has the same scripts as Debian's cluster-agents. /usr/share/cluster/SAPDatabase and /usr/share/cluster/SAPInstance both re-set LD_LIBRARY_PATH insecurely: # as root user we need the library path to the SAP kernel to be able to call executables if [ `echo $LD_LIBRARY_PATH | grep -c "^$DIR_EXECUTABLE\>"` -eq 0 ]; then LD_LIBRARY_PATH=$DIR_EXECUTABLE:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH fi A solution is to patch the scripts to properly set $LD_LIBRARY_PATH: export LD_LIBRARY_PATH=/usr/lib/foo${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} This issue has been assigned the name CVE-2010-3389. [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=598549