Bug 94291
Summary: | Bad xattr names (prefix.) allowed to be set | ||
---|---|---|---|
Product: | File System | Reporter: | William Douglas (william.douglas) |
Component: | btrfs | Assignee: | Josef Bacik (josef) |
Status: | RESOLVED PATCH_ALREADY_AVAILABLE | ||
Severity: | normal | CC: | dsterba |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 3.18 | Subsystem: | |
Regression: | No | Bisected commit-id: |
Description
William Douglas
2015-03-04 22:38:21 UTC
Do you have a reproducer? $ touch file $ setfattr -n btrfs. -v 1 file straced, shows that it does not pass: setxattr("file", "btrfs.", "1", 1, 0) = -1 EINVAL (Invalid argument) Yes sorry I didn't include that. Your example fails because the attributes have to have a valid prefix (see xattr.c:330 btrfs_is_valid_xattr for the prefixes allowed). $ touch file $ setfattr -n user. -v 1 file $ getfattr file # file: file user. |