Bug 1404542

Summary: SELinux is preventing /usr/bin/qemu-system-x86_64 from 'getattr' accesses on the file /proc/<pid>/cmdline.
Product: [Fedora] Fedora Reporter: Petr Lautrbach <plautrba>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: dominick.grift, dwalsh, hhan, lvrabec, mgrepl, plautrba, pmoore, ssekidde
Target Milestone: ---Keywords: TestBlocker
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:603c8bd3d10b169b3768c600bd1d4e0d57dd06a81984bfd1a168d4634b7ef0b6;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-29 11:27:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Petr Lautrbach 2016-12-14 05:12:28 UTC
Description of problem:
$ virsh start fedora23
SELinux is preventing /usr/bin/qemu-system-x86_64 from 'getattr' accesses on the file /proc/<pid>/cmdline.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that qemu-system-x86_64 should be allowed getattr access on the cmdline 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:
# ausearch -c 'qemu-system-x86' --raw | audit2allow -M my-qemusystemx86
# semodule -X 300 -i my-qemusystemx86.pp

Additional Information:
Source Context                system_u:system_r:svirt_t:s0:c559,c790
Target Context                system_u:system_r:virtd_t:s0-s0:c0.c1023
Target Objects                /proc/<pid>/cmdline [ file ]
Source                        qemu-system-x86
Source Path                   /usr/bin/qemu-system-x86_64
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           qemu-system-x86-core-2.8.0-0.2.rc2.fc26.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-230.fc26.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 4.9.0-0.rc7.git3.2.fc26.x86_64 #1
                              SMP Thu Dec 1 22:50:14 UTC 2016 x86_64 x86_64
Alert Count                   1
First Seen                    2016-12-14 06:08:43 CET
Last Seen                     2016-12-14 06:08:43 CET
Local ID                      34baaf61-5b4d-4d51-bb2a-28be56efdfa6

Raw Audit Messages
type=AVC msg=audit(1481692123.948:1911): avc:  denied  { getattr } for  pid=7605 comm="qemu-system-x86" path="/proc/5310/cmdline" dev="proc" ino=1083110 scontext=system_u:system_r:svirt_t:s0:c559,c790 tcontext=system_u:system_r:virtd_t:s0-s0:c0.c1023 tclass=file permissive=1


type=SYSCALL msg=audit(1481692123.948:1911): arch=x86_64 syscall=fstat success=yes exit=0 a0=18 a1=7ffc68e5ad70 a2=7ffc68e5ad70 a3=64 items=0 ppid=1 pid=7605 auid=4294967295 uid=107 gid=107 euid=107 suid=107 fsuid=107 egid=107 sgid=107 fsgid=107 tty=(none) ses=4294967295 comm=qemu-system-x86 exe=/usr/bin/qemu-system-x86_64 subj=system_u:system_r:svirt_t:s0:c559,c790 key=(null)

Hash: qemu-system-x86,svirt_t,virtd_t,file,getattr

Version-Release number of selected component:
selinux-policy-3.13.1-230.fc26.noarch

Additional info:
reporter:       libreport-2.8.0
hashmarkername: setroubleshoot
kernel:         4.9.0-0.rc7.git3.2.fc26.x86_64
type:           libreport

Comment 1 Han Han 2017-02-20 03:13:42 UTC
It will block virt autotest on latest fedora.

Comment 2 Fedora End Of Life 2017-02-28 10:46:53 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 3 Fedora End Of Life 2018-05-03 08:14:46 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. 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 EOL if it remains open with a Fedora  'version'
of '26'.

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.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 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 this bug is closed as described in the policy above.

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 2018-05-29 11:27:40 UTC
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26
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.