All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Michael Roth <mdroth@linux.vnet.ibm.com>
Cc: aliguori@linux.vnet.ibm.com, lcapitulino@redhat.com,
	agl@linux.vnet.ibm.com, qemu-devel@nongnu.org,
	Jes.Sorensen@redhat.com
Subject: Re: [Qemu-devel] [PATCH v4][ 5/7] guest agent: add guest agent RPCs/commands
Date: Sat, 04 Jun 2011 13:08:24 -0700	[thread overview]
Message-ID: <m2tyc5s6kn.fsf@firstfloor.org> (raw)
In-Reply-To: <1307141286-9392-6-git-send-email-mdroth@linux.vnet.ibm.com> (Michael Roth's message of "Fri, 3 Jun 2011 17:48:04 -0500")

Michael Roth <mdroth@linux.vnet.ibm.com> writes:
> +
> +int64_t qmp_guest_file_open(const char *filename, const char *mode, Error **err)
> +{
> +    FILE *fh;
> +    int fd, ret;
> +    int64_t id = -1;
> +
> +    if (!logging_enabled()) {
> +        error_set(err, QERR_QGA_LOGGING_FAILED);
> +        goto out;
> +    }
> +    slog("guest-file-open called, filename: %s, mode: %s", filename, mode);
> +    fh = fopen(filename, mode);
> +    if (!fh) {
> +        error_set(err, QERR_OPEN_FILE_FAILED, filename);
> +        goto out;
> +    }

Does this really allow a guest to open any host file ?!?
Have you considered all the security implications of that?

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only

  reply	other threads:[~2011-06-04 20:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-03 22:47 [Qemu-devel] [QAPI+QGA 3/3] QEMU Guest Agent (virtagent) v4 Michael Roth
2011-06-03 22:48 ` [Qemu-devel] [PATCH v4][ 1/7] guest agent: worker thread class Michael Roth
2011-06-07 19:11   ` Anthony Liguori
2011-06-03 22:48 ` [Qemu-devel] [PATCH v4][ 2/7] guest agent: command state class Michael Roth
2011-06-03 22:48 ` [Qemu-devel] [PATCH v4][ 3/7] guest agent: qemu-ga daemon Michael Roth
2011-06-03 22:48 ` [Qemu-devel] [PATCH v4][ 4/7] guest agent: add error class for QERR_QGA_LOGGING_FAILED Michael Roth
2011-06-03 22:48 ` [Qemu-devel] [PATCH v4][ 5/7] guest agent: add guest agent RPCs/commands Michael Roth
2011-06-04 20:08   ` Andi Kleen [this message]
2011-06-04 22:29     ` Anthony Liguori
2011-06-03 22:48 ` [Qemu-devel] [PATCH v4][ 6/7] guest agent: add guest agent commands schema file Michael Roth
2011-06-03 22:48 ` [Qemu-devel] [PATCH v4][ 7/7] guest agent: Makefile, build qemu-ga Michael Roth

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=m2tyc5s6kn.fsf@firstfloor.org \
    --to=andi@firstfloor.org \
    --cc=Jes.Sorensen@redhat.com \
    --cc=agl@linux.vnet.ibm.com \
    --cc=aliguori@linux.vnet.ibm.com \
    --cc=lcapitulino@redhat.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.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.