Re: [PATCH 1/3] set_dumpable: fix the theoretical race with itself

2013-11-18 Thread Kees Cook
On Sat, Nov 16, 2013 at 11:01 AM, Oleg Nesterov wrote: > set_dumpable() updates MMF_DUMPABLE_MASK in a non-trivial way to > ensure that get_dumpable() can't observe the intermediate state, > but this all can't help if multiple threads call set_dumpable() > at the same time. > > And in theory commi

[PATCH 1/3] set_dumpable: fix the theoretical race with itself

2013-11-16 Thread Oleg Nesterov
set_dumpable() updates MMF_DUMPABLE_MASK in a non-trivial way to ensure that get_dumpable() can't observe the intermediate state, but this all can't help if multiple threads call set_dumpable() at the same time. And in theory commit_creds()->set_dumpable(SUID_DUMP_ROOT) racing with sys_prctl()->se