RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1758772 - SELinux is preventing /usr/bin/qemu-ga from read access on the file b8:1.
Summary: SELinux is preventing /usr/bin/qemu-ga from read access on the file b8:1.
Keywords:
Status: CLOSED DUPLICATE of bug 1687721
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: selinux-policy
Version: 8.0
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Lukas Vrabec
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-10-05 13:43 UTC by Strahil Nikolov
Modified: 2019-10-07 08:20 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-10-07 08:20:05 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
CentOS 16452 0 None None None 2019-10-05 13:43:50 UTC

Description Strahil Nikolov 2019-10-05 13:43:51 UTC
Description of problem:
After fully patching a fresh RHEL 8.0 , SELINUX prevents qemu-ga from accessing one of the block devices.
As the VM is hosted on oVirt , that information is needed for the VM's "Disks" section and should be allowed.

Version-Release number of selected component (if applicable):
selinux-policy-3.14.1-61.el8_0.2.noarch
qemu-guest-agent-2.12.0-65.module+el8.0.0+4084+cce

How reproducible:
Installed once, but noticed same behaviour on CentOS 8 -> https://bugs.centos.org/view.php?id=16452

Steps to Reproduce:
1.Install with guest tools
2.Install Ansible via https://access.redhat.com/articles/3050101
3.Fully update 
4.Force relabel (touch /.autorelabel) & reboot


Actual results:
An AVC is generated:

[root@ansible ~]# sealert -l 5269453e-d426-42b6-a731-92f51f20fd3b
SELinux is preventing /usr/bin/qemu-ga from read access on the file b8:1.

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

If you believe that qemu-ga should be allowed read access on the b8:1 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-ga' --raw | audit2allow -M my-qemuga
# semodule -X 300 -i my-qemuga.pp


Additional Information:
Source Context                system_u:system_r:virt_qemu_ga_t:s0
Target Context                system_u:object_r:udev_var_run_t:s0
Target Objects                b8:1 [ file ]
Source                        qemu-ga
Source Path                   /usr/bin/qemu-ga
Port                          <Unknown>
Host                          ansible.localdomain
Source RPM Packages           qemu-guest-agent-2.12.0-65.module+el8.0.0+4084+cce
                              b9f44.5.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.1-61.el8_0.2.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     ansible.localdomain
Platform                      Linux ansible.localdomain
                              4.18.0-80.11.2.el8_0.x86_64 #1 SMP Sun Sep 15
                              11:24:21 UTC 2019 x86_64 x86_64
Alert Count                   56
First Seen                    2019-10-05 16:11:21 EEST
Last Seen                     2019-10-05 16:41:21 EEST
Local ID                      5269453e-d426-42b6-a731-92f51f20fd3b

Raw Audit Messages
type=AVC msg=audit(1570282881.902:117): avc:  denied  { read } for  pid=974 comm="qemu-ga" name="b8:1" dev="tmpfs" ino=20618 scontext=system_u:system_r:virt_qemu_ga_t:s0 tcontext=system_u:object_r:udev_var_run_t:s0 tclass=file permissive=0


type=SYSCALL msg=audit(1570282881.902:117): arch=x86_64 syscall=openat success=no exit=EACCES a0=ffffff9c a1=7ffec7fe2780 a2=80000 a3=0 items=0 ppid=1 pid=974 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=qemu-ga exe=/usr/bin/qemu-ga subj=system_u:system_r:virt_qemu_ga_t:s0 key=(null)

Hash: qemu-ga,virt_qemu_ga_t,udev_var_run_t,file,read



Expected results:
No AVC denial to be observed.

Comment 1 Milos Malik 2019-10-07 07:43:08 UTC
This bug is fixed in RHEL-8.1. Here is the relevant bug report:
 * https://bugzilla.redhat.com/show_bug.cgi?id=1687721

Comment 2 Strahil Nikolov 2019-10-07 07:58:44 UTC
Then, let's make this one duplicate to 1687721.

Comment 3 Zdenek Pytela 2019-10-07 08:20:05 UTC

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


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