virtfs-proxy-helper.rst 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. QEMU 9p virtfs proxy filesystem helper
  2. ======================================
  3. Synopsis
  4. --------
  5. **virtfs-proxy-helper** [*OPTIONS*]
  6. Description
  7. -----------
  8. NOTE: The 9p 'proxy' backend is deprecated (since QEMU 8.1) and will be
  9. removed, along with this daemon, in a future version of QEMU!
  10. Pass-through security model in QEMU 9p server needs root privilege to do
  11. few file operations (like chown, chmod to any mode/uid:gid). There are two
  12. issues in pass-through security model:
  13. - TOCTTOU vulnerability: Following symbolic links in the server could
  14. provide access to files beyond 9p export path.
  15. - Running QEMU with root privilege could be a security issue.
  16. To overcome above issues, following approach is used: A new filesystem
  17. type 'proxy' is introduced. Proxy FS uses chroot + socket combination
  18. for securing the vulnerability known with following symbolic links.
  19. Intention of adding a new filesystem type is to allow qemu to run
  20. in non-root mode, but doing privileged operations using socket IO.
  21. Proxy helper (a stand alone binary part of qemu) is invoked with
  22. root privileges. Proxy helper chroots into 9p export path and creates
  23. a socket pair or a named socket based on the command line parameter.
  24. QEMU and proxy helper communicate using this socket. QEMU proxy fs
  25. driver sends filesystem request to proxy helper and receives the
  26. response from it.
  27. The proxy helper is designed so that it can drop root privileges except
  28. for the capabilities needed for doing filesystem operations.
  29. Options
  30. -------
  31. The following options are supported:
  32. .. program:: virtfs-proxy-helper
  33. .. option:: -h
  34. Display help and exit
  35. .. option:: -p, --path PATH
  36. Path to export for proxy filesystem driver
  37. .. option:: -f, --fd SOCKET_ID
  38. Use given file descriptor as socket descriptor for communicating with
  39. qemu proxy fs drier. Usually a helper like libvirt will create
  40. socketpair and pass one of the fds as parameter to this option.
  41. .. option:: -s, --socket SOCKET_FILE
  42. Creates named socket file for communicating with qemu proxy fs driver
  43. .. option:: -u, --uid UID
  44. uid to give access to named socket file; used in combination with -g.
  45. .. option:: -g, --gid GID
  46. gid to give access to named socket file; used in combination with -u.
  47. .. option:: -n, --nodaemon
  48. Run as a normal program. By default program will run in daemon mode