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] [day] [month] [year] [list]
Date:	Fri, 30 Jul 2010 18:35:44 -0500
From:	Tyler Hicks <tyhicks@...ux.vnet.ibm.com>
To:	Lino Sanfilippo <LinoSanfilippo@....de>
Cc:	kirkland@...onical.com, ecryptfs-devel@...ts.launchpad.net,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ecryptfs (repost): release reference to lower mount if
 interpose fails

On Thu Jul 29, 2010 at 01:01:36PM +0200, Lino Sanfilippo <LinoSanfilippo@....de> wrote:
> 
> In ecryptfs_lookup_and_interpose_lower() the lower mount is not decremented
> if allocation of a dentry info struct failed. As a result the lower filesystem
> cant be unmounted any more (since it is considered busy). This patch corrects
> the reference counting.
> 
> Signed-off-by: Lino Sanfilippo <LinoSanfilippo@....de>
> ---

Hi Lino,

Thanks for the fix. Applied to
git://git.kernel.org/pub/scm/linux/kernel/git/ecryptfs/ecryptfs-2.6.git#next

Tyler

> This patch is against 2.6.35-rc5.
> 
> --- a/fs/ecryptfs/inode.c	2010-07-12 23:55:33.000000000 +0200
> +++ b/fs/ecryptfs/inode.c	2010-07-19 19:21:16.000000000 +0200
> @@ -264,7 +264,7 @@ int ecryptfs_lookup_and_interpose_lower(
>  		printk(KERN_ERR "%s: Out of memory whilst attempting "
>  		       "to allocate ecryptfs_dentry_info struct\n",
>  			__func__);
> -		goto out_dput;
> +		goto out_put;
>  	}
>  	ecryptfs_set_dentry_lower(ecryptfs_dentry, lower_dentry);
>  	ecryptfs_set_dentry_lower_mnt(ecryptfs_dentry, lower_mnt);
> @@ -339,8 +339,9 @@ int ecryptfs_lookup_and_interpose_lower(
>  out_free_kmem:
>  	kmem_cache_free(ecryptfs_header_cache_2, page_virt);
>  	goto out;
> -out_dput:
> +out_put:
>  	dput(lower_dentry);
> +	mntput(lower_mnt);
>  	d_drop(ecryptfs_dentry);
>  out:
>  	return rc;
--
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