Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 11 Mar 2024 13:39:22 -0700
From: enh <enh@...gle.com>
To: sjf5462@....edu
Cc: Rich Felker <dalias@...c.org>, Andreas Schwab <schwab@...e.de>, Alejandro Colomar <alx@...nel.org>, 
	Thorsten Glaser <tg@...bsd.de>, musl@...ts.openwall.com, NRK <nrk@...root.org>, 
	Guillem Jover <guillem@...rons.org>, libc-alpha@...rceware.org, 
	libbsd@...ts.freedesktop.org, "Serge E. Hallyn" <serge@...lyn.com>, 
	Iker Pedrosa <ipedrosa@...hat.com>, Christian Brauner <christian@...uner.io>
Subject: Re: Re: Tweaking the program name for <err.h> functions

On Mon, Mar 11, 2024 at 1:09 PM Skyler Ferrante (RIT Student)
<sjf5462@....edu> wrote:
>
> Yup, I agree. My confusion was from an incorrect assumption that
> non-suid / suid programs would be handled the same way. I knew that
> strace wouldn't keep it setuid by I didn't realize glibc only checked
> closed fds for suid programs (which makes sense, this doesn't matter
> for non-privileged programs).
>
> > application erroneously closes fd 2
>
> And hopefully no program does that, and if it does, that's their fault :)

programs get confused about fds and close the wrong ones all the time.
the fd equivalent of a malloc() double-free especially. bionic has a
fairly general protection against this class of error:
https://android.googlesource.com/platform/bionic/+/master/docs/fdsan.md

(fork() children do it on purpose all the time too :-) )

> Skyler

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.