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.
Description of problem:
With the latest RHEL-8.4 kernel and qemu-kvm packages, adding user.* xattr on virtiofs is good, but adding trusted.* xattr on virtiofs fails with "Operation not permitted". The same test is good on RHEL-8.2.0.
RHEL-8.4
kernel-4.18.0-265.el8 (the same version on host and guest)
qemu-kvm-5.2.0-1.module+el8.4.0+9091+650b220a
libvirt-6.10.0-1.module+el8.4.0+8898+a84e86e1
```
[root@localhost ~]# mount -t virtiofs test /test/
[root@localhost ~]# touch /test/mytest; setfattr -n "trusted.xfstests" -v "attr" /test/mytest; echo $?
setfattr: /test/mytest: Operation not permitted
1
```
RHEL-8.2.0
kernel-4.18.0-193.el8 (the same version on host and guest)
qemu-kvm-4.2.0-19.module+el8.2.0+6296+6b821950
libvirt-6.0.0-17.module+el8.2.0+6257+0d066c28
```
[root@dhcp130-212 repo_xfstests]# mount -t virtiofs test /test/
[root@dhcp130-212 repo_xfstests]# touch /test/mytest; setfattr -n "trusted.xfstests" -v "attr" /test/mytest; echo $?
0
```
Guest VM and virtiofs are configured in libvirt as follows:
```
<filesystem type='mount' accessmode='passthrough'>
<binary path='/usr/libexec/virtiofsd' xattr='on'/>
<driver type='virtiofs'/>
<source dir='/mnt/test'/>
<target dir='test'/>
</filesystem>
<filesystem type='mount' accessmode='passthrough'>
<binary path='/usr/libexec/virtiofsd' xattr='on'/>
<driver type='virtiofs'/>
<source dir='/mnt/scratch'/>
<target dir='scratch'/>
</filesystem>
```
Version-Release number of selected component (if applicable):
qemu-kvm-5.2.0-1.module+el8.4.0+9091+650b220a
How reproducible:
100%
Steps to Reproduce:
See description above
Actual results:
setfattr fails
Expected results:
setfattr returns 0
Additional info:
N/A
Yes I'm aware of
Bug 1849147 - virtiofsd: Allow setting trusted attributes for containers in containers
and
Bug 1860491 - overlayfs trusted.* xattr support without CAP_SYS_ADMIN
But qemu-kvm version in my failed test above is exactly the same as the "fixed version" in Bug 1860491, it looks like still broken.
(In reply to Boyang Xue from comment #1)
> Yes I'm aware of
>
> Bug 1849147 - virtiofsd: Allow setting trusted attributes for containers in
> containers
>
> and
>
> Bug 1860491 - overlayfs trusted.* xattr support without CAP_SYS_ADMIN
>
> But qemu-kvm version in my failed test above is exactly the same as the
> "fixed version" in Bug 1860491, it looks like still broken.
yes,about Bug 1860491 - overlayfs trusted.* xattr support without CAP_SYS_ADMIN, I should still be broken, for I still can reproduce it and I add comment like https://bugzilla.redhat.com/show_bug.cgi?id=1860491#c18
This bug should duplicated of Bug 1860491 - overlayfs trusted.* xattr support without CAP_SYS_ADMIN and depend on Bug 1854595 - virtiofsd sandboxing requires CAP_SYS_ADMIN and does not run in a container
Comment 8Dr. David Alan Gilbert
2021-02-02 19:36:48 UTC
I've just added some notes to 1860491 to clarify how to do this; will dupe this bz to there.
*** This bug has been marked as a duplicate of bug 1860491 ***
Description of problem: With the latest RHEL-8.4 kernel and qemu-kvm packages, adding user.* xattr on virtiofs is good, but adding trusted.* xattr on virtiofs fails with "Operation not permitted". The same test is good on RHEL-8.2.0. RHEL-8.4 kernel-4.18.0-265.el8 (the same version on host and guest) qemu-kvm-5.2.0-1.module+el8.4.0+9091+650b220a libvirt-6.10.0-1.module+el8.4.0+8898+a84e86e1 ``` [root@localhost ~]# mount -t virtiofs test /test/ [root@localhost ~]# touch /test/mytest; setfattr -n "trusted.xfstests" -v "attr" /test/mytest; echo $? setfattr: /test/mytest: Operation not permitted 1 ``` RHEL-8.2.0 kernel-4.18.0-193.el8 (the same version on host and guest) qemu-kvm-4.2.0-19.module+el8.2.0+6296+6b821950 libvirt-6.0.0-17.module+el8.2.0+6257+0d066c28 ``` [root@dhcp130-212 repo_xfstests]# mount -t virtiofs test /test/ [root@dhcp130-212 repo_xfstests]# touch /test/mytest; setfattr -n "trusted.xfstests" -v "attr" /test/mytest; echo $? 0 ``` Guest VM and virtiofs are configured in libvirt as follows: ``` <filesystem type='mount' accessmode='passthrough'> <binary path='/usr/libexec/virtiofsd' xattr='on'/> <driver type='virtiofs'/> <source dir='/mnt/test'/> <target dir='test'/> </filesystem> <filesystem type='mount' accessmode='passthrough'> <binary path='/usr/libexec/virtiofsd' xattr='on'/> <driver type='virtiofs'/> <source dir='/mnt/scratch'/> <target dir='scratch'/> </filesystem> ``` Version-Release number of selected component (if applicable): qemu-kvm-5.2.0-1.module+el8.4.0+9091+650b220a How reproducible: 100% Steps to Reproduce: See description above Actual results: setfattr fails Expected results: setfattr returns 0 Additional info: N/A