Bug 739719 - SELinux is preventing /bin/bash from 'open' accesses on the file /var/log/pm-suspend.log.
Summary: SELinux is preventing /bin/bash from 'open' accesses on the file /var/log/pm-...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 15
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:5551caa6bed...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-19 20:23 UTC by Till Maas
Modified: 2012-08-07 19:21 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-07 19:21:22 UTC


Attachments (Terms of Use)

Description Till Maas 2011-09-19 20:23:23 UTC
SELinux is preventing /bin/bash from 'open' accesses on the file /var/log/pm-suspend.log.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that bash should be allowed open access on the pm-suspend.log file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep dhclient-script /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:dhcpc_t:s0-s0:c0.c1023
Target Context                system_u:object_r:devicekit_var_log_t:s0
Target Objects                /var/log/pm-suspend.log [ file ]
Source                        dhclient-script
Source Path                   /bin/bash
Port                          <Unbekannt>
Host                          (removed)
Source RPM Packages           bash-4.2.10-4.fc15
Target RPM Packages           pm-utils-1.4.1-8.fc15
Policy RPM                    selinux-policy-3.9.16-38.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 2.6.40.3-0.fc15.x86_64 #1 SMP
                              Tue Aug 16 04:10:59 UTC 2011 x86_64 x86_64
Alert Count                   14
First Seen                    Fr 09 Sep 2011 00:54:56 CEST
Last Seen                     Mo 19 Sep 2011 07:59:31 CEST
Local ID                      448c9869-e216-498c-b9e0-d4d1ed28a8ae

Raw Audit Messages
type=AVC msg=audit(1316411971.121:25310): avc:  denied  { open } for  pid=8052 comm="dhclient-script" name="pm-suspend.log" dev=dm-2 ino=238 scontext=system_u:system_r:dhcpc_t:s0-s0:c0.c1023 tcontext=system_u:object_r:devicekit_var_log_t:s0 tclass=file


type=SYSCALL msg=audit(1316411971.121:25310): arch=x86_64 syscall=open success=yes exit=EINTR a0=d5a200 a1=0 a2=1b6 a3=0 items=0 ppid=8051 pid=8052 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=dhclient-script exe=/bin/bash subj=system_u:system_r:dhcpc_t:s0-s0:c0.c1023 key=(null)

Hash: dhclient-script,dhcpc_t,devicekit_var_log_t,file,open

audit2allow

#============= dhcpc_t ==============
allow dhcpc_t devicekit_var_log_t:file open;

audit2allow -R

#============= dhcpc_t ==============
allow dhcpc_t devicekit_var_log_t:file open;

Comment 1 Miroslav Grepl 2011-09-20 11:21:06 UTC
Are you able to reproduce it after executing

# restorecon -R -v /var/log/pm-suspend.log

Comment 2 Jaroslav Škarvada 2011-09-20 21:49:07 UTC
I am not sure why dhclient needs to open /var/log/pm-suspend.log. AFAIK it shouldn't. Do you have any custom scripts in /etc/dhcp/dhclient.d? And what about 'rpm -qV dhclient'?

Comment 3 Till Maas 2011-11-01 12:28:12 UTC
(In reply to comment #2)
> I am not sure why dhclient needs to open /var/log/pm-suspend.log. AFAIK it
> shouldn't. Do you have any custom scripts in /etc/dhcp/dhclient.d? And what

There is only script named ntp.sh from the ntp package.

> about 'rpm -qV dhclient'?

This does not show any output.

Comment 4 Daniel Walsh 2011-11-01 13:34:26 UTC
Till have you seen this AVC again?

Comment 5 Till Maas 2011-11-01 15:14:47 UTC
(In reply to comment #4)
> Till have you seen this AVC again?

Yes. According to sealert -b it happened last friday. Btw. does sealert track which bugs I already reported to make it easier to find an AVC for a certain bug?

Comment 6 Daniel Walsh 2011-11-01 15:22:09 UTC
Well if you report the same bug multiple times, it will just put a dup message on it. but We do not store the bugzilla number in the database.

Comment 7 Daniel Walsh 2011-11-01 15:37:49 UTC

Well we have

	devicekit_dontaudit_rw_log(dhcpc_t)

But we were thinking this was leaked but now it looks like it is not, so we need to fix the policy.

Comment 8 Fedora End Of Life 2012-08-07 19:21:25 UTC
This message is a notice that Fedora 15 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 15. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that
we were unable to fix it before Fedora 15 reached end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora, you are encouraged to click on
"Clone This Bug" (top right of this page) and open it against that
version of Fedora.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

The process we are following is described here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping


Note You need to log in before you can comment on or make changes to this bug.