qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kurz <groug@kaod.org>
To: Eric Blake <eblake@redhat.com>
Cc: qemu-devel@nongnu.org, Leo Gaspard <leo@gaspard.io>,
	Prasad J Pandit <prasad@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] 9pfs: local: forbid client access to metadata (CVE-2017-7493)
Date: Mon, 15 May 2017 20:43:45 +0200	[thread overview]
Message-ID: <20170515204345.62922829@bahia> (raw)
In-Reply-To: <b5fad238-40ac-7deb-e1b6-33e57c0bb117@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1418 bytes --]

On Mon, 15 May 2017 12:37:08 -0500
Eric Blake <eblake@redhat.com> wrote:

> On 05/15/2017 11:07 AM, Greg Kurz wrote:
> > When using the mapped-file security mode, we shouldn't let the client mess
> > with the metadata. The current code already tries to hide the metadata dir
> > from the client by skipping it in local_readdir(). But the client can still
> > access or modify it through several other operations. This can be used to
> > escalate privileges in the guest.
> > 
> > Affected backend operations are:
> > - local_mknod()
> > - local_mkdir()
> > - local_open2()
> > - local_symlink()
> > - local_link()
> > - local_unlinkat()
> > - local_renameat()
> > - local_rename()
> > - local_name_to_path()
> > 
> > Other operations are safe because they are only passed a fid path, which
> > is computed internally in local_name_to_path().
> > 
> > This patch converts all the functions listed above to fail and return
> > EINVAL when being passed the name of the metadata dir. This may look
> > like a poor choice for errno, but there's no such thing as an illegal
> > path name on Linux and I could not think of anything better.
> > 
> > This fixes CVE-2017-7493.
> > 
> > Reported-by: Leo Gaspard <leo@gaspard.io>
> > Signed-off-by: Greg Kurz <groug@kaod.org>
> > ---  
> 
> Reviewed-by: Eric Blake <eblake@redhat.com>
> 

Thanks again for your help.

Cheers,

--
Greg

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

      reply	other threads:[~2017-05-15 18:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-15 16:07 [Qemu-devel] [PATCH] 9pfs: local: forbid client access to metadata (CVE-2017-7493) Greg Kurz
2017-05-15 17:37 ` Eric Blake
2017-05-15 18:43   ` Greg Kurz [this message]

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=20170515204345.62922829@bahia \
    --to=groug@kaod.org \
    --cc=eblake@redhat.com \
    --cc=leo@gaspard.io \
    --cc=prasad@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).