public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: Sridhar Samudrala <sri@us.ibm.com>,
	avi@redhat.com, markmc@redhat.com, ogerlitz@voltaire.com,
	kvm@vger.kernel.org, qemu-devel@vger.kernel.org
Subject: Re: [PATCH qemu-kvm] Add raw(af_packet) network backend to qemu
Date: Wed, 27 Jan 2010 20:12:25 +0200	[thread overview]
Message-ID: <20100127181225.GA13509@redhat.com> (raw)
In-Reply-To: <4B60799F.80708@codemonkey.ws>

On Wed, Jan 27, 2010 at 11:36:31AM -0600, Anthony Liguori wrote:
> On 01/27/2010 11:25 AM, Michael S. Tsirkin wrote:
>>>   In this case, the full
>>> syntax would be:
>>>
>>> -net vepa,if=eth0
>>>
>>> or
>>>
>>> -net vepa,fd=N
>>>      
>> I still hope it's extbridge, vepa is an acronym that will likely not be
>> known for 99% of users.
>>    
>
> Oh sorry, I don't care about the name at all.  If you prefer extbridge,  
> I'm all for it :-)
>
>>> where N is a macvtap fd.
>>>
>>> For raw, I think there's a real problem wrt security.  I think it's
>>> important that we support running qemu as a non-privileged user.  In
>>> fact, this seems to be the mode libvirt is now preferring to operate in.
>>>
>>> I think we need to re-evaluate the use of any raw socket by qemu as it's
>>> very dangerous from a security perspective (assuming we cannot
>>> introduced a "locked" raw socket mode).
>>>      
>> As was pointed out on netdev and elsewhere this seems to be what
>> namespaces/selinux are there for. Can qemu be run within a namespace and
>> if yes would that address your concerns?
>
> It's unclear to me what this would even involve.  But really, we just  
> want an interface to inject packets directly into a physical device.   

Not only. We also want to program filters by mac/vlan, enable/disable
promisc mode, set mac, maybe more, all this in response to guest
activity so it's not as trivial as doing it in a helper script.  The
patches supplied do not do this and do filtering in userspace but I
trust this is short-term.

> raw sockets give us that but it also gives us way more.  Using network  
> namespaces to restrict this is a bit convoluted.  It seems to me that  
> providing an interface that never gives us way more to start with is  
> better overall from a security perspective.

You are thinking about qemu security so custom groups and permissions on
character devices and/or suid scripts with custom configuration files
look nice to you.  But think in terms of an overall system security. If
you write custom kernel interfaces you end up with an unmanageable
security policy. And system administrator not being in control of
security policy is very bad for security.

All the above is basically repeating what others said on netdev.
If you care, pls argue on disablenetwork thread.

> Regards,
>
> Anthony Liguori
>
>>    Security is probably a wrong
>> reason to use character devices: they are much more likely to have
>> security problems than standard interfaces.  Ease of setup/compatibility
>> with tap would be a better reason.
>>
>>    
>>> Regards,
>>>
>>> Anthony Liguori
>>>
>>>      
>>>>> Regards,
>>>>>
>>>>> Anthony Liguori
>>>>>
>>>>>          

  parent reply	other threads:[~2010-01-27 18:15 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-26 20:40 [PATCH qemu-kvm] Add raw(af_packet) network backend to qemu Sridhar Samudrala
2010-01-26 20:47 ` Anthony Liguori
2010-01-26 20:50   ` Anthony Liguori
2010-01-26 23:19     ` Sridhar Samudrala
2010-01-27  9:24     ` Michael S. Tsirkin
2010-01-27  9:34       ` Arnd Bergmann
2010-01-27  9:44         ` Michael S. Tsirkin
2010-01-27 14:03           ` Anthony Liguori
2010-01-27 21:39             ` Arnd Bergmann
2010-01-27 22:56               ` Sridhar Samudrala
2010-01-28  6:06                 ` Arnd Bergmann
2010-01-28 16:53                   ` Jens Osterkamp
2010-01-28 11:22                 ` Or Gerlitz
2010-01-29 20:52                 ` Sridhar Samudrala
2010-01-27 14:07       ` Anthony Liguori
2010-01-27 16:59         ` Michael S. Tsirkin
2010-01-27 17:07           ` Anthony Liguori
2010-01-27 17:25             ` Michael S. Tsirkin
2010-01-27 17:36               ` Anthony Liguori
2010-01-27 17:54                 ` Sridhar Samudrala
2010-01-27 18:02                   ` Anthony Liguori
2010-01-27 18:03                     ` Michael S. Tsirkin
2010-01-27 19:54                       ` Anthony Liguori
2010-01-28  8:12                         ` Arnd Bergmann
2010-01-28 13:56                           ` Michael S. Tsirkin
2010-01-28 14:13                             ` Anthony Liguori
2010-01-28 14:39                               ` Anthony Liguori
2010-01-28 14:52                               ` Michael S. Tsirkin
2010-01-28 15:05                                 ` Anthony Liguori
2010-01-28 16:37                                   ` Michael S. Tsirkin
2010-01-28 17:58                                     ` Anthony Liguori
2010-01-28 18:04                                       ` Michael S. Tsirkin
2010-01-28 19:57                                         ` Anthony Liguori
2010-01-29 11:26                                           ` Michael S. Tsirkin
2010-01-28 20:29                                   ` Arnd Bergmann
2010-02-01 15:47                         ` Or Gerlitz
2010-01-27 18:12                 ` Michael S. Tsirkin [this message]
2010-01-26 23:15   ` Sridhar Samudrala
2010-01-27  0:06     ` [Qemu-devel] " Anthony Liguori
2010-01-27  6:52       ` Arnd Bergmann
2010-01-27 14:14         ` Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100127181225.GA13509@redhat.com \
    --to=mst@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=markmc@redhat.com \
    --cc=ogerlitz@voltaire.com \
    --cc=qemu-devel@vger.kernel.org \
    --cc=sri@us.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox