Bug 1043872 (CVE-2013-7135)

Summary: CVE-2013-7135 perl-Proc-Daemon: writes pidfile with mode 666
Product: [Other] Security Response Reporter: Ratul Gupta <ratulg>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: fedora, mmraka, pavel.denisov
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: 2014-01-07 18:21:45 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: 1043875, 1043876    
Bug Blocks:    
Attachments:
Description Flags
Patch for this vulnerability.
none
Patch to restore umask after pid file is created none

Description Ratul Gupta 2013-12-17 11:52:24 UTC
It was reported that perl-Proc-Daemon, when instructed to write a pid file, does that with a umask set to 0, so the pid file ends up with mode 666. This might be a security issue.

References:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=732283

Comment 1 Ratul Gupta 2013-12-17 11:53:55 UTC
Created perl-Proc-Daemon tracking bugs for this issue:

Affects: fedora-all [bug 1043875]
Affects: epel-all [bug 1043876]

Comment 2 Ratul Gupta 2013-12-17 11:55:09 UTC
Created attachment 837641 [details]
Patch for this vulnerability.

This patch was given on the debian page, seems to fix the issue.

Comment 3 Ratul Gupta 2013-12-18 07:23:07 UTC
CVE Request:
http://seclists.org/oss-sec/2013/q4/512

Comment 4 Fedora Update System 2013-12-28 02:01:40 UTC
perl-Proc-Daemon-0.14-9.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 5 Fedora Update System 2013-12-28 02:08:27 UTC
perl-Proc-Daemon-0.14-9.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2013-12-28 02:12:43 UTC
perl-Proc-Daemon-0.14-9.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2014-01-03 07:41:04 UTC
perl-Proc-Daemon-0.14-9.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2014-01-03 07:41:26 UTC
perl-Proc-Daemon-0.14-9.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Vincent Danen 2014-01-07 18:21:45 UTC
While RHN Satellite ships perl-Proc-Daemon, you need to have local access in order to take advantage of this flaw and a typical Satellite server installation will not permit local or shell access to untrusted users.

Comment 10 Pavel Denisov 2014-12-26 02:48:20 UTC
Created attachment 973101 [details]
Patch to restore umask after pid file is created

Comment 11 Pavel Denisov 2014-12-26 02:56:18 UTC
While the patch from Debian fixes the security issue, it makes unreadable for other users all other files created by a daemon, what is unwanted in some cases.
Attached patch fixes this problem. It would be great if it could be applied to the package.

Comment 12 Remi Collet 2014-12-26 05:38:17 UTC
@pavel, this bug is closed.

Plase consider submitting your patch "upstream" first.

Comment 13 Pavel Denisov 2014-12-26 15:18:12 UTC
Remi, I've just submitted my patch to upstream bug tracker. Upstream doesn't seem to be active (no releases in 3+ years), so I don't expect it to be applied anytime soon. Should I open a separate bug here to include the patch to the package?