This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 810731 - SELinux is preventing /bin/rpm from 'getattr' accesses on the chr_file /dev/urandom.
SELinux is preventing /bin/rpm from 'getattr' accesses on the chr_file /dev/u...
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: vhostmd (Show other bugs)
16
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Richard W.M. Jones
Fedora Extras Quality Assurance
abrt_hash:6dd2110edcd4ec7cc9211166786...
:
: 810729 810730 810732 810733 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-08 14:04 EDT by Renich Bon Ciric
Modified: 2013-02-13 16:38 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-13 16:38:26 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Renich Bon Ciric 2012-04-08 14:04:02 EDT
libreport version: 2.0.8
executable:     /usr/bin/python
hashmarkername: setroubleshoot
kernel:         3.3.1-2.fc16.x86_64
reason:         SELinux is preventing /bin/rpm from 'getattr' accesses on the chr_file /dev/urandom.
time:           Sun 08 Apr 2012 01:03:53 PM CDT

description:
:SELinux is preventing /bin/rpm from 'getattr' accesses on the chr_file /dev/urandom.
:
:*****  Plugin catchall_boolean (47.5 confidence) suggests  *******************
:
:If you want to allow users to login using a sssd server
:Then you must tell SELinux about this by enabling the 'authlogin_nsswitch_use_ldap'boolean.
:Do
:setsebool -P authlogin_nsswitch_use_ldap 1
:
:*****  Plugin catchall_boolean (47.5 confidence) suggests  *******************
:
:If you want to enable reading of urandom for all domains.
:Then you must tell SELinux about this by enabling the 'global_ssp'boolean.
:Do
:setsebool -P global_ssp 1
:
:*****  Plugin catchall (6.38 confidence) suggests  ***************************
:
:If you believe that rpm should be allowed getattr access on the urandom chr_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 rpm /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:vhostmd_t:s0
:Target Context                system_u:object_r:urandom_device_t:s0
:Target Objects                /dev/urandom [ chr_file ]
:Source                        rpm
:Source Path                   /bin/rpm
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           rpm-4.9.1.2-6.fc16.x86_64
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-80.fc16.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.3.1-2.fc16.x86_64 #1 SMP
:                              Tue Apr 3 00:46:10 UTC 2012 x86_64 x86_64
:Alert Count                   2
:First Seen                    Sun 08 Apr 2012 01:34:06 AM CDT
:Last Seen                     Sun 08 Apr 2012 12:48:00 PM CDT
:Local ID                      d4db7df5-75b6-400e-ab21-bfa6bdbc259c
:
:Raw Audit Messages
:type=AVC msg=audit(1333907280.735:109): avc:  denied  { getattr } for  pid=2136 comm="rpm" path="/dev/urandom" dev="devtmpfs" ino=7175 scontext=system_u:system_r:vhostmd_t:s0 tcontext=system_u:object_r:urandom_device_t:s0 tclass=chr_file
:
:
:type=SYSCALL msg=audit(1333907280.735:109): arch=x86_64 syscall=stat success=no exit=EACCES a0=3ca9e421fa a1=7fff2a1fad10 a2=7fff2a1fad10 a3=0 items=0 ppid=2135 pid=2136 auid=4294967295 uid=112 gid=112 euid=112 suid=112 fsuid=112 egid=112 sgid=112 fsgid=112 tty=(none) ses=4294967295 comm=rpm exe=/bin/rpm subj=system_u:system_r:vhostmd_t:s0 key=(null)
:
:Hash: rpm,vhostmd_t,urandom_device_t,chr_file,getattr
:
:audit2allow
:
:#============= vhostmd_t ==============
:#!!!! This avc can be allowed using one of the these booleans:
:#     authlogin_nsswitch_use_ldap, global_ssp
:
:allow vhostmd_t urandom_device_t:chr_file getattr;
:
:audit2allow -R
:
:#============= vhostmd_t ==============
:#!!!! This avc can be allowed using one of the these booleans:
:#     authlogin_nsswitch_use_ldap, global_ssp
:
:allow vhostmd_t urandom_device_t:chr_file getattr;
:
Comment 1 Daniel Walsh 2012-04-09 14:44:03 EDT
Why is vhostmd executing rpm?
Comment 2 Daniel Walsh 2012-04-09 14:44:17 EDT
*** Bug 810732 has been marked as a duplicate of this bug. ***
Comment 3 Daniel Walsh 2012-04-09 14:44:26 EDT
*** Bug 810733 has been marked as a duplicate of this bug. ***
Comment 4 Daniel Walsh 2012-04-09 14:48:06 EDT
*** Bug 810729 has been marked as a duplicate of this bug. ***
Comment 5 Daniel Walsh 2012-04-09 14:48:28 EDT
*** Bug 810730 has been marked as a duplicate of this bug. ***
Comment 6 Renich Bon Ciric 2012-04-09 21:56:43 EDT
(In reply to comment #1)
> Why is vhostmd executing rpm?

who knows; happened after an update. Any suggestions?
Comment 7 Richard W.M. Jones 2012-04-10 08:29:56 EDT
In order to determine the "virtualization vendor", vhostmd runs
this command:

  rpm -qi libvirt| grep Vendor: | awk '{ print substr($0, index($0, $5)); }' | sort -u

The command produces no output on Fedora.  On RHEL it prints
"Red Hat, Inc.", and I'm guessing that on SuSE it prints something
else.

That is in the default config file shipped in Fedora and
RHEL, which we don't control (it is supplied to us by SAP
and we merely package it).

Note that vhostmd can run any arbitrary command configured
by the local sysadmin, which makes it a bit hard to sandbox
with SELinux.
Comment 8 Richard W.M. Jones 2012-04-10 08:32:15 EDT
To the reporter: If you don't know what vhostmd is, then you
should NOT be running vhostmd.  Really the only time you should
run vhostmd is when specifically instructed to by SAP, and after
you have fully examined and understood the configuration file
and the implications of using vhostmd.
Comment 9 Renich Bon Ciric 2012-04-10 20:51:42 EDT
(In reply to comment #8)
> To the reporter: If you don't know what vhostmd is, then you
> should NOT be running vhostmd.  Really the only time you should
> run vhostmd is when specifically instructed to by SAP, and after
> you have fully examined and understood the configuration file
> and the implications of using vhostmd.

I thought it was a "metrics gathering daemon.". I intended to use it to gather info from the virtual machines.

If that's causing the problem, I'm removing it.
Comment 10 Richard W.M. Jones 2012-04-11 05:01:38 EDT
It passes metrics about the host/hypervisor up to guests.
It's unlikely you would want to use it unless you have
been instructed to install it by SAP.
Comment 11 Fedora End Of Life 2013-01-16 12:12:30 EST
This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. 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 '16'.

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 16'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 16 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 to click on 
"Clone This Bug" 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
Comment 12 Fedora End Of Life 2013-02-13 16:38:32 EST
Fedora 16 changed to end-of-life (EOL) status on 2013-02-12. Fedora 16 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.