[LTP] [PATCH v3 1/3] security/dirtyc0w: Fix bug caused by default umask
Xiao Yang
ice_yangxiao@163.com
Mon Mar 30 14:48:59 CEST 2020
Hi Cyril, Petr
Just one question when reviewing this patch set.
I saw the umask set(e.g. set umask to 0 or 0022) is used by a lot of tests.
Is it necessary for metadata project to introduce .needs_umask?
Thanks,
Xiao Yang
On 3/30/20 5:20 PM, Cyril Hrubis wrote:
> Hi!
>>> The case is only successful when system default umask is 0022.
>>> When default umask is 0077 or other values, should clear current umask by umask(0) in setup().
>> What exactly fails in the dirtyc0w because of non-standard umask?
>>
>> I can easily understand why fstat and statx fail, since we check the
>> file permissions there. Ideally the failure should have been part of the
>> patch description.
> Looking at the code I guess that the child fails to open the file
> created in parent before the setgid/setuid, something like this should
> really have been part of the patch description.
>
More information about the ltp
mailing list