Bug 760984 (CVE-2011-4578)

Summary: CVE-2011-4578 acpid: Unsafe umask for actions executed by acpid
Product: [Other] Security Response Reporter: Jan Lieskovsky <jlieskov>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: NEW --- QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: aglotov, ted
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: impact=low,public=20110730,reported=20111206,source=oss-security,cvss2=3.6/AV:L/AC:L/Au:N/C:P/I:P/A:N,rhel-4/acpid=wontfix,rhel-5/acpid=defer,rhel-6/acpid=defer,fedora-all/acpid=notaffected
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On:    
Bug Blocks: 761099    

Description Jan Lieskovsky 2011-12-07 09:26:36 EST
An unsafe umask (user file-creation mode mask) mode flaw was found in the way ACPI daemon event handler performed actions execution. A local attacker could use this flaw to read or alter files, created by and belonging to particular acpid action, during its execution.

References:
[1] http://www.tedfelix.com/linux/acpid-netlink.html
[2] http://www.openwall.com/lists/oss-security/2011/12/06/2
    (CVE request)
[3] http://www.openwall.com/lists/oss-security/2011/12/06/3
    (CVE assignment)
Comment 1 Jan Lieskovsky 2011-12-07 09:29:59 EST
This issue affects the versions of the acpid package, as shipped with Red Hat Enterprise Linux 4, 5, and 6.

--

This issue did NOT affect the versions of the acpid package, as shipped with Fedora release of 15 and 16. The acpid package version in those releases have been updated to upstream acpid-2.0.13 version.
Comment 2 Jan Lieskovsky 2011-12-07 09:31:14 EST
Relevant upstream patch (related difference between v2.0.10 and v2.0.11 tarballs):

diff -uprs acpid-2.0.10/event.c acpid-2.0.11/event.c
--- acpid-2.0.10/event.c	2011-03-12 17:18:09.000000000 +0100
+++ acpid-2.0.11/event.c	2011-06-23 18:35:19.000000000 +0200
@@ -641,6 +641,7 @@ do_cmd_rule(struct rule *rule, const cha
 		if (acpid_debug && logevents) {
 			fprintf(stdout, "BEGIN HANDLER MESSAGES\n");
 		}
+		umask(0077);
 		execl("/bin/sh", "/bin/sh", "-c", action, NULL);
 		/* should not get here */
 		acpid_log(LOG_ERR, "execl(): %s", strerror(errno));
Comment 4 Huzaifa S. Sidhpurwala 2011-12-15 23:59:28 EST
Statement:

This issue affects the versions of the acpid package, as shipped with Red Hat
Enterprise Linux 4, 5, and 6. The Red Hat Security Response Team has rated this issue as having low security impact, a future update may address this flaw in acpid.