Bug 499536

Summary: libvirtd AVC denials - uml backend writing to /root/
Product: [Fedora] Fedora Reporter: Charles Rose <charles_rose>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 14CC: berrange, carl.gaudreault, clalance, crobinso, dwalsh, itamar, veillard, virt-maint, wwlinuxengineering
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-01-24 16:45:56 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 480594    
Attachments:
Description Flags
SELinux alert none

Description Charles Rose 2009-05-07 01:47:09 EDT
Created attachment 342770 [details]
SELinux alert

Description of problem:
Installing libvirt on a Fedora 11 + rawhide system and starting the libvirt service for the first time causes SELinux alerts:
SELinux is preventing libvirtd from using potentially mislabelled files (root)

Version-Release number of selected component (if applicable):
libvirt-0.6.2-4.f11.x86_64
selinux-policy-targetted-3.6.12-28.fc11.noarch

How reproducible:
Occurs only the first time libvirt is started. subsequent "service libvirt restart" does not show up the SELinux alerts.

Steps to Reproduce:
1. Install Fedora Rawhide (7 May)
2. Install libvirt: System-> Administration ->Add/Remove Software-> check all virtualization components
3. Start libvirt
  
Actual results:
libvirt starts with no SELinux alerts

Expected results:
libvirt starts with 3 SELinux alerts on access to root [ dir ]

Additional info:
SELinux alert attached.
Comment 1 Mark McLoughlin 2009-05-07 02:55:22 EDT
Okay, looks like the UML is writing to /root/

    if (virAsprintf(&uml_driver->monitorDir,
                    "%s/.uml", userdir) == -1)
        goto out_of_memory;

Thanks Charles
Comment 2 Daniel Walsh 2009-05-07 10:21:17 EDT
Why?  This should go into /var/lib/libvirt/  If possible.
Comment 3 Daniel Berrange 2009-05-07 11:04:55 EDT
Hmm, I thought that ~/.uml/  was compiled into the UserModeLinux kernel. Looking at the kernel source now, it turns out that you can pass a kernel boot argument to UML to override this, so we could force it to be created under /var/run/libvirt/uml as we do with QEMU.
Comment 4 Bug Zapper 2009-06-09 11:17:16 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 5 Mark McLoughlin 2009-10-29 13:38:08 EDT
*** Bug 531500 has been marked as a duplicate of this bug. ***
Comment 6 Cole Robinson 2010-03-16 12:13:00 EDT
*** Bug 553013 has been marked as a duplicate of this bug. ***
Comment 7 Cole Robinson 2010-03-16 12:25:57 EDT
FYI, the kernel option Dan is talking about seems to be uml_dir=  :

http://user-mode-linux.sourceforge.net/old/switches.html
Comment 8 Daniel Berrange 2010-03-16 12:29:52 EDT
Yep, I got 1/2 way through fixing this, but then found that Fedora can't build any current UML kernel because of a issue in base 4.0. so was unable to test it works !
Comment 9 Bug Zapper 2010-04-27 10:10:16 EDT
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  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 '11'.

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 11'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 11 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 please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

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 10 Cole Robinson 2010-05-17 14:38:56 EDT
Still relevant for F12.
Comment 11 Bug Zapper 2010-11-04 07:16:36 EDT
This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12.  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 '12'.

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 12'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 12 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 please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

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 Cole Robinson 2010-11-17 14:20:08 EST
I believe this is fixed upstream:

0a58eed3d9d51d28c4e1d69e8dbe334779f447e0

Moving to F14
Comment 13 Cole Robinson 2011-06-10 13:34:56 EDT
*** Bug 589363 has been marked as a duplicate of this bug. ***
Comment 14 Fedora Admin XMLRPC Client 2011-09-22 13:59:38 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 15 Fedora Admin XMLRPC Client 2011-09-22 14:03:24 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 16 Fedora Admin XMLRPC Client 2011-11-30 14:59:58 EST
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 17 Fedora Admin XMLRPC Client 2011-11-30 15:00:28 EST
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 18 Fedora Admin XMLRPC Client 2011-11-30 15:05:46 EST
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 19 Fedora Admin XMLRPC Client 2011-11-30 15:05:55 EST
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 20 Cole Robinson 2012-01-24 16:45:56 EST
F14 is EOL, please reopen if this is still relevant in a more recent fedora.