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: <20081026203713.c00e69db.akpm@linux-foundation.org>
Date:	Sun, 26 Oct 2008 20:37:13 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Dmitri Monakhov <dmonakhov@...nvz.org>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] vfs: Fix possible chmod/truncate race condition.

On Wed, 15 Oct 2008 23:35:27 +0400 Dmitri Monakhov <dmonakhov@...nvz.org> wrote:

> 
> Signed-off-by: Dmitri Monakhov <dmonakhov@...nvz.org>
> ---
>  fs/open.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/open.c b/fs/open.c
> index 07da935..3423b94 100644
> --- a/fs/open.c
> +++ b/fs/open.c
> @@ -214,10 +214,9 @@ int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs,
>  		newattrs.ia_valid |= ATTR_FILE;
>  	}
>  
> +	mutex_lock(&dentry->d_inode->i_mutex);
>  	/* Remove suid/sgid on truncate too */
>  	newattrs.ia_valid |= should_remove_suid(dentry);
> -
> -	mutex_lock(&dentry->d_inode->i_mutex);
>  	err = notify_change(dentry, &newattrs);
>  	mutex_unlock(&dentry->d_inode->i_mutex);
>  	return err;

OK, I give up.  What race?
--
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