From: Oleg Nesterov <oleg@tv-sign.ru>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
Pavel Emelyanov <xemul@openvz.org>,
Roland McGrath <roland@redhat.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 0/2] pids: initial fixes, unsafe dereference of the special pids
Date: Mon, 24 Mar 2008 21:36:03 +0300 [thread overview]
Message-ID: <20080324183603.GA9644@tv-sign.ru> (raw)
Without rcu ot tasklist lock held, it is not safe to dereference the
result of task_session/task_pgrp. Even if the task == current.
Because we can race with another thread doing setpgrp/setsid, and use
the already freed/reused/unmapped memory if preempted.
The problem is old, surprisingly it wasn't noticed before. Fortunately
it is not very serious.
We have a lot of users which should be fixed. This series only fixes
sys_getsid/sys_getpgid syscalls.
Perhaps we can (should) add rcu lock/unlock to task_xxx_vnr(), but I'm
not sure. In any case, I think it is good to factor out pid_vnr() calls
like these patches do.
Oleg.
reply other threads:[~2008-03-24 18:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20080324183603.GA9644@tv-sign.ru \
--to=oleg@tv-sign.ru \
--cc=akpm@linux-foundation.org \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.org \
--cc=roland@redhat.com \
--cc=xemul@openvz.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
all inboxes | Powered by JetHome®