|
Message-ID: <20110902164841.GA3818@albatros> Date: Fri, 2 Sep 2011 20:48:41 +0400 From: Vasiliy Kulikov <segooon@...il.com> To: Andrew Morton <akpm@...ux-foundation.org> Cc: kernel-hardening@...ts.openwall.com, Cyrill Gorcunov <gorcunov@...il.com>, Al Viro <viro@...iv.linux.org.uk>, David Rientjes <rientjes@...gle.com>, Stephen Wilson <wilsons@...rt.ca>, KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>, linux-kernel@...r.kernel.org Subject: proc: fix task_struct leak in proc_pid_fd_link_getattr() 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@...nwall.com> Reported-by: Cyrill Gorcunov <gorcunov@...il.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
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.