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]
Date:	Thu, 22 Dec 2011 08:26:30 -0500
From:	Mimi Zohar <zohar@...ux.vnet.ibm.com>
To:	Dmitry Kasatkin <dmitry.kasatkin@...el.com>
Cc:	linux-fsdevel@...r.kernel.org,
	linux-security-module@...r.kernel.org, akpm@...ux-foundation.org,
	viro@...iv.linux.org.uk, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 1/1] vfs: iversion truncate bug fix

On Thu, 2011-12-22 at 12:54 +0200, Dmitry Kasatkin wrote:
> When a file is truncated with truncate()/ftruncate() and then closed,
> iversion is not updated. This patch uses ATTR_SIZE flag as an indication
> to increment iversion.
> 
> Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@...el.com>

Acked-by: Mimi Zohar <zohar@...ibm.com> 
(Stable should be cc'ed on this patch.)

thanks,

Mimi

> ---
>  fs/attr.c |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/attr.c b/fs/attr.c
> index 7ee7ba4..b8f55c4 100644
> --- a/fs/attr.c
> +++ b/fs/attr.c
> @@ -176,6 +176,11 @@ int notify_change(struct dentry * dentry, struct iattr * attr)
>  			return -EPERM;
>  	}
> 
> +	if ((ia_valid & ATTR_SIZE) && IS_I_VERSION(inode)) {
> +		if (attr->ia_size != inode->i_size)
> +			inode_inc_iversion(inode);
> +	}
> +
>  	if ((ia_valid & ATTR_MODE)) {
>  		mode_t amode = attr->ia_mode;
>  		/* Flag setting protected by i_mutex */


--
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