.\" Man page generated from reStructuredText.
.
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.TH "VIRTFS-PROXY-HELPER" "1" "Sep 26, 2023" "8.1.0" "QEMU"
.SH NAME
virtfs-proxy-helper \- QEMU 9p virtfs proxy filesystem helper
.SH SYNOPSIS
.sp
\fBvirtfs\-proxy\-helper\fP [\fIOPTIONS\fP]
.SH DESCRIPTION
.sp
NOTE: The 9p \(aqproxy\(aq backend is deprecated (since QEMU 8.1) and will be
removed, along with this daemon, in a future version of QEMU!
.sp
Pass\-through security model in QEMU 9p server needs root privilege to do
few file operations (like chown, chmod to any mode/uid:gid).  There are two
issues in pass\-through security model:
.INDENT 0.0
.IP \(bu 2
TOCTTOU vulnerability: Following symbolic links in the server could
provide access to files beyond 9p export path.
.IP \(bu 2
Running QEMU with root privilege could be a security issue.
.UNINDENT
.sp
To overcome above issues, following approach is used: A new filesystem
type \(aqproxy\(aq is introduced. Proxy FS uses chroot + socket combination
for securing the vulnerability known with following symbolic links.
Intention of adding a new filesystem type is to allow qemu to run
in non\-root mode, but doing privileged operations using socket IO.
.sp
Proxy helper (a stand alone binary part of qemu) is invoked with
root privileges. Proxy helper chroots into 9p export path and creates
a socket pair or a named socket based on the command line parameter.
QEMU and proxy helper communicate using this socket. QEMU proxy fs
driver sends filesystem request to proxy helper and receives the
response from it.
.sp
The proxy helper is designed so that it can drop root privileges except
for the capabilities needed for doing filesystem operations.
.SH OPTIONS
.sp
The following options are supported:
.INDENT 0.0
.TP
.B \-h
Display help and exit
.UNINDENT
.INDENT 0.0
.TP
.B \-p, \-\-path PATH
Path to export for proxy filesystem driver
.UNINDENT
.INDENT 0.0
.TP
.B \-f, \-\-fd SOCKET_ID
Use given file descriptor as socket descriptor for communicating with
qemu proxy fs drier. Usually a helper like libvirt will create
socketpair and pass one of the fds as parameter to this option.
.UNINDENT
.INDENT 0.0
.TP
.B \-s, \-\-socket SOCKET_FILE
Creates named socket file for communicating with qemu proxy fs driver
.UNINDENT
.INDENT 0.0
.TP
.B \-u, \-\-uid UID
uid to give access to named socket file; used in combination with \-g.
.UNINDENT
.INDENT 0.0
.TP
.B \-g, \-\-gid GID
gid to give access to named socket file; used in combination with \-u.
.UNINDENT
.INDENT 0.0
.TP
.B \-n, \-\-nodaemon
Run as a normal program. By default program will run in daemon mode
.UNINDENT
.SH AUTHOR
M. Mohan Kumar
.SH COPYRIGHT
2023, The QEMU Project Developers
.\" Generated by docutils manpage writer.
.
