From: Greg Kurz <groug@kaod.org>
To: Eric Blake <eblake@redhat.com>
Cc: qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>,
Felix Wilhelm <fwilhelm@ernw.de>,
"Michael S. Tsirkin" <mst@redhat.com>, P J P <ppandit@redhat.com>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH v4 2/3] 9pfs: forbid . and .. in file names
Date: Tue, 30 Aug 2016 21:03:11 +0200 [thread overview]
Message-ID: <20160830210311.73bf7e86@bahia.lan> (raw)
In-Reply-To: <89ab411b-ef71-9521-53ec-81300ba32b2b@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1465 bytes --]
On Tue, 30 Aug 2016 13:06:31 -0500
Eric Blake <eblake@redhat.com> wrote:
> On 08/30/2016 12:13 PM, Greg Kurz wrote:
> > According to the 9P spec http://man.cat-v.org/plan_9/5/open about the
> > create request:
> >
> > The names . and .. are special; it is illegal to create files with these
> > names.
> >
> > This patch causes the create and lcreate requests to fail with EINVAL if
> > the file name is either "." or "..".
> >
> > Even if it isn't explicitly written in the spec, this patch extends the
> > checking to all requests that may cause a directory entry to be created:
> >
> > - mknod
> > - rename
> > - renameat
> > - mkdir
> > - link
> > - symlink
> >
> > The unlinkat request also gets patched for consistency (even if
> > rmdir("foo/..") is expected to fail according to POSIX.1-2001).
> >
> > The various error values come from the linux manual pages.
> >
> > Suggested-by: Peter Maydell <peter.maydell@linaro.org>
> > Signed-off-by: Greg Kurz <groug@kaod.org>
> >
> > v3: - rename and renameat now return EISDIR instead of EBUSY
>
> The v3 comment could occur after the '---' separator.
>
Yes of course. Sorry for the other patches as well :)
> > ---
> > hw/9pfs/9p.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
> > 1 file changed, 51 insertions(+)
>
> Maintainer can touch that up, then add
> Reviewed-by: Eric Blake <eblake@redhat.com>
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
next prev parent reply other threads:[~2016-08-30 19:03 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-30 17:10 [Qemu-devel] [PATCH v4 0/3] 9pfs security fixes Greg Kurz
2016-08-30 17:11 ` [Qemu-devel] [PATCH v4 1/3] 9pfs: forbid illegal path names Greg Kurz
2016-08-30 18:03 ` Eric Blake
2016-08-30 19:27 ` Greg Kurz
2016-08-31 2:42 ` Aneesh Kumar K.V
2016-08-30 17:13 ` [Qemu-devel] [PATCH v4 2/3] 9pfs: forbid . and .. in file names Greg Kurz
2016-08-30 18:06 ` Eric Blake
2016-08-30 19:03 ` Greg Kurz [this message]
2016-08-30 18:19 ` [Qemu-devel] [PATCH v4 0/3] 9pfs security fixes Michael S. Tsirkin
2016-08-30 18:29 ` Peter Maydell
2016-08-30 19:39 ` Peter Maydell
2016-08-31 9:33 ` Greg Kurz
2016-08-30 18:40 ` [Qemu-devel] [PATCH v4 3/3] 9pfs: handle walk of ".." in the root directory Greg Kurz
2016-09-15 22:22 ` Paolo Bonzini
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=20160830210311.73bf7e86@bahia.lan \
--to=groug@kaod.org \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=eblake@redhat.com \
--cc=fwilhelm@ernw.de \
--cc=mst@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=ppandit@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).