[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20101029065819.GQ19804@ZenIV.linux.org.uk>
Date: Fri, 29 Oct 2010 07:58:19 +0100
From: Al Viro <viro@...IV.linux.org.uk>
To: Miklos Szeredi <miklos@...redi.hu>
Cc: akpm@...ux-foundation.org, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] vfs: fix possible use after free in finish_open()
On Tue, Oct 26, 2010 at 12:28:48PM +0200, Miklos Szeredi wrote:
> Oops, broken patch. Here's the correct one.
>
> ----
> Subject: vfs: fix possible use after free in finish_open()
>
> From: Miklos Szeredi <mszeredi@...e.cz>
>
> In finish_open() nd->path is used after nameidata_to_filp() already
> released it. Fix by acquiring a ref to nd->path and releasing after
> the last use.
Nice catch, but I'd do it differently; that is, do not drop reference
in nameidata_to_filp() (and dup it if we do __dentry_open()) and drop
it in callers instead. Will push in a few.
--
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