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: <20100524151445.GA6393@redhat.com>
Date:	Mon, 24 May 2010 17:14:45 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	David Howells <dhowells@...hat.com>
Cc:	Roland McGrath <roland@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Mike Frysinger <vapier@...too.org>, linux-sh@...r.kernel.org,
	Paul Mundt <lethal@...ux-sh.org>,
	uclinux-dist-devel@...ckfin.uclinux.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH -mm 1/1] ptrace: PTRACE_GETFDPIC: fix the unsafe usage
	of child->mm

On 05/24, David Howells wrote:
>
> Oleg Nesterov <oleg@...hat.com> wrote:
>
> > Now that Mike Frysinger unified the FDPIC ptrace code, we can fix
> > the unsafe usage of child->mm in ptrace_request(PTRACE_GETFDPIC).
> >
> > We have the reference to task_struct, and ptrace_check_attach()
> > verified the tracee is stopped. But nothing can protect from
> > SIGKILL after that, we must not assume child->mm != NULL.
> >
> > Signed-off-by: Oleg Nesterov <oleg@...hat.com>
>
> Acked-by: David Howells <dhowells@...hat.com>
>
> Does it make sense to move the call to get_task_mm() up to sys_ptrace() since
> several ptrace functions use it?  The mm pointer could then be handed down the
> ptrace hierarchy.

You mean, pass it to arch_ptrace() ?

grep, grep, grep. I guess I understand you. We have more unsafe code
like this in arch/*/kernel/ptrace.c. Of course, it can be fixed without
doing get_task_mm() in sys_ptrace(), but perhaps it would be more clean
to do what you suggest.

Roland, what do you think?

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