[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110828093156.GA6291@albatros>
Date: Sun, 28 Aug 2011 13:31:56 +0400
From: Vasiliy Kulikov <segoon@...nwall.com>
To: Cyrill Gorcunov <gorcunov@...il.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
kernel-hardening@...ts.openwall.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, security@...nel.org
Subject: Re: [PATCH v2] proc: fix races against execve() of /proc/PID/fd**
Hi Cyrill,
On Sun, Aug 28, 2011 at 13:25 +0400, Cyrill Gorcunov wrote:
> On Sat, Aug 27, 2011 at 11:01:47PM +0400, Vasiliy Kulikov wrote:
> ...
> >
> > +static int proc_pid_fd_link_getattr(struct vfsmount *mnt, struct dentry *dentry,
> > + struct kstat *stat)
> > +{
> > + struct inode *inode = dentry->d_inode;
> > + struct task_struct *task = get_proc_task(inode);
> > + int rc;
> > +
>
> Are we sure if the task will be always valid here?
>
> if (!task)
> return -ENOENT;
No, you're right. It needs (task == NULL) check. Thank you!
--
Vasiliy Kulikov
http://www.openwall.com - bringing security into open computing environments
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists