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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141224180654.GA11973@redhat.com>
Date:	Wed, 24 Dec 2014 19:06:54 +0100
From:	Oleg Nesterov <oleg@...hat.com>
To:	Stijn Volckaert <Stijn.Volckaert@...s.ugent.be>
Cc:	Roland McGrath <roland@...k.frob.com>,
	Kees Cook <keescook@...omium.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC] Allow introspection to already attached ptracer in
	__ptrace_may_access

On 12/24, Stijn Volckaert wrote:
>
> The question now is whether or not it's the security module's
> responsibility to check whether a tracee relationship is already in
> place or if ptrace itself should do it.

Honestly, I have no idea

> --- a/kernel/ptrace.c	2014-12-24 13:53:23.055346526 +0100
> +++ b/kernel/ptrace.c	2014-12-24 14:17:20.617824840 +0100
> @@ -232,6 +232,9 @@ static int __ptrace_may_access(struct ta
>  	/* Don't let security modules deny introspection */
>  	if (same_thread_group(task, current))
>  		return 0;
> +	/* Don't deny introspection to already attached ptracer */
> +	if (!ptrace_check_attach(task, true))
> +	        return 0;

Perhaps this makes sense, probably security checks do not make sense
if the target is traced.

But in this case I'd suggest to simply

	if (ptrace_parent(task) == current)
		return 0;


Oleg.

--
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