Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
DSELinux is preventing /usr/bin/qemu-ga from read access on the directory /mnt.
***** Plugin restorecon (99.5 confidence) suggests ************************
If you want to fix the label.
/mnt default label should be mnt_t.
Then you can run restorecon. The access attempt may have been stopped due to insufficient permissions to access a parent directory in which case try to change the following command accordingly.
Do
# /sbin/restorecon -v /mnt
***** Plugin catchall (1.49 confidence) suggests **************************
If you believe that qemu-ga should be allowed read access on the mnt directory 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:unlabeled_t:s0
Target Objects /mnt [ dir ]
Source qemu-ga
Source Path /usr/bin/qemu-ga
Port <Unknown>
Host localhost.localdomain
Source RPM Packages
Target RPM Packages filesystem-3.8-2.el8.x86_64
Policy RPM selinux-policy-3.14.1-61.el8.noarch
Selinux Enabled True
Policy Type targeted
Enforcing Mode Enforcing
Host Name localhost.localdomain
Platform Linux localhost.localdomain 4.18.0-80.el8.x86_64
#1 SMP Wed Mar 13 12:02:46 UTC 2019 x86_64 x86_64
Alert Count 47
First Seen 2019-03-19 03:14:15 EDT
Last Seen 2019-03-19 04:44:59 EDT
Local ID aed26cc9-3f4d-42cc-8f9f-a33ac2c4bf53
Raw Audit Messages
type=AVC msg=audit(1552985099.106:128): avc: denied { read } for pid=875 comm="qemu-ga" name="/" dev="sdb" ino=2 scontext=system_u:system_r:virt_qemu_ga_t:s0 tcontext=system_u:object_r:unlabeled_t:s0 tclass=dir permissive=0
Hash: qemu-ga,virt_qemu_ga_t,unlabeled_t,dir,read
Additional info:
1.It works well with selinux-policy-3.13.1-229.el7.noarch.
Hi,
It looks like the /mnt directory has invalid label: The unlabeled_t label is usually displayed when a file was created in SELinux disabled state or when its actual label does not currently exist. Along with the restorecon plugin suggestion, you can fix the label with a single command:
# /sbin/restorecon -v /mnt
However, for files and directories which are a part of base system it is very unusual. Did you install the system with SELinux enabled as it is by default? Are you able to reproduce the issue?
(In reply to Zdenek Pytela from comment #1)
> Hi,
>
> It looks like the /mnt directory has invalid label: The unlabeled_t label is
> usually displayed when a file was created in SELinux disabled state or when
> its actual label does not currently exist. Along with the restorecon plugin
> suggestion, you can fix the label with a single command:
>
> # /sbin/restorecon -v /mnt
>
> However, for files and directories which are a part of base system it is
> very unusual. Did you install the system with SELinux enabled as it is by
> default? Are you able to reproduce the issue?
Yes, before mount block device to /mnt, the label of /mnt is:
#ll -dZ /mnt/
drwxr-xr-x. 2 root root system_u:object_r:mnt_t:s0 6 Aug 12 2018 /mnt/
After mount block device to /mnt, the label of /mnt is:
# ll -dZ /mnt/
drwxr-xr-x. 2 root root system_u:object_r:unlabeled_t:s0 22 Mar 19 15:13 /mnt/
(In reply to Zdenek Pytela from comment #3)
> What is the filesystem on the device mounted to /mnt? How was it created,
> does it support SELinux?
I tested ext4 and xfs, created by mkfs.XXX /dev/XXX. And both can reproduce the issue.
DSELinux is preventing /usr/bin/qemu-ga from read access on the directory /mnt. ***** Plugin restorecon (99.5 confidence) suggests ************************ If you want to fix the label. /mnt default label should be mnt_t. Then you can run restorecon. The access attempt may have been stopped due to insufficient permissions to access a parent directory in which case try to change the following command accordingly. Do # /sbin/restorecon -v /mnt ***** Plugin catchall (1.49 confidence) suggests ************************** If you believe that qemu-ga should be allowed read access on the mnt directory 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:unlabeled_t:s0 Target Objects /mnt [ dir ] Source qemu-ga Source Path /usr/bin/qemu-ga Port <Unknown> Host localhost.localdomain Source RPM Packages Target RPM Packages filesystem-3.8-2.el8.x86_64 Policy RPM selinux-policy-3.14.1-61.el8.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name localhost.localdomain Platform Linux localhost.localdomain 4.18.0-80.el8.x86_64 #1 SMP Wed Mar 13 12:02:46 UTC 2019 x86_64 x86_64 Alert Count 47 First Seen 2019-03-19 03:14:15 EDT Last Seen 2019-03-19 04:44:59 EDT Local ID aed26cc9-3f4d-42cc-8f9f-a33ac2c4bf53 Raw Audit Messages type=AVC msg=audit(1552985099.106:128): avc: denied { read } for pid=875 comm="qemu-ga" name="/" dev="sdb" ino=2 scontext=system_u:system_r:virt_qemu_ga_t:s0 tcontext=system_u:object_r:unlabeled_t:s0 tclass=dir permissive=0 Hash: qemu-ga,virt_qemu_ga_t,unlabeled_t,dir,read Additional info: 1.It works well with selinux-policy-3.13.1-229.el7.noarch.