[Mesa-dev] [PATCH 6/7] mesa: Skip looking at debug environment variables when setuid.

Kenneth Graunke kenneth at whitecape.org
Tue Mar 20 15:40:23 PDT 2012


On 03/20/2012 03:23 PM, Eric Anholt wrote:
> On Thu, 8 Mar 2012 13:37:46 -0800 (PST), Jose Fonseca<jfonseca at vmware.com>  wrote:
>> FWIW, I think that debug builds of Mesa should allow debugging options
>> all the time. Secure installs should use release builds.
>>
>> The added code lines are not portable, so they need to be compiled
>> conditionally . At least #if !defined(_WIN32) ... #endif .
>
> I see plenty of recommendations in google that people compile with
> --enable-debug, and optional package repositories that mention turning
> it on.  I don't think we should give those people security issues.

I agree with Eric---I don't think it's wise to let normal users be able 
to make the setuid X server write misc. files.  Yes, installing in 
release mode should mitigate this, but debug mode is pretty common.  I'd 
rather err on the side of caution.

Perhaps add a _mesa_is_setuid() function that does getuid() != geteuid() 
on Linux and return 0 on Windows?


More information about the mesa-dev mailing list