* proc: fix task_struct leak in proc_pid_fd_link_getattr()
@ 2011-09-02 16:48 Vasiliy Kulikov
0 siblings, 0 replies; only message in thread
From: Vasiliy Kulikov @ 2011-09-02 16:48 UTC (permalink / raw)
To: Andrew Morton
Cc: kernel-hardening, Cyrill Gorcunov, Al Viro, David Rientjes,
Stephen Wilson, KOSAKI Motohiro, linux-kernel
In the patch "proc: fix races against execve() of /proc/PID/fd**"
proc_pid_fd_link_getattr() leaked task_struct if ptrace check fails.
Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Reported-by: Cyrill Gorcunov <gorcunov@gmail.com>
--
fs/proc/base.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/proc/base.c b/fs/proc/base.c
index b65bd88..d44c701 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -1681,9 +1681,9 @@ static int proc_pid_fd_link_getattr(struct vfsmount *mnt, struct dentry *dentry,
generic_fillattr(inode, stat);
unlock_trace(task);
- put_task_struct(task);
rc = 0;
out_task:
+ put_task_struct(task);
return rc;
}
--
Vasiliy
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-09-02 16:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-02 16:48 proc: fix task_struct leak in proc_pid_fd_link_getattr() Vasiliy Kulikov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox