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 2144906 - [virtiofsd] Allow running virtiofsd unprivileged (without user namespaces)
Summary: [virtiofsd] Allow running virtiofsd unprivileged (without user namespaces)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: virtiofsd
Version: 9.2
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: German Maglione
QA Contact: xiagao
URL:
Whiteboard:
Depends On: 2123070
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-11-22 17:10 UTC by Vivek Goyal
Modified: 2023-07-28 01:12 UTC (History)
12 users (show)

Fixed In Version: virtiofsd-1.5.0-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-09 07:46:45 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-140207 0 None None None 2022-11-22 17:12:20 UTC
Red Hat Product Errata RHBA-2023:2334 0 None None None 2023-05-09 07:47:06 UTC

Description Vivek Goyal 2022-11-22 17:10:26 UTC
Description of problem:

Currently virtiofsd can not run unprivileged. To be precise, an unprivileged user can run it but use of user namespaces is required.

Kubevirt/CNV folks want to run virtiofsd unprivileged but can not make use of user namepsaces yet.

Opening this bug to allow running virtiofsd unprivileged without requiring usage of user namespaces.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 German Maglione 2022-11-23 16:01:26 UTC
This is already supported upstream. It'll be fixed with the rebase (BZ 2123070).

Comment 8 xiagao 2023-01-13 09:25:03 UTC
Test pkg: 
virtiofsd-1.5.0-1.el9.x86_64 
kernel-5.14.0-226.el9.x86_64(host)  
kernel-5.14.0-231.el9.x86_64(guest)

Test with the following steps:
1. switch to user u3, start virtiofsd with sandbox=none and start a RHEL9.2 VM1.
[u3@dell-per440-06 ~]$ /usr/libexec/virtiofsd --socket-path ./sock1 --shared-dir /home/u3/test -d --sandbox none
[2023-01-13T08:42:50Z WARN  virtiofsd] Use of deprecated flag '-d': Please use the '--log-level debug' option instead
[2023-01-13T08:42:50Z WARN  virtiofsd::limits] Failure when trying to set the limit to 1000000, the hard limit (8192) of open file descriptors is used instead.
[2023-01-13T08:42:50Z INFO  virtiofsd] Waiting for vhost-user socket connection...

2. in guest, mount virtiofs.
3. create a file on host.
-rw-r--r--. 1 u3 u3 18 Jan 13 04:18 file

4. read the file on guest. --Success
5. write in the shared dir on guest.
# echo test > file2  --success
6. try to change the file's owner and group on guest --failed as expected.
#chgrp root file
chgrp: changing group of 'file': operation not permitted

The basic function works for this bug, I will change verified status.

Comment 10 errata-xmlrpc 2023-05-09 07:46:45 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (virtiofsd bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:2334


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