public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Kees Cook <keescook@chromium.org>,
	Troy Kensinger <tkensinger@google.com>,
	"security@kernel.org" <security@kernel.org>,
	Paul McKenney <paulmck@linux.vnet.ibm.com>,
	Josh Triplett <josh@joshtriplett.org>,
	linux-kernel@vger.kernel.org,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] pids: make task_tgid_nr_ns() safe
Date: Mon, 21 Aug 2017 22:05:20 +0200	[thread overview]
Message-ID: <20170821200520.GB32112@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <20170821153502.GA652@redhat.com>

On Mon, Aug 21, 2017 at 05:35:02PM +0200, Oleg Nesterov wrote:
> This was reported many times, and this was even mentioned in commit
> 52ee2dfdd4f5 "pids: refactor vnr/nr_ns helpers to make them safe" but
> somehow nobody bothered to fix the obvious problem: task_tgid_nr_ns()
> is not safe because task->group_leader points to nowhere after the
> exiting task passes exit_notify(), rcu_read_lock() can not help.
> 
> We really need to change __unhash_process() to nullify group_leader,
> parent, and real_parent, but this needs some cleanups. Until then we
> can turn task_tgid_nr_ns() into another user of __task_pid_nr_ns() and
> fix the problem.
> 
> Reported-by: Troy Kensinger <tkensinger@google.com>
> Signed-off-by: Oleg Nesterov <oleg@redhat.com>

Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>

      parent reply	other threads:[~2017-08-21 20:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAMKL9z2A8VSmLc9gz4Vtd1N5nGwR5d9Mxi1Nc8VjTQKsURoMkA@mail.gmail.com>
     [not found] ` <CA+55aFyfaBZmDVSpx3F7cQZcck8u_vg53wL1ykRE-ccgrtg14w@mail.gmail.com>
     [not found]   ` <CAGXu5jKLDAnKoRg_v8Nc7s6AtQ6_QfaMtJorjFkbaX64MDHy2g@mail.gmail.com>
     [not found]     ` <CA+55aFy+0cQUcPjWmnD8qFL2gHVYHYTxJmHVy6L=Bz03KaP2Rw@mail.gmail.com>
     [not found]       ` <20170820142953.GA3767@redhat.com>
     [not found]         ` <CA+55aFzA+0jzTdknmf0OUB7WSPgAa56nqckqdz=iDmbR2P9eRw@mail.gmail.com>
2017-08-21 15:35           ` [PATCH] pids: make task_tgid_nr_ns() safe Oleg Nesterov
2017-08-21 15:36             ` perf_event_pid() (Was: [PATCH] pids: make task_tgid_nr_ns() safe) Oleg Nesterov
2017-08-21 19:18               ` Peter Zijlstra
2017-08-21 19:49             ` [PATCH] pids: make task_tgid_nr_ns() safe Linus Torvalds
2017-08-22 12:20               ` Oleg Nesterov
2017-08-21 20:05             ` Peter Zijlstra [this message]

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=20170821200520.GB32112@worktop.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=josh@joshtriplett.org \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@redhat.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=security@kernel.org \
    --cc=tkensinger@google.com \
    --cc=torvalds@linux-foundation.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox