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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAGXu5j+Tk5hXUW6ox9Ubv-UH--3YByQw16j-9J55Fs8-kPROuA@mail.gmail.com>
Date:	Wed, 4 May 2016 10:22:52 -0700
From:	Kees Cook <keescook@...omium.org>
To:	Sasha Levin <sasha.levin@...cle.com>
Cc:	James Morris <james.l.morris@...cle.com>,
	"Serge E. Hallyn" <serge@...lyn.com>,
	linux-security-module <linux-security-module@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Yama: use atomic allocations when reporting

On Wed, May 4, 2016 at 7:18 AM, Sasha Levin <sasha.levin@...cle.com> wrote:
> Access reporting often happens from atomic contexes. Avoid
> lockups when allocating memory for command lines.
>
> Fixes: 8a56038c2ae ("Yama: consolidate error reporting")
> Signed-off-by: Sasha Levin <sasha.levin@...cle.com>

Thanks for catching this! Applied.

-Kees

> ---
>  security/yama/yama_lsm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/security/yama/yama_lsm.c b/security/yama/yama_lsm.c
> index c19f6e5..9b756b1 100644
> --- a/security/yama/yama_lsm.c
> +++ b/security/yama/yama_lsm.c
> @@ -47,8 +47,8 @@ static void report_access(const char *access, struct task_struct *target,
>  {
>         char *target_cmd, *agent_cmd;
>
> -       target_cmd = kstrdup_quotable_cmdline(target, GFP_KERNEL);
> -       agent_cmd = kstrdup_quotable_cmdline(agent, GFP_KERNEL);
> +       target_cmd = kstrdup_quotable_cmdline(target, GFP_ATOMIC);
> +       agent_cmd = kstrdup_quotable_cmdline(agent, GFP_ATOMIC);
>
>         pr_notice_ratelimited(
>                 "ptrace %s of \"%s\"[%d] was attempted by \"%s\"[%d]\n",
> --
> 1.9.1
>



-- 
Kees Cook
Chrome OS & Brillo Security

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ