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]
Message-ID: <20180120220414.GA28167@jaegeuk-macbookpro.roam.corp.google.com>
Date:   Sat, 20 Jan 2018 14:04:14 -0800
From:   Jaegeuk Kim <jaegeuk@...nel.org>
To:     Chao Yu <chao@...nel.org>
Cc:     linux-f2fs-devel@...ts.sourceforge.net,
        linux-kernel@...r.kernel.org, Chao Yu <yuchao0@...wei.com>,
        Daeho Jeong <daeho.jeong@...sung.com>,
        Youngjin Gil <youngjin.gil@...sung.com>
Subject: Re: [PATCH] f2fs: correct removexattr behavior for null valued
 extended attribute

Thanks,

On 01/20, Chao Yu wrote:
> From: Daeho Jeong <daeho.jeong@...sung.com>
> 
> __vfs_removexattr() transfers "NULL" value to the setxattr handler of
> the f2fs filesystem in order to remove the extended attribute. But,
> __f2fs_setxattr() just ignores the removal request when the value of
> the extended attribute is already NULL. We have to remove the extended
> attribute itself even if the value of that is already NULL.
> 
> We can reporduce this bug with the below:
> 
> 1. touch file
> 2. setfattr -n "user.foo" file
> 3. setfattr -x "user.foo" file
> 4. getfattr -d file
> > user.foo
> 
> Signed-off-by: Daeho Jeong <daeho.jeong@...sung.com>
> Signed-off-by: Youngjin Gil <youngjin.gil@...sung.com>
> Tested-by: Hobin Woo <hobin.woo@...sung.com>
> Tested-by: Chao Yu <yuchao0@...wei.com>
> Reviewed-by: Chao Yu <yuchao0@...wei.com>
> Signed-off-by: Chao Yu <yuchao0@...wei.com>
> ---
>  fs/f2fs/xattr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/f2fs/xattr.c b/fs/f2fs/xattr.c
> index 600162f4ddbf..ae2dfa709f5d 100644
> --- a/fs/f2fs/xattr.c
> +++ b/fs/f2fs/xattr.c
> @@ -600,7 +600,7 @@ static int __f2fs_setxattr(struct inode *inode, int index,
>  			goto exit;
>  		}
>  
> -		if (f2fs_xattr_value_same(here, value, size))
> +		if (value && f2fs_xattr_value_same(here, value, size))
>  			goto exit;
>  	} else if ((flags & XATTR_REPLACE)) {
>  		error = -ENODATA;
> -- 
> 2.14.1.145.gb3622a4ee

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ