[LTP] 答复: [PATCH v3 1/3] security/dirtyc0w: Fix bug caused by default umask

Zouwei (Samuel) zou_wei@huawei.com
Tue Mar 31 04:30:48 CEST 2020


Hi Yang and Cyril,

Thank you so much for all your suggestions.

Best Regards
Zou Wei

-----邮件原件-----
发件人: Xiao Yang [mailto:ice_yangxiao@163.com] 
发送时间: 2020年3月30日 20:34
收件人: Cyril Hrubis <chrubis@suse.cz>; Zouwei (Samuel) <zou_wei@huawei.com>
抄送: ltp@lists.linux.it
主题: Re: [LTP] [PATCH v3 1/3] security/dirtyc0w: Fix bug caused by default umask

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.
>
Hi Cyril,

Right, some default mask drop the read permission of g/o and

nobody user cannot do read. :-)

Thanks,

Xiao Yang



More information about the ltp mailing list