aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2022-02-23 12:35:04 -0800
committerEric Biggers <ebiggers@google.com>2022-02-23 12:35:04 -0800
commit74e870b7bd1585b4b509da47e0e75db66336e576 (patch)
tree9b67ab42cebbfd25d917852260a5300292f39630 /README.md
parent6e355131670ad014e45f879475ddf800f0080d41 (diff)
Strictly validate metadata file ownership by default
The metadata validation checks introduced by the previous commits are good, but to reduce the attack surface it would be much better to avoid reading and parsing files owned by other users in the first place. There are some possible use cases for users sharing fscrypt metadata files, but I think that for the vast majority of users it is unneeded and just opens up attack surface. Thus, make fscrypt (and pam_fscrypt) not process policies or protectors owned by other users by default. Specifically, * If fscrypt or pam_fscrypt is running as a non-root user, only policies and protectors owned by the user or by root can be used. * If fscrypt is running as root, any policy or protector can be used. (This is to match user expectations -- starting a sudo session should gain rights, not remove rights.) * If pam_fscrypt is running as root, only policies and protectors owned by root can be used. Note that this only applies when the root user themselves has an fscrypt login protector, which is rare. Add an option 'allow_cross_user_metadata' to /etc/fscrypt.conf which allows restoring the old behavior for anyone who really needs it.
Diffstat (limited to 'README.md')
-rw-r--r--README.md11
1 files changed, 10 insertions, 1 deletions
diff --git a/README.md b/README.md
index 26fd084..f1803b4 100644
--- a/README.md
+++ b/README.md
@@ -320,7 +320,8 @@ that looks like the following:
"filenames": "AES_256_CTS",
"policy_version": "2"
},
- "use_fs_keyring_for_v1_policies": false
+ "use_fs_keyring_for_v1_policies": false,
+ "allow_cross_user_metadata": false
}
```
@@ -378,6 +379,14 @@ The fields are:
kernels, it's better to not use this setting and instead (re-)create your
encrypted directories with `"policy_version": "2"`.
+* "allow\_cross\_user\_metadata" specifies whether `fscrypt` will allow
+ protectors and policies from other non-root users to be read, e.g. to be
+ offered as options by `fscrypt encrypt`. The default value is `false`, since
+ other users might be untrusted and could create malicious files. This can be
+ set to `true` to restore the old behavior on systems where `fscrypt` metadata
+ needs to be shared between multiple users. Note that this option is
+ independent from the permissions on the metadata files themselves.
+
## Setting up `fscrypt` on a filesystem
`fscrypt` needs some directories to exist on the filesystem on which encryption