From: Eric Blake <eblake@redhat.com>
To: Greg Kurz <groug@kaod.org>
Cc: qemu-devel@nongnu.org, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Subject: Re: [Qemu-devel] [PATCH] 9pfs: fix vulnerability in openat_dir() and local_unlinkat_common()
Date: Sat, 4 Mar 2017 09:17:25 -0600 [thread overview]
Message-ID: <25006c6b-915c-a0a0-a85a-89cee74e0ed4@redhat.com> (raw)
In-Reply-To: <20170304122139.63796173@bahia.lan>
[-- Attachment #1: Type: text/plain, Size: 734 bytes --]
On 03/04/2017 05:21 AM, Greg Kurz wrote:
> On Fri, 3 Mar 2017 17:43:49 -0600
> Eric Blake <eblake@redhat.com> wrote:
>
> It is acceptable to ignore O_PATH here because we have O_DIRECTORY, and
> we know openat_dir() will hence fail. But this code sits in a header
> file, and we probably don't want O_PATH to be silently converted to 0 in
> other potential cases where it is used without O_DIRECTORY.
>
> I'd rather do something like the following then:
>
> #ifdef O_PATH
> #define OPENAT_DIR_O_PATH O_PATH
> #else
> #define OPENAT_DIR_O_PATH 0
> #endif
>
> Makes sense ?
Yes, that's reasonable.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
prev parent reply other threads:[~2017-03-04 15:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-03 17:25 [Qemu-devel] [PATCH] 9pfs: fix vulnerability in openat_dir() and local_unlinkat_common() Greg Kurz
2017-03-03 17:28 ` Daniel P. Berrange
2017-03-03 17:54 ` Mark Cave-Ayland
2017-03-03 19:04 ` Greg Kurz
2017-03-03 18:14 ` Eric Blake
2017-03-03 19:08 ` Greg Kurz
2017-03-03 23:43 ` Eric Blake
2017-03-04 11:21 ` Greg Kurz
2017-03-04 13:55 ` Mark Cave-Ayland
2017-03-04 15:17 ` Eric Blake [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=25006c6b-915c-a0a0-a85a-89cee74e0ed4@redhat.com \
--to=eblake@redhat.com \
--cc=groug@kaod.org \
--cc=mark.cave-ayland@ilande.co.uk \
--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).