All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Dike <jdike@addtoit.com>
To: Joris van Rantwijk <jorispubl@xs4all.nl>
Cc: linux-kernel@vger.kernel.org,
	Pekka Enberg <penberg@cs.helsinki.fi>,
	Thorsten Knabe <linux@thorsten-knabe.de>,
	Roland McGrath <roland@redhat.com>
Subject: Re: BUG: Linux 2.6.25 ptrace leaks struct_task
Date: Fri, 27 Jun 2008 16:00:50 -0400	[thread overview]
Message-ID: <20080627200050.GA10859@c2.user-mode-linux.org> (raw)
In-Reply-To: <20080627183045.GA18801@xs4all.nl>

On Fri, Jun 27, 2008 at 08:30:45PM +0200, Joris van Rantwijk wrote:
> I think sys32_ptrace() is leaking struct_task.
> 
> In arch/x86/kernel/ptrace.c, function sys32_ptrace(), there
> is a call to ptrace_get_task_struct(). In some cases (such as
> PTRACE_GETREGS), there is no matching call to put_task_struct().

Yup, good diagnosis.  The culprit is
5a4646a4efed8c835f76c3b88f3155f6ab5b8d9b.  Doing an s/return /ret = /
inside that switch should fix the bug.

It looks like it's since been fixed in mainline by the restructuring
done in 562b80bafffaf42a6d916b0a2ee3d684220a1c10.

			Jeff

-- 
Work email - jdike at linux dot intel dot com

  reply	other threads:[~2008-06-27 20:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-27 18:30 BUG: Linux 2.6.25 ptrace leaks struct_task Joris van Rantwijk
2008-06-27 20:00 ` Jeff Dike [this message]
2008-06-27 20:17   ` Roland McGrath
2008-06-27 20:18   ` [PATCH 2.6.25-stable] x86_64 ptrace: fix sys32_ptrace task_struct leak Roland McGrath
2008-06-27 20:48   ` Roland McGrath

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080627200050.GA10859@c2.user-mode-linux.org \
    --to=jdike@addtoit.com \
    --cc=jorispubl@xs4all.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@thorsten-knabe.de \
    --cc=penberg@cs.helsinki.fi \
    --cc=roland@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.