All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <levinsasha928@gmail.com>
To: kvm <kvm@vger.kernel.org>
Subject: KVM device assignment and user privileges
Date: Sun, 20 Nov 2011 16:58:32 +0200	[thread overview]
Message-ID: <1321801112.3231.8.camel@lappy> (raw)

Hi all,

I've been working on adding device assignment to KVM tools, and started
with the basics of just getting a device assigned using the
KVM_ASSIGN_PCI_DEVICE ioctl.

What I've figured is that unprivileged users can request any PCI device
to be assigned to him, including devices which he shouldn't be touching.

In my case, it happened with the VGA card, where an unprivileged user
simply called KVM_ASSIGN_PCI_DEVICE with the bus, seg and fn of the VGA
card and caused the display on the host to go apeshit.

Was it supposed to work this way? I couldn't find any security checks in
the code paths of KVM_ASSIGN_PCI_DEVICE and it looks like any user can
invoke it with any parameters he'd want - enabling him to kill the host.

-- 

Sasha.


             reply	other threads:[~2011-11-20 15:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-20 14:58 Sasha Levin [this message]
2011-11-20 15:15 ` KVM device assignment and user privileges Avi Kivity
2011-11-21  4:42   ` Chris Wright
2011-11-21  8:32     ` Avi Kivity

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=1321801112.3231.8.camel@lappy \
    --to=levinsasha928@gmail.com \
    --cc=kvm@vger.kernel.org \
    /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 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.