All of lore.kernel.org
 help / color / mirror / Atom feed
* [Virtio-fs] [RFC] About non-root virtiofsd(1) process
@ 2021-01-14  8:41 P J P
  2021-01-14 10:08 ` Dr. David Alan Gilbert
  2021-01-14 13:34 ` Stefan Hajnoczi
  0 siblings, 2 replies; 12+ messages in thread
From: P J P @ 2021-01-14  8:41 UTC (permalink / raw)
  To: virtio-fs

   Hello,

* Recently I realised that virtiofsd(1) process does not drop its 'root'
   privileges while sharing host directory tree with a guest VM.

   Libvirtd(8) generally starts a guest VM with non-root system user (ex. qemu)
   privileges. If virtiofsd(1) has 'root' privileges, that makes it an
   accomplice in a potential guest-to-host privilege escalation scenario. Which
   is not good.

* IMHO, ideally virtiofsd(1) should not run with 'root' privileges at all.

* But If it has to, then atleast all default configuration settings must be
   utmost strict and restrictive as possible. Ex. By default offer only read
   access to guest VM.

* Another option is for root virtiofsd(1) process to fork a sub-process which
   will run with non-root (ex. qemu) system user privileges.

    - All file I/O operations for sharing a host directory with a guest are
      performed by the sub-process with non-root system user privileges.

    - Sub-process shall talk to the parent virtiofsd(1) process only when
      privileged operation/assistance is required.

   Ex. https://www.nginx.com/blog/inside-nginx-how-we-designed-for-performance-scale/

...wdyt?

Thank you.
--
Prasad J Pandit / Red Hat Product Security Team
8685 545E B54C 486B C6EB 271E E285 8B5A F050 DE8D


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-02-16 14:39 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-14  8:41 [Virtio-fs] [RFC] About non-root virtiofsd(1) process P J P
2021-01-14 10:08 ` Dr. David Alan Gilbert
2021-01-14 13:10   ` P J P
2021-01-14 13:34 ` Stefan Hajnoczi
2021-01-15  7:09   ` P J P
2021-01-18 16:55     ` Stefan Hajnoczi
2021-01-19 14:34       ` P J P
2021-01-20  5:49         ` Chirantan Ekbote
2021-01-20 16:21           ` Stefan Hajnoczi
2021-02-16 14:39           ` Vivek Goyal
2021-01-20 16:20         ` Stefan Hajnoczi
2021-02-16 14:36         ` Vivek Goyal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.