aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-12-21Fix a few typosEric Biggers
2021-12-21Merge pull request #334 from ebiggers/warn-on-chauthtok-failEric Biggers
pam_fscrypt: warn user if OLDAUTHTOK not given in chauthtok
2021-12-21pam_fscrypt: warn user if OLDAUTHTOK not given in chauthtokEric Biggers
If someone runs 'passwd USER' as root, the user is assigned a new login passphrase without their fscrypt login protector being updated. Detect this case and show a warning message using pam_info(). Fixes https://github.com/google/fscrypt/issues/273
2021-12-21Merge pull request #333 from ebiggers/doc-encryption-solutionsEric Biggers
README: elaborate on alternatives and threat model
2021-12-21README: elaborate on alternatives and threat modelEric Biggers
Fixes https://github.com/google/fscrypt/issues/318
2021-12-21README: write "Linux native filesystem encryption"Eric Biggers
"Linux filesystem encryption" sounds too vague. Write "Linux native filesystem encryption" instead.
2021-12-20Merge pull request #332 from ebiggers/skip-irrelevant-filesystemsEric Biggers
filesystem: avoid accessing irrelevant filesystems
2021-12-20filesystem: avoid accessing irrelevant filesystemsEric Biggers
Forbid 'fscrypt setup' on filesystems that aren't expected to support encryption (other than the root filesystem), and skip looking for fscrypt metadata directories on such filesystems. This has two benefits. First, it avoids the printing of annoying warnings like: pam_fscrypt[75038]: stat /run/user/0/.fscrypt: permission denied pam_fscrypt[75038]: stat /run/user/0/.fscrypt/policies: permission denied pam_fscrypt[75038]: stat /run/user/0/.fscrypt/protectors: permission denied pam_fscrypt[75038]: stat /sys/firmware/efi/efivars/.fscrypt: invalid argument pam_fscrypt[75038]: stat /sys/firmware/efi/efivars/.fscrypt/policies: invalid argument pam_fscrypt[75038]: stat /sys/firmware/efi/efivars/.fscrypt/protectors: invalid argument pam_fscrypt[75038]: stat /sys/fs/pstore/.fscrypt: permission denied pam_fscrypt[75038]: stat /sys/fs/pstore/.fscrypt/policies: permission denied pam_fscrypt[75038]: stat /sys/fs/pstore/.fscrypt/protectors: permission denied Second, it avoids long delays or side effects on some filesystems. To do this, introduce an allowlist of filesystem types that fscrypt will recognize. I wanted to avoid doing this, since this list will need to be updated in the future, but I don't see a better solution.
2021-12-20Merge pull request #331 from ebiggers/login-protector-permsEric Biggers
Set owner of login protectors to correct user
2021-12-20Merge pull request #329 from ebiggers/doc-ssh-issueEric Biggers
README: document issue with ssh ChallengeResponseAuthentication
2021-12-20Merge pull request #330 from google/avoid-warningEric Biggers
pam: avoid compiler warning in copyIntoSecret()
2021-12-19Set owner of login protectors to correct userEric Biggers
When the root user creates a login protector for a non-root user, make sure to chown() the protector file to make it owned by the user. Without this, the protector cannot be updated by the user, which causes it to get out of sync if the user changes their login passphrase. Fixes https://github.com/google/fscrypt/issues/319
2021-12-19pam: avoid compiler warning in copyIntoSecret()Eric Biggers
gcc 11 enabled -Wmaybe-uninitialized by default. It causes a false-positive warning in copyIntoSecret() because gcc doesn't understand that mlock() is special and doesn't read from the memory. Just initialize the memory to avoid this warning.
2021-12-19README: document issue with ssh ChallengeResponseAuthenticationEric Biggers
Update https://github.com/google/fscrypt/issues/321 Update https://github.com/google/fscrypt/issues/324
2021-11-29Merge pull request #326 from dimitry-ishenko/stdinEric Biggers
cmd/fscrypt: read key from stdin in non-interactive shell
2021-11-29cmd/fscrypt: read key from stdinDimitry Ishenko
Fixes #123
2021-10-18Release version v0.3.1v0.3.1Eric Biggers
2021-10-05Adjust recovery passphrase generationEric Biggers
As per the feedback at https://github.com/google/fscrypt/issues/115 where users didn't understand that the recovery passphrase is important, restore the original behavior where recovery passphrase generation happens automatically without a prompt. This applies to the case where 'fscrypt encrypt' is using a login protector on a non-root filesystem. However, leave the --no-recovery option so that the recovery passphrase can still be disabled if the user really wants to. Also, clarify the information provided about the recovery passphrase. Update https://github.com/google/fscrypt/issues/115
2021-09-22Merge pull request #317 from ebiggers/readme-symlink-bugJoseph Richey
README: mention LTS kernel versions with symlink bug fix
2021-09-22README: mention LTS kernel versions with symlink bug fixEric Biggers
Resolves https://github.com/google/fscrypt/issues/305
2021-09-14cmd/fscrypt: recognize no-key names containing hyphenEric Biggers
In Linux 5.15, the no-key name format is changing again; see https://git.kernel.org/linus/ba47b515f5940603. isPossibleNoKeyName() sometimes doesn't recognize the new no-key names. Update it accordingly to recognize all possible no-key names. Note: isPossibleNoKeyName() is only used as a heuristic to check whether a v1-encrypted directory is incompletely locked or not. Therefore, it's not too important whether it works. However, this change is needed for cli-tests/t_v1_policy to pass.
2021-09-14cli-tests/common.sh: remove argument count checksEric Biggers
These confuse the latest version of shellcheck into thinking that functions which take no arguments actually take arguments, which triggers a bunch of warnings like "Use func "$@" if function's $1 should mean script's $1", which causes 'make lint' to fail. These checks aren't too useful, so just remove them.
2021-09-14README: clarify how restoring /.fscrypt directory worksEric Biggers
Update https://github.com/google/fscrypt/issues/115
2021-09-13Merge pull request #310 from ebiggers/readme-updatesJoseph Richey
Readme updates
2021-09-13README: add section about encrypting existing filesEric Biggers
2021-09-13README: consistently format section titlesEric Biggers
Capitalize the first word only, and don't use periods.
2021-09-13README: add section about backup, restore, and recoveryEric Biggers
Resolves https://github.com/google/fscrypt/issues/51 Resolves https://github.com/google/fscrypt/issues/115
2021-09-13README: remove note about stabilityEric Biggers
A lot of people are already using fscrypt, so in practice we haven't been breaking backwards compatibility and aren't going to. Just remove the scary-sounding "Note about stability".
2021-09-13README: remove note about planned commandsEric Biggers
These would still be nice to add. However, the mention of them in the README is misleading because people reading it might come away with the impression that there is currently no way to back up fscrypt metadata or to recover directories -- which isn't true. (The fscrypt metadata is just a directory which can be backed up like any other directory. And 'fscrypt encrypt' already offers to generate a recovery passphrase when the directory and protector are on different filesystems.) Just remove this note; it doesn't really add any value.
2021-08-31Merge pull request #309 from ebiggers/troubleshootingJoseph Richey
Updates to the troubleshooting documentation
2021-08-31README: document symlink size bugEric Biggers
Update https://github.com/google/fscrypt/issues/305
2021-08-31README: documentation tweaksEric Biggers
Clarify some of the troubleshooting documentation.
2021-07-16cli-tests: fix failure with latest bash versionEric Biggers
2021-07-16README: add troubleshooting section for ENOPKG errorEric Biggers
Inspired by https://reddit.com/r/linuxquestions/comments/n75dv4
2021-06-27README: add troubleshooting section for keyring linkage issueEric Biggers
Fixes https://github.com/google/fscrypt/issues/194 Update https://github.com/google/fscrypt/issues/100
2021-06-27cmd/fscrypt: fix detection of GRUB installationEric Biggers
Fix the GRUB detection logic to take into account that MOUNTPOINT/boot/grub might not be on the same filesystem as MOUNTPOINT, due to MOUNTPOINT/boot being another mountpoint. The warning is only appropriate when GRUB is installed on the same filesystem that encryption is going to be enabled on.
2021-06-14README: improve troubleshooting tips for unlocked encrypted filesEric Biggers
Rename the troubleshooting section "Can't log in with ssh even when user's encrypted home directory is unlocked" to the more general "Some processes can't access unlocked encrypted files", and rewrite it to provide clearer directions for how to fix the problem by upgrading encrypted directories to policy version 2. Also add a related section "Users can access other users' unlocked encrypted files" which covers the reverse "issue", i.e. people expecting some processes to *not* be able to access unlocked encrypted files. Fixes https://github.com/google/fscrypt/issues/248
2021-06-09README: improve troubleshooting section for login protector not in syncEric Biggers
Update https://github.com/google/fscrypt/issues/273
2021-05-24Merge pull request #292 from josephlr/memJoseph Richey
Only use 1/8 of the system RAM and run the Garbage Collector in the timing loop
2021-05-24Run the Garbage Collector in the timing loopJoe Richey
Running `crypto.PassphraseHash` in a loop allocates a lot of memory. Golang is not always prudent about collecting the garbage from previous runs, resulting in a OOM error on memory-pressured systems. With a `maxMemoryBytes` of 128 MiB, this change reduces the maximum resident memory for `fscrypt setup` to 141 MiB (was perviously 405 MiB) Signed-off-by: Joe Richey <joerichey@google.com>
2021-05-24Only use 1/8 of the system RAMJoe Richey
On systems with high memory pressure, using half of the entire RAM for hashing can result in fscrypt getting OOM killed. Signed-off-by: Joe Richey <joerichey@google.com>
2021-05-12filesystem: skip TestHaveReadAccessTo() when running as rootEric Biggers
Root can read all files, so this test fails when running as root. Skip it instead. Resolves https://github.com/google/fscrypt/issues/288
2021-05-05Specify -buildmode=c-shared after GO_FLAGS rather than beforeEric Biggers
When building pam_fscrypt.so, specify -buildmode=c-shared after $(GO_FLAGS) so that it overrides any user-specified buildmode. This is needed to allow -buildmode=pie to be specified in GO_FLAGS if the packager wants to build fscrypt as a position-independent executable (e.g. following https://wiki.archlinux.org/title/Go_package_guidelines). Previously, trying to do this caused pam_fscrypt.so to be incorrectly built as an executable rather than as a shared library.
2021-04-27cmd/fscrypt: fix word mismatch "protector" => "policy"Gibeom Gwon
Fix word mismatch in usage and description of metadata create policy command.
2021-04-22cmd/fscrypt: use golang.org/x/termTobias Klauser
The golang.org/x/crypto/ssh/terminal package is deprecated and merely a wrapper around golang.org/x/term. Thus, use the latter directly.
2021-04-22Makefile: Optionally avoid installation of Ubuntu-specific PAM configFlorian Schmaus
This allows non Ubuntu distributions to opt out from the installation of Ubuntu-specific PAM files.
2021-03-31Release version v0.3.0 (#282)v0.3.0Eric Biggers
2021-03-31Merge pull request #283 from google/coverageJoseph Richey
Stop generating and uploading coverage in CI
2021-03-31Only run CI on master branch and PRs to masterJoe Richey
This avoids duplicate CI checks Signed-off-by: Joe Richey <joerichey@google.com>
2021-03-31Stop generating and uploading coverage in CIJoe Richey
This is currently broken, and we don't really use the findings. Signed-off-by: Joe Richey <joerichey@google.com>