TOMOYO: Avoid race when retrying "file execute" permission check.
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Sat, 10 Sep 2011 06:27:12 +0000 (15:27 +0900)
committerJames Morris <jmorris@namei.org>
Tue, 13 Sep 2011 22:27:07 +0000 (08:27 +1000)
commita8f7640963ada66c412314c3559c11ff6946c1a5
tree23d9fb5fe64bb431b610deb6c1b696356106f94d
parent731d37aa70c7b9de3be6bf2c8287366223bf5ce5
TOMOYO: Avoid race when retrying "file execute" permission check.

There was a race window that the pathname which is subjected to "file execute"
permission check when retrying via supervisor's decision because the pathname
was recalculated upon retry. Though, there is an inevitable race window even
without supervisor, for we have to calculate the symbolic link's pathname from
"struct linux_binprm"->filename rather than from "struct linux_binprm"->file
because we cannot back calculate the symbolic link's pathname from the
dereferenced pathname.

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: James Morris <jmorris@namei.org>
security/tomoyo/domain.c