Bug 717464 - SELinux is preventing /usr/sbin/prelink from 'read' accesses on the file /lib/systemd/system/fedora-autorelabel-mark.service.
Summary: SELinux is preventing /usr/sbin/prelink from 'read' accesses on the file /lib...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: rawhide
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:1c581193dfb...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-28 21:20 UTC by Eric Blake
Modified: 2011-07-26 16:33 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-01 08:20:27 UTC
Type: ---


Attachments (Terms of Use)

Description Eric Blake 2011-06-28 21:20:42 UTC
SELinux is preventing /usr/sbin/prelink from 'read' accesses on the file /lib/systemd/system/fedora-autorelabel-mark.service.

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

If you believe that prelink should be allowed read access on the fedora-autorelabel-mark.service 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 prelink /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:system_r:prelink_t:s0-s0:c0.c1023
Target Context                system_u:object_r:systemd_unit_file_t:s0
Target Objects                /lib/systemd/system/fedora-autorelabel-
                              mark.service [ file ]
Source                        prelink
Source Path                   /usr/sbin/prelink
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           prelink-0.4.5-2.fc16
Target RPM Packages           initscripts-9.30-1.fc16
Policy RPM                    selinux-policy-3.9.16-29.1.fc16
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.39-1.fc16.x86_64 #1 SMP Sat
                              May 21 02:34:01 UTC 2011 x86_64 x86_64
Alert Count                   4
First Seen                    Tue 28 Jun 2011 02:44:59 PM MDT
Last Seen                     Tue 28 Jun 2011 02:48:42 PM MDT
Local ID                      8356bc27-d5bc-4225-a5f5-ef0b2aebd33c

Raw Audit Messages
type=AVC msg=audit(1309294122.124:86): avc:  denied  { read } for  pid=3149 comm="prelink" path="/lib/systemd/system/fedora-autorelabel-mark.service" dev=dm-1 ino=162 scontext=unconfined_u:system_r:prelink_t:s0-s0:c0.c1023 tcontext=system_u:object_r:systemd_unit_file_t:s0 tclass=file


type=AVC msg=audit(1309294122.124:86): avc:  denied  { read } for  pid=3149 comm="prelink" path="/lib/systemd/system/fedora-autorelabel.service" dev=dm-1 ino=4562 scontext=unconfined_u:system_r:prelink_t:s0-s0:c0.c1023 tcontext=system_u:object_r:systemd_unit_file_t:s0 tclass=file


type=AVC msg=audit(1309294122.124:86): avc:  denied  { read } for  pid=3149 comm="prelink" path="/lib/systemd/system/fedora-autoswap.service" dev=dm-1 ino=30483 scontext=unconfined_u:system_r:prelink_t:s0-s0:c0.c1023 tcontext=system_u:object_r:systemd_unit_file_t:s0 tclass=file


type=AVC msg=audit(1309294122.124:86): avc:  denied  { read } for  pid=3149 comm="prelink" path="/lib/systemd/system/fedora-configure.service" dev=dm-1 ino=20622 scontext=unconfined_u:system_r:prelink_t:s0-s0:c0.c1023 tcontext=system_u:object_r:systemd_unit_file_t:s0 tclass=file


type=AVC msg=audit(1309294122.124:86): avc:  denied  { read } for  pid=3149 comm="prelink" path="/lib/systemd/system/fedora-loadmodules.service" dev=dm-1 ino=4563 scontext=unconfined_u:system_r:prelink_t:s0-s0:c0.c1023 tcontext=system_u:object_r:systemd_unit_file_t:s0 tclass=file


type=AVC msg=audit(1309294122.124:86): avc:  denied  { read } for  pid=3149 comm="prelink" path="/lib/systemd/system/fedora-readonly.service" dev=dm-1 ino=20624 scontext=unconfined_u:system_r:prelink_t:s0-s0:c0.c1023 tcontext=system_u:object_r:systemd_unit_file_t:s0 tclass=file


type=AVC msg=audit(1309294122.124:86): avc:  denied  { read } for  pid=3149 comm="prelink" path="/lib/systemd/system/fedora-storage-init-late.service" dev=dm-1 ino=16000 scontext=unconfined_u:system_r:prelink_t:s0-s0:c0.c1023 tcontext=system_u:object_r:systemd_unit_file_t:s0 tclass=file


type=AVC msg=audit(1309294122.124:86): avc:  denied  { read } for  pid=3149 comm="prelink" path="/lib/systemd/system/fedora-storage-init.service" dev=dm-1 ino=16001 scontext=unconfined_u:system_r:prelink_t:s0-s0:c0.c1023 tcontext=system_u:object_r:systemd_unit_file_t:s0 tclass=file


type=AVC msg=audit(1309294122.124:86): avc:  denied  { read } for  pid=3149 comm="prelink" path="/lib/systemd/system/fedora-sysinit-hack.service" dev=dm-1 ino=40608 scontext=unconfined_u:system_r:prelink_t:s0-s0:c0.c1023 tcontext=system_u:object_r:systemd_unit_file_t:s0 tclass=file


type=AVC msg=audit(1309294122.124:86): avc:  denied  { read } for  pid=3149 comm="prelink" path="/lib/systemd/system/fedora-sysinit-unhack.service" dev=dm-1 ino=20625 scontext=unconfined_u:system_r:prelink_t:s0-s0:c0.c1023 tcontext=system_u:object_r:systemd_unit_file_t:s0 tclass=file


type=AVC msg=audit(1309294122.124:86): avc:  denied  { read } for  pid=3149 comm="prelink" path="/lib/systemd/system/fedora-wait-storage.service" dev=dm-1 ino=20626 scontext=unconfined_u:system_r:prelink_t:s0-s0:c0.c1023 tcontext=system_u:object_r:systemd_unit_file_t:s0 tclass=file


type=SYSCALL msg=audit(1309294122.124:86): arch=x86_64 syscall=execve success=yes exit=0 a0=40e194 a1=7fff61fa7040 a2=7fff61faca08 a3=7fff61fa8e60 items=0 ppid=3143 pid=3149 auid=500 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=1 comm=prelink exe=/usr/sbin/prelink subj=unconfined_u:system_r:prelink_t:s0-s0:c0.c1023 key=(null)

Hash: prelink,prelink_t,systemd_unit_file_t,file,read

audit2allow

#============= prelink_t ==============
allow prelink_t systemd_unit_file_t:file read;

audit2allow -R

#============= prelink_t ==============
allow prelink_t systemd_unit_file_t:file read;

Comment 1 Miroslav Grepl 2011-06-29 08:17:34 UTC
Looks like a leak.

What does

# stat /lib/systemd/system/fedora-autorelabel-mark.service

Comment 2 Eric Blake 2011-06-29 13:26:27 UTC
  File: `/lib/systemd/system/fedora-autorelabel-mark.service'
  Size: 371             Blocks: 8          IO Block: 4096   regular file
Device: fd01h/64769d    Inode: 142         Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Context: system_u:object_r:systemd_unit_file_t:s0
Access: 2011-06-28 15:06:25.821000005 -0600
Modify: 2011-06-21 13:41:29.000000000 -0600
Change: 2011-06-28 15:06:22.621000005 -0600
 Birth: -

The AVC happened while I was doing a 'yum upgrade' on rawhide, so I'm not sure if it was a one-time event.

Comment 3 Miroslav Grepl 2011-07-01 08:20:27 UTC
Ok, please reopen if this happens again.


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