[PATCH] Overhaul __libc_check_standard_fds and correct open modes.

Florian Weimer fweimer@redhat.com
Mon Apr 16 07:16:00 GMT 2018


On 04/15/2018 12:31 AM, Zack Weinberg wrote:
> This strikes me as unwise.  The whole point of
> this function is to backstop insufficiently defensively programmed
> suid executables.  If they're not themselves taking precautions
> against fds 0, 1, and 2 being closed, why do we believe they are
> checking for the unusual errors that will occur as a result of fd 0
> being open O_WRONLY, and so on?

These defensive descriptors could be inherited by child processes, which 
perform such checking.

Thanks,
Florian



More information about the Libc-alpha mailing list