]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerJiri Slaby <jslaby@suse.cz>
Thu, 30 Apr 2015 11:49:27 +0000 (13:49 +0200)
commita60903bf3633bdfd1254b1766ac51d56439c650e
tree3ae95d2caa84c3f680fd04d2447914824bb2f8e4
parentfb5aac18ca6221679f3e88f680f6992dacd4016c
btrfs: don't accept bare namespace as a valid xattr

commit 3c3b04d10ff1811a27f86684ccd2f5ba6983211d upstream.

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>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
fs/btrfs/xattr.c