virtfs-proxy-helper.rst 2.2 KB

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