lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140131155253.25a72413@tlielax.poochiereds.net>
Date:	Fri, 31 Jan 2014 15:52:53 -0500
From:	Jeff Layton <jlayton@...hat.com>
To:	Oleg Drokin <green@...uxhacker.ru>
Cc:	linux-kernel@...r.kernel.org, viro@...iv.linux.org.uk,
	linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH] Fix mountpoint reference leakage in linkat

On Fri, 31 Jan 2014 15:41:58 -0500
Oleg Drokin <green@...uxhacker.ru> wrote:

> Recent changes to retry on ESTALE in linkat
> (commit 442e31ca5a49e398351b2954b51f578353fdf210)
> introduced a mountpoint reference leak and a small memory
> leak in case a filesystem link operation returns ESTALE
> which is pretty normal for distributed filesystems like
> lustre, nfs and so on.
> Free old_path in such a case.
> 
> Signed-off-by: Oleg Drokin: <green@...uxhacker.ru>
> ---
>  fs/namei.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/namei.c b/fs/namei.c
> index bcb838e..e620937 100644
> --- a/fs/namei.c
> +++ b/fs/namei.c
> @@ -3931,6 +3931,7 @@ out_dput:
>  			goto retry;
>  	}
>  	if (retry_estale(error, how)) {
> +		path_put(&old_path);
>  		how |= LOOKUP_REVAL;
>  		goto retry;
>  	}

Nice catch. This should probably also go to stable as well...

Reviewed-by: Jeff Layton <jlayton@...hat.com>
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ