Re: need opendir_safer, dirent--.h

View: New views
2 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: need opendir_safer, dirent--.h

by James Youngman-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Sep 1, 2009 at 6:26 PM, Eric Blake <ebb9@...> wrote:

> Eric Blake <ebb9 <at> byu.net> writes:
>
>> > I think we need to implement opendir_safer, alongside all the other
>> > *_safer modules.  Otherwise, opendir can end up placing an open directory
>> > fd in one of the standard slots, and end up interfering with the intent of
>> > all the other *_safer wrappers.
>>
>> And here's at least one use case where it matters:
>>
>> $ find dir -mindepth 1 -ok echo {} \; <&-
>> < echo ... dir/sub > ?
>> $ echo $?
>> 0
>
> Here's the preliminary patch series, to be applied on top of my
> fchdir/fdopendir series.  However, since we are also lacking openat_safer, it
> looks like fts will STILL pollute the standard fds.  I'll have to add in
> another patch for openat-safer, then test with findutils, before calling this
> series ready for prime-time.

(Picking up a discussion from some time back)

How did this turn out?

Thanks,
James.



Re: need opendir_safer, dirent--.h

by Eric Blake :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to James Youngman on 11/8/2009 2:59 PM:
>> Here's the preliminary patch series, to be applied on top of my
>> fchdir/fdopendir series.  However, since we are also lacking openat_safer, it
>> looks like fts will STILL pollute the standard fds.  I'll have to add in
>> another patch for openat-safer, then test with findutils, before calling this
>> series ready for prime-time.
>
> (Picking up a discussion from some time back)
>
> How did this turn out?

They're all implemented, but still undergoing some minor tweaks (for
example, Jim and I are trying to do an off-list resolution for a potential
security hole in FreeBSD, where actions in a user-space app can crash the
kernel, and which were exposed by my openat effort).

Meanwhile, I created two findutils patches to track the issue:
https://savannah.gnu.org/bugs/?27369
https://savannah.gnu.org/bugs/?27375

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkr3T+0ACgkQ84KuGfSFAYD8vgCgiQSeD8KlR7hIUbGQ60PVy5dE
IacAoKE6mbIshIVcr6J0tSq4NNLgt9+d
=vsYs
-----END PGP SIGNATURE-----