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

Re: [Full-disclosure] rPSA-2007-0212-1 util-linux



On Fri, Oct 12, 2007 at 05:02:48AM -0700, Andrew Farmer wrote:
> On 12 Oct 07, at 01:34, yearsilent wrote:
> > could anybody explain this bug?
> >
> >   I saw the git diff:
> >
> >
> >   -                               setuid(getuid());
> >   -                               setgid(getgid());
> >   +                               if(setgid(getgid()) < 0)
> >   +                                       die(EX_FAIL, _("umount:  
> > cannot set group id: %s"), strerror(errno));
> >   +
> >   +                               if(setuid(getuid()) < 0)
> >   +                                       die(EX_FAIL, _("umount:  
> > cannot set user id: %s"), strerror(errno));
> >   +
> >
> >
> > not only root can do mount ? what condition could cause setuid  
> > failed ?
> 
> setuid() fails if the operation would create more processes owned by  
> the target user than the number specified by that user's process- 
> count limit.

Please also look closer and see the switch of the order of the setuid()
and setgid() call to the correct order.

CIao, Marcus

_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/