lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4C20ABC0.5050908@nokia.com>
Date:	Tue, 22 Jun 2010 15:25:36 +0300
From:	Dmitry Kasatkin <dmitry.kasatkin@...ia.com>
To:	ext Kees Cook <kees.cook@...onical.com>
CC:	Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
	"linux-security-module@...r.kernel.org" 
	<linux-security-module@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>
Subject: Re: [PATCH] security: Yama LSM

Hi,

What is YAMA?
Where is the tree?

Thanks,
Dmitry


On 22/06/10 04:14, ext Kees Cook wrote:
> Hi Tetsuo,
>
> On Tue, Jun 22, 2010 at 09:28:37AM +0900, Tetsuo Handa wrote:
>   
>> Kees Cook wrote:
>>     
>>> +       /* require ptrace target be a child of ptracer on attach */
>>> +       if (mode == PTRACE_MODE_ATTACH && ptrace_scope &&
>>> +           !capable(CAP_SYS_PTRACE)) {
>>> +               struct task_struct *walker = child;
>>> +
>>> +               read_lock(&tasklist_lock);
>>>       
>> Holding tasklist_lock does not imply rcu protection.
>> Don't you need rcu_read_lock() like setpriority() and getppid()?
>>     
> You're totally right, thanks for the catch!  Looks like setpriority() does
> a similar kind of thing, so I've wrapped the whole thing in rcu_ now:
>
> ...
> +               rcu_read_lock();
>                 read_lock(&tasklist_lock);
>                 while (walker->pid > 0) {
> ...
>                         rc = -EPERM;
>                 read_unlock(&tasklist_lock);
> +               rcu_read_unlock();
> ...
>
>
> -Kees
>
>   
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ