* [PATCH 0/2] pids: initial fixes, unsafe dereference of the special pids
@ 2008-03-24 18:36 Oleg Nesterov
0 siblings, 0 replies; only message in thread
From: Oleg Nesterov @ 2008-03-24 18:36 UTC (permalink / raw)
To: Andrew Morton
Cc: Eric W. Biederman, Pavel Emelyanov, Roland McGrath, linux-kernel
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.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-03-24 18:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-24 18:36 [PATCH 0/2] pids: initial fixes, unsafe dereference of the special pids Oleg Nesterov
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®