aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-08-29Merge pull request #142 from ebiggers/goimportsJoseph Richey
Fix 'make format'-related CI failure
2019-08-28Run 'make format' with latest version of goimportsEric Biggers
This fixes a CI failure, caused by goimports changing how it formats the imports.
2019-08-28Makefile: exclude generated files from 'make format'Eric Biggers
Due to a goimports update, 'make format' is now changing metadata.pb.go. But this fix can't be committed because this file is generated by 'make gen'. Fix this by not formatting generated files.
2019-07-27README.md: improve documentation for moving files into encrypted dirs (#138)ebiggers
Resolves https://github.com/google/fscrypt/issues/124
2019-07-27README.md: improve documentation for kernel and filesystem support (#137)ebiggers
Resolves https://github.com/google/fscrypt/issues/117 Resolves https://github.com/google/fscrypt/issues/127
2019-07-27README.md: improve documentation of GRUB limitation (#136)ebiggers
Resolves https://github.com/google/fscrypt/issues/58
2019-07-27cmd/fscrypt: give newly encrypted directories mode 0700 (#134)ebiggers
Resolves https://github.com/google/fscrypt/issues/132
2019-07-26Update Travis to use Ubuntu 18.04 and Go 1.12 (#135)Joseph Richey
Fixes CI issues
2019-01-19Merge pull request #122 from google/pamJoseph Richey
Install pam modules/configs to the right location
2019-01-19Update the README with correct install informationJoe Richey
2019-01-19Install pam modules/configs to the right locationJoe Richey
Per the FHS, manually installed programs should go under /usr/local. This change also makes it easier to change the global installation prefix. For example, package managers should set PREFIX=/usr
2019-01-17Merge pull request #119 from ebiggers/adiantumJoseph Richey
Add support for the Adiantum encryption mode
2019-01-17Merge pull request #120 from google/toolsJoseph Richey
Makefile: migrate from megacheck to staticcheck
2019-01-17Makefile: migrate from megacheck to staticcheckJoe Richey joerichey@google.com
This fixes travis issues as well as moving us off of deprecated tooling
2019-01-14Add support for the Adiantum encryption modeEric Biggers
Add Adiantum support to the fscrypt userspace tool. Supported in the kernel since v5.0-rc1, Adiantum is a length-preserving encryption mode based primarily on XChaCha12. It is fast even on CPUs without AES instructions. Unlike XTS it is also a wide-block encryption mode. Adiantum is supported for both contents and filenames encryption. For Adiantum encryption policies, also make the fscrypt tool provide the new DIRECT_KEY flag, which further improves performance by requesting that all files be encrypted directly with the policy key. This takes advantage of Adiantum's support for long tweaks. See the kernel commit "fscrypt: add Adiantum support" (https://git.kernel.org/torvalds/c/8094c3ceb21ad938) for more details.
2018-12-04Merge pull request #114 from ebiggers/fix-make-genJoseph Richey
Makefile: use a specific protoc-gen-go version
2018-12-04Makefile: use a specific protoc-gen-go versionEric Biggers
'make gen' no longer works because it uses the git version of protoc-gen-go, which is no longer compatible with the latest released version of github.com/golang/protobuf/proto, which we're using. Freeze the protoc-gen-go version so that it keeps working.
2018-11-20Merge pull request #110 from wjt/patch-1Joseph Richey
README: fix "Debain" typo
2018-11-05README: fix "Debain" typoWill Thompson
2018-09-05Merge pull request #106 from fristonio/spell-checkJoseph Richey
feat(spell-check): add make command for spell check.
2018-09-02feat(spell-check): add make command for spell check.Deepesh Pathak
* Remove spelling mistakes in the repository * Add travis script to check for typos. * Add command to Makefile to check for typos. * Fixes #71
2018-08-30Merge pull request #107 from google/modJoseph Richey
Use Go Modules and support Go 1.11 building
2018-08-30Update Travis to use go 1.10 and go 1.11Joe Richey joerichey@google.com
2018-08-30Bump Travis VersionJoe Richey joerichey@google.com
2018-08-30Fix golint to not need a special forkJoe Richey joerichey@google.com
2018-08-30Go 1.11 gofmt updataeJoe Richey joerichey@google.com
2018-08-30Use proto.Equal instead of reflect.DeepEqualsJoe Richey joerichey@google.com
2018-08-30Update Protoc Compiler to 3.6.1Joe Richey joerichey@google.com
2018-08-30Update dependancies to lastest versionJoe Richey joerichey@google.com
2018-08-30Don't vendor helper toolingJoe Richey joerichey@google.com
2018-08-30Remove dep from documentation and travis buildJoe Richey joerichey@google.com
2018-08-30Transition from dep to golang's module systemJoe Richey joerichey@google.com
2018-08-23Merge pull request #105 from google/releasev0.2.4Joseph Richey
Release: v0.2.4
2018-08-23Release: v0.2.4Joe Richey joerichey@google.com
2018-08-23Merge pull request #103 from google/pamJoseph Richey
Cleanup privilege dropping/raising in pam_fscrypt
2018-08-23Improve debug and error output for pam_fscryptJoe Richey joerichey@google.com
2018-08-23Ensure keyring privilege changes are reversibleJoe Richey joerichey@google.com
This change makes sure that, when we set the ruid and euid in order to get the user keyring linked into the current process keyring, we will always be able to reverse these changes (using a suid of 0). This fixes an issue where "su <user>" would result in a system error when called by an unprivileged user. It also explains exactly how and why we are making these privilege changes.
2018-08-23Ensure setting user privileges is reversibleJoe Richey joerichey@google.com
This change makes sure after dropping then elevating privileges for a process, the euid, guid, and groups are all the same as they were originally. This significantly simplifies the privilege logic. This fixes CVE-2018-6558, which allowed an unprivleged user to gain membership in the root group (gid 0) due to the groups not being properly reset in the process.
2018-08-23Merge pull request #104 from google/travisJoseph Richey
Fix Travis to only use Go 1.10
2018-08-23Update docs to indicate v1.10 is requiredJoe Richey joerichey@google.com
2018-08-23Fix Travis to only use Go 1.10Joe Richey joerichey@google.com
2018-08-22Merge pull request #102 from google/mipsJoseph Richey
Use proper sizes when casting to Go slice
2018-08-21Use proper sizes when casting to Go sliceJoe Richey joerichey@google.com
Addresses most of the issues in #101. The following commands now succeed: GOARCH=mips go build github.com/google/fscrypt/util GOARCH=mipsle go build github.com/google/fscrypt/util
2018-04-19Merge pull request #97 from ebiggers/privileges_fixJoseph Richey
security: drop and regain privileges in all threads
2018-04-19Merge pull request #96 from ebiggers/unset_item_fixJoseph Richey
pam: return error when PAM info item is unset
2018-03-25security: drop and regain privileges in all threadsEric Biggers
After enabling pam_fscrypt for "session" and creating a directory protected with a login protector, I was no longer able to log in as that user. The problem is that the Go runtime is creating threads after pam_fscrypt drops privileges, but pam_fscrypt is not re-acquiring privileges on those threads because the Go wrappers for setreuid(), setregid(), and setgroups() in the "sys/unix" package are using the raw syscalls which operate on the calling thread only. This violates glibc's assumption that all threads have the same uids and gids, causing it to abort() the process when a later module in the PAM stack (pam_mail in my case) tries to drop privileges using the glibc functions. Fix it by dropping and regaining privileges using the glibc functions rather than the "sys/unix" functions. This also avoids any possibility that privileges could be changed in a thread other than the "main" one for pam_fscrypt, since the Go runtime does not guarantee which OS-level thread runs what. It would be nice to also exit all Go worker threads before returning from pam_fscrypt, but the Go runtime doesn't seem to support that.
2018-03-24pam: return error when PAM info item is unsetEric Biggers
pam_fscrypt is crashing with a segfault in copyIntoSecret() when using Ctrl-C to interrupt a 'sudo' prompt. It is dereferencing a NULL pointer that is supposed point to the PAM_AUTHTOK item. The problem is that the Go code assumes pam_get_item() returns a non-success status if the item is unset, when actually it sets the data pointer to NULL and returns PAM_SUCCESS. Fix it by making pam.Handle.GetItem() return an error in that case.
2018-03-16Clarify how to run integration tests Joseph Richey
Also clarifies some other minor points.
2018-02-14Makefile: arch command is not portableJoseph Richey
According to: https://www.gnu.org/software/coreutils/manual/html_node/arch-invocation.html the arch command isn't portable, so we switch to uname.
2018-02-13Makefile: Go/Protoc don't support arm64 big endianJoseph Richey
Protoc: https://github.com/google/protobuf/blob/a711e3d5b4ee1dd7f9d21197dca8432a5819a64e/protoc-artifacts/build-protoc.sh#L82-L83 Go: https://github.com/golang/sys/blob/37707fdb30a5b38865cfb95e5aab41707daec7fd/unix/linux/mkall.go#L43-L79