On Thu, Jul 18, 2019 at 09:41:15PM +0000, Brooks Davis wrote:
> On Thu, Jul 18, 2019 at 09:33:56PM +0000, Brooks Davis wrote:
> > Author: brooks
> > Date: Thu Jul 18 21:33:55 2019
> > New Revision: 350116
> > URL: https://svnweb.freebsd.org/changeset/base/350116

> > Log:
> >   Document that setmode(3) is not thread safe.

> >   In some circumstances, setmode(3) may call umask(2) twice to retrieve
> >   the current mode and then restore it.  Between calls, the process will
> >   have a umask of 0.

> This race isn't especially serious, since it only occurs when
> security.bsd.unprivileged_proc_debug=0, but it's probably something to
> fix.  The easiest solution would probably be to implement a getumask()
> syscall.

Or make the KERN_PROC_UMASK sysctl work on the process itself even if
security.bsd.unprivileged_proc_debug=0. This security sysctl is
currently also lowering security.

-- 
Jilles Tjoelker
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to