| Age | Commit message (Collapse) | Author |
|
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
|
|
README: elaborate on alternatives and threat model
|
|
Fixes https://github.com/google/fscrypt/issues/318
|
|
"Linux filesystem encryption" sounds too vague. Write "Linux native
filesystem encryption" instead.
|
|
filesystem: avoid accessing irrelevant filesystems
|
|
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.
|
|
Set owner of login protectors to correct user
|
|
README: document issue with ssh ChallengeResponseAuthentication
|
|
pam: avoid compiler warning in copyIntoSecret()
|
|
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
|
|
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.
|
|
Update https://github.com/google/fscrypt/issues/321
Update https://github.com/google/fscrypt/issues/324
|
|
cmd/fscrypt: read key from stdin in non-interactive shell
|
|
Fixes #123
|
|
|
|
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
|
|
README: mention LTS kernel versions with symlink bug fix
|
|
Resolves https://github.com/google/fscrypt/issues/305
|
|
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.
|
|
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.
|
|
Update https://github.com/google/fscrypt/issues/115
|
|
Readme updates
|
|
|
|
Capitalize the first word only, and don't use periods.
|
|
Resolves https://github.com/google/fscrypt/issues/51
Resolves https://github.com/google/fscrypt/issues/115
|
|
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".
|
|
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.
|
|
Updates to the troubleshooting documentation
|
|
Update https://github.com/google/fscrypt/issues/305
|
|
Clarify some of the troubleshooting documentation.
|
|
|
|
Inspired by https://reddit.com/r/linuxquestions/comments/n75dv4
|
|
Fixes https://github.com/google/fscrypt/issues/194
Update https://github.com/google/fscrypt/issues/100
|
|
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.
|
|
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
|
|
Update https://github.com/google/fscrypt/issues/273
|
|
Only use 1/8 of the system RAM and run the Garbage Collector in the timing loop
|
|
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>
|
|
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>
|
|
Root can read all files, so this test fails when running as root.
Skip it instead.
Resolves https://github.com/google/fscrypt/issues/288
|
|
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.
|
|
Fix word mismatch in usage and description of metadata create policy
command.
|
|
The golang.org/x/crypto/ssh/terminal package is deprecated and merely a
wrapper around golang.org/x/term. Thus, use the latter directly.
|
|
This allows non Ubuntu distributions to opt out from the installation
of Ubuntu-specific PAM files.
|
|
|
|
Stop generating and uploading coverage in CI
|
|
This avoids duplicate CI checks
Signed-off-by: Joe Richey <joerichey@google.com>
|
|
This is currently broken, and we don't really use the findings.
Signed-off-by: Joe Richey <joerichey@google.com>
|
|
pam_fscrypt: eliminate unnecessary options and improve documentation
|
|
Make some more corrections:
- pam-config-framework isn't actually Ubuntu-specific but actually
applies to Debian and any Debian derivative.
- The pam-config-framework file is indeed installed by `make install`,
just not into the correct location.
- On Debian (and Debian derivatives), the PAM configuration isn't
actually part of the 'fscrypt' package but rather 'libpam-fscrypt'.
- Clarify where to add the pam_fscrypt.so session hook.
|