]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: don't accept bare namespace as a valid xattr
authorDavid Sterba <dsterba@suse.cz>
Wed, 25 Mar 2015 18:26:41 +0000 (19:26 +0100)
committerChris Mason <clm@fb.com>
Fri, 27 Mar 2015 01:10:24 +0000 (18:10 -0700)
commit9fe0548eb5941d79c45c3e4253d2cedfe3738234
tree3ad3d87edc735b1f2445fe92e9d5610ea367af32
parentdd4f9b045f2aab477b4a5ccf451b4423074b9db4
btrfs: don't accept bare namespace as a valid xattr

Due to insufficient check in btrfs_is_valid_xattr, this unexpectedly
works:

 $ touch file
 $ setfattr -n user. -v 1 file
 $ getfattr -d file
user.="1"

ie. the missing attribute name after the namespace.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=94291
Reported-by: William Douglas <william.douglas@intel.com>
CC: <stable@vger.kernel.org> # 2.6.29+
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/xattr.c