qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] linux-user: Use *at functions to implement inte


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH] linux-user: Use *at functions to implement interp_prefix
Date: Tue, 13 Feb 2018 09:22:06 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 02/13/2018 08:50 AM, Peter Maydell wrote:
> On 13 February 2018 at 16:43, Peter Maydell <address@hidden> 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~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]