[PATCH] Declare set*id with warn_unused_result

Florian Weimer fweimer@redhat.com
Wed Aug 1 16:15:00 GMT 2012


On 07/30/2012 03:08 PM, Florian Weimer wrote:
> On 07/24/2012 06:08 PM, Mike Frysinger wrote:
>> On Tuesday 24 July 2012 07:58:28 Florian Weimer wrote:
>>> On Linux (except very current versions without funky security modules),
>>> set*uid can fail with EAGAIN when RLIMIT_NPROC would be exceeded.
>>> Missing return value checks are known to result in privilege escalation
>>> vulnerabilities.  It is a common coding error to call setuid before
>>> setgid, so that the setgid fails, and checking for the setgid result
>>> should prevent this mistake from going unnoticed.  Therefore, I think it
>>> makes sense to add the attribute to both groups of functions.
>>
>> SGTM
>
> Okay.  I plan to commit this change on Wednesday, unless there is more
> feedback.

I've committed this change.

-- 
Florian Weimer / Red Hat Product Security Team



More information about the Libc-alpha mailing list