From: Richard Henderson <richard.henderson@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>, Eric Blake <eblake@redhat.com>
Cc: Richard Henderson <rth@twiddle.net>,
QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] linux-user: Use *at functions to implement interp_prefix
Date: Tue, 13 Feb 2018 09:22:06 -0800 [thread overview]
Message-ID: <0d1c9458-0ab9-cb9e-aee4-9e70f16c9c03@linaro.org> (raw)
In-Reply-To: <CAFEAcA_NXwhfJjJnihZdCHAL7A-ZntuNDgrpPkQQDycuMOkdgw@mail.gmail.com>
On 02/13/2018 08:50 AM, Peter Maydell wrote:
> On 13 February 2018 at 16:43, Peter Maydell <peter.maydell@linaro.org> wrote:
>> OTOH, maybe we should just go ahead without weird games with dup2 and
>> see whether any real code gets confused...
>
> Here's some real-world code that would break with this patch
> as it stands, though dup2 games wouldn't be the fix in this case:
> https://github.com/xinetd-org/xinetd/blob/master/xinetd/init.c#L79
>
> (it iterates through all fds above 2 closing them, and we don't
> protect against the guest being able to perform syscalls on
> interp_dirfd)
Hmm. I suppose we could maintain a fd_set of valid guest fd's, and check every
guest operation vs that set. Or special-case interp_dirfd with EBADF.
Thoughts before I attempt either?
r~
prev parent reply other threads:[~2018-02-13 17:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-28 22:15 [Qemu-devel] [PATCH] linux-user: Use *at functions to implement interp_prefix Richard Henderson
2018-01-28 22:20 ` no-reply
2018-02-13 12:12 ` Peter Maydell
2018-02-13 15:31 ` Richard Henderson
2018-02-13 16:38 ` Eric Blake
2018-02-13 16:43 ` Peter Maydell
2018-02-13 16:50 ` Peter Maydell
2018-02-13 17:22 ` Richard Henderson [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=0d1c9458-0ab9-cb9e-aee4-9e70f16c9c03@linaro.org \
--to=richard.henderson@linaro.org \
--cc=eblake@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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).