Bug 873221

Summary: creating qemu/kvm guest fails with SELinux error on s390x
Product: [Fedora] Fedora Reporter: Dan Horák <dan>
Component: selinux-policy-targetedAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED WONTFIX QA Contact: Ben Levenson <benl>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: berrange, clalancette, crobinso, dwalsh, eparis, itamar, jforbes, jyang, laine, libvirt-maint, sds, veillard, virt-maint
Target Milestone: ---Keywords: SELinux
Target Release: ---   
Hardware: s390x   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-05 07:51:57 EST Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On:    
Bug Blocks: 467765    

Description Dan Horák 2012-11-05 06:30:41 EST
Description of problem:
When creating qemu/kvm guest on s390x host with virt-manager from a remote host it fails with SELinux error

Nelze dokončit instalaci: 'internal error Process exited while reading console log output: /usr/bin/qemu-system-s390x: error while loading shared libraries: cannot restore segment prot after reloc: Permission denied
'

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 96, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/create.py", line 1943, in do_install
    guest.start_install(False, meter=meter)
  File "/usr/lib/python2.7/site-packages/virtinst/Guest.py", line 1249, in start_install
    noboot)
  File "/usr/lib/python2.7/site-packages/virtinst/Guest.py", line 1317, in _create_guest
    dom = self.conn.createLinux(start_xml or final_xml, 0)
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 2077, in createLinux
    if ret is None:raise libvirtError('virDomainCreateLinux() failed', conn=self)
libvirtError: internal error Process exited while reading console log output: /usr/bin/qemu-system-s390x: error while loading shared libraries: cannot restore segment prot after reloc: Permission denied



Version-Release number of selected component (if applicable):
libvirt-0.10.2-3.fc18.s390x
qemu-kvm-1.2.0-16.fc18.s390x
Comment 1 Dan Horák 2012-11-05 06:33:37 EST
from autid.log:
...
type=AVC msg=audit(1352114897.165:456): avc:  denied  { execmod } for  pid=1961 comm="qemu-system-s39" path="/usr/bin/qemu-system-s390x" dev="dm-2" ino=664855 scontext=system_u:system_r:svirt_t:s0:c299,c349 tcontext=system_u:object_r:qemu_exec_t:s0 tclass=file
...
Comment 2 Cole Robinson 2012-12-16 19:53:13 EST
dwalsh, googling tells me some shared library is textrel_shlib_t, any idea how to find out which library?
Comment 3 Cole Robinson 2013-01-14 20:14:17 EST
(In reply to comment #2)
> dwalsh, googling tells me some shared library is textrel_shlib_t, any idea
> how to find out which library?

dwalsh/mgrepl, ping ^^
Comment 4 Cole Robinson 2013-04-01 09:03:29 EDT
Moving to selinux-policy for further triage. dwalsh, mgrepl,
Comment 5 Daniel Walsh 2013-04-01 09:16:36 EDT
Not sure if this is a kernel issue, but executables should not be getting execmod, should be coming from shared libraries.  We have seen similar  weirdness from s390 in the past.
Comment 6 Fedora End Of Life 2013-12-21 04:17:16 EST
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. 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 '18'.

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 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 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 18'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 7 Fedora End Of Life 2014-02-05 07:52:07 EST
Fedora 18 changed to end-of-life (EOL) status on 2014-01-14. Fedora 18 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. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

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