Bug 842831 - RFE: security: don't change owner/label unless it's needed for launching qemu (like for /dev/sr0)
Summary: RFE: security: don't change owner/label unless it's needed for launching qemu...
Keywords:
Status: CLOSED DUPLICATE of bug 755535
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: All
OS: All
unspecified
low
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
: 1063710 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-24 16:57 UTC by Cristian Ciupitu
Modified: 2016-04-26 13:49 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-14 20:09:13 UTC
Embargoed:


Attachments (Terms of Use)

Description Cristian Ciupitu 2012-07-24 16:57:02 UTC
Description of problem:
When I'm adding a CD image to a guest, libvirt changes its owner and SELinux
label even if it's not needed. The file is world-readable (even if it's owned
by root) and the SELinux label is public_content_t. libvirt should mess with
files as little as possible in my opinion.

The same should be done for hard-disk images probably, but I'm not interested
in that use case right now.

Version-Release number of selected component (if applicable):
libvirt-0.9.11.4-3.fc17.x86_64.rpm

Comment 1 Jiri Denemark 2012-07-25 07:19:49 UTC
Libvirt tries to isolate running domains as much as possible, which includes labeling resources used by each domain in such a way that other domains cannot read them. If you don't want this to happen for your CD image, adding <shareable/> element into the cdrom device element should work.

Comment 2 Cristian Ciupitu 2012-08-22 23:46:44 UTC
virsh dumpxml says:

    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw' cache='none'/>
      <source file='/mnt/.../xxx.iso'>
        <seclabel relabel='yes'/>
      </source>
      <target dev='hda' bus='ide'/>
      <readonly/>
      <shareable/>
      <alias name='ide0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>

yet the file is owned by qemu:qemu and has the label
system_u:object_r:svirt_image_t:s0.

Also I don't think that CD images need isolation by default.

Comment 3 Fedora End Of Life 2013-07-03 23:45:02 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 Cole Robinson 2013-07-11 18:24:22 UTC
Still not fixed, but this is a non-backportable bug so let's track it upstream.

Comment 5 Cole Robinson 2016-03-23 22:33:09 UTC
I sent an email about this to libvir-list last year, laying out a high level plan: https://www.redhat.com/archives/libvir-list/2015-April/msg01400.html

Comment 6 Cole Robinson 2016-04-10 17:48:47 UTC
*** Bug 1063710 has been marked as a duplicate of this bug. ***

Comment 7 Cole Robinson 2016-04-14 20:09:13 UTC

*** This bug has been marked as a duplicate of bug 755535 ***


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