Bug 885253 - SELinux is preventing /usr/sbin/dmidecode from 'write' accesses on the file /run/lock/subsys/rhsmcertd.
Summary: SELinux is preventing /usr/sbin/dmidecode from 'write' accesses on the file /...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: subscription-manager
Version: 17
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Devan Goodwin
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:b0f2589d71b561ae39d4437ae34...
Depends On:
Blocks: rhsm-rhel70
TreeView+ depends on / blocked
 
Reported: 2012-12-07 22:41 UTC by Lanny Bland
Modified: 2013-07-31 23:52 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-07-31 23:51:55 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Lanny Bland 2012-12-07 22:41:40 UTC
Description of problem:
SELinux is preventing /usr/sbin/dmidecode from 'write' accesses on the file /run/lock/subsys/rhsmcertd.

*****  Plugin leaks (86.2 confidence) suggests  ******************************

If you want to ignore dmidecode trying to write access the rhsmcertd file, because you believe it should not need this access.
Then you should report this as a bug.  
You can generate a local policy module to dontaudit this access.
Do
# grep /usr/sbin/dmidecode /var/log/audit/audit.log | audit2allow -D -M mypol
# semodule -i mypol.pp

*****  Plugin catchall (14.7 confidence) suggests  ***************************

If you believe that dmidecode should be allowed write access on the rhsmcertd 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 dmidecode /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:dmidecode_t:s0
Target Context                system_u:object_r:rhsmcertd_lock_t:s0
Target Objects                /run/lock/subsys/rhsmcertd [ file ]
Source                        dmidecode
Source Path                   /usr/sbin/dmidecode
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           dmidecode-2.11-8.fc17.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.10.0-161.fc17.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.6.9-2.fc17.x86_64 #1 SMP Tue Dec
                              4 13:26:04 UTC 2012 x86_64 x86_64
Alert Count                   1
First Seen                    2012-12-07 16:24:58 CST
Last Seen                     2012-12-07 16:24:58 CST
Local ID                      57e2b452-79f3-4293-86e1-5b64c4739714

Raw Audit Messages
type=AVC msg=audit(1354919098.369:74): avc:  denied  { write } for  pid=1701 comm="dmidecode" path="/run/lock/subsys/rhsmcertd" dev="tmpfs" ino=16582 scontext=system_u:system_r:dmidecode_t:s0 tcontext=system_u:object_r:rhsmcertd_lock_t:s0 tclass=file


type=SYSCALL msg=audit(1354919098.369:74): arch=x86_64 syscall=execve success=yes exit=0 a0=2448e40 a1=244e030 a2=244e3d0 a3=10 items=0 ppid=1700 pid=1701 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=dmidecode exe=/usr/sbin/dmidecode subj=system_u:system_r:dmidecode_t:s0 key=(null)

Hash: dmidecode,dmidecode_t,rhsmcertd_lock_t,file,write

audit2allow

#============= dmidecode_t ==============
allow dmidecode_t rhsmcertd_lock_t:file write;

audit2allow -R

#============= dmidecode_t ==============
allow dmidecode_t rhsmcertd_lock_t:file write;


Additional info:
hashmarkername: setroubleshoot
kernel:         3.6.9-2.fc17.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2012-12-10 08:47:03 UTC
We have

optional_policy(`
    dmidecode_domtrans(rhsmcertd_t)
')

which means rhsmcertd executes dmidecode but does not close file descriptor.

"/run/lock/subsys/rhsmcertd"

Comment 2 Daniel Walsh 2012-12-10 17:00:35 UTC
http://danwalsh.livejournal.com/53603.html

fcntl(fd,F_SETFD, FD_CLOEXEC)

Comment 3 Fedora End Of Life 2013-07-03 22:10:48 UTC
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is 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  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

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.

Comment 4 Fedora End Of Life 2013-07-31 23:52:00 UTC
Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.


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