|
Message-ID: <20111119165903.GB2208@openwall.com> Date: Sat, 19 Nov 2011 20:59:03 +0400 From: Solar Designer <solar@...nwall.com> To: kernel-hardening@...ts.openwall.com Cc: Kees Cook <keescook@...omium.org>, linux-kernel@...r.kernel.org, linux-security-module@...r.kernel.org Subject: Re: [PATCH 3/3] security: Yama: add ptrace relationship tracking interface On Sat, Nov 19, 2011 at 08:30:58PM +0400, Vasiliy Kulikov wrote: > On Wed, Oct 26, 2011 at 16:49 -0700, Kees Cook wrote: > > + if (mode == PTRACE_MODE_ATTACH && > > + ptrace_scope && > > + !capable(CAP_SYS_PTRACE) && > > + !task_is_descendant(current, child) && > > + !ptracer_exception_found(current, child)) > > + rc = -EPERM; > > capable() is better to put after all other tests Right, but... > as a failed capable() > might emit a false positive warning into logs or something. ...primarily for another reason: a successful capable() sets PF_SUPERPRIV, whereas the permission might have been granted without capable() as well. The PF_SUPERPRIV flag is visible via BSD process accounting. Alexander
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.