Bug 2014129

Summary: [virtio-fs] no error msg when chown vhost socket to an unknown user group
Product: Red Hat Enterprise Linux 9 Reporter: xiagao
Component: qemu-kvmAssignee: Dr. David Alan Gilbert <dgilbert>
qemu-kvm sub component: virtio-fs QA Contact: xiagao
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: dgilbert, mrezanin, qizhu, virt-maint, zhenyzha
Version: 9.0   
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-6.2.0-1.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-17 12:24:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description xiagao 2021-10-14 13:46:02 UTC
Description of problem:
I try to chown vhost socket to unknown user group, there is no error message,everything works well.
Expect some error/warning msg in this scenario.

Version-Release number of selected component (if applicable):
qemu-kvm-6.1.0-4.el9.x86_64
qemu-virtiofsd-6.1.0-4.el9.x86_64
kernel-5.14.0-5.el9.x86_64

How reproducible:
100%

Steps to Reproduce:
1. (host)# /usr/libexec/virtiofsd --socket-path=/tmp/vhostqemu1 -o source=/home/test -o cache=auto --socket-group=users_xx -d
[2021-10-14 09:27:18.925186+0000] [ID: 00066082] virtio_session_mount: Waiting for vhost-user socket connection...

2.(host)# ll /tmp/vhostqemu1
srwxrwx--- 1 root root 0 Oct 14 09:42 /tmp/vhostqemu1

3. boot up vm with vhost-user device(connect to that socket path)

Actual results:
virtiofsd works well and vm with virtiofs device can boot up.

Expected results:
vhost socket should failed to set group to unknown user

Additional info:

Comment 1 Dr. David Alan Gilbert 2021-10-14 13:51:20 UTC
posted upstream: virtiofsd: Error on bad socket group name

Comment 2 Dr. David Alan Gilbert 2021-10-26 17:33:15 UTC
Fixed upstream by 555a76e5e5dc2cd3c84c
8.6/9.0 will get it on the 6.2 rebase.

Comment 5 Yanan Fu 2021-12-20 12:45:39 UTC
QE bot(pre verify): Set 'Verified:Tested,SanityOnly' as gating/tier1 test pass.

Comment 6 xiagao 2021-12-21 03:23:41 UTC
Test version:
qemu-kvm-6.2.0-1.el9.x86_64
kernel-5.14.0-21.el9.x86_64

Start virtiofsd with unknown group name for socket-group, the virtiofsd quit with expected error info.
# /usr/libexec/virtiofsd --socket-path=/tmp/vhostqemu2 -o source=/home/test -o cache=auto --socket-group=users_xx -d
[2021-12-21 03:20:07.280070+0000] [ID: 00008280] vhost socket: unable to find group 'users_xx'

Change bug status to verifed.

Comment 9 errata-xmlrpc 2022-05-17 12:24:29 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 (new packages: qemu-kvm), 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-2022:2307