aboutsummaryrefslogtreecommitdiff
path: root/actions/policy.go
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
commit1a47718420317f893831b0223153d56005d5b02b (patch)
treeb5cdbe761bee21efc4d643083c4bc76065d132fd /actions/policy.go
parentfa1a1fdbdea65829ce24a6b6f86ce2961e465b02 (diff)
filesystem: validate size and type of metadata files
Don't allow reading metadata files that are very large, as they can crash the program due to the memory required. Similarly, don't allow reading metadata files that aren't regular files, such as FIFOs, or symlinks (which could point to a device node like /dev/zero), as that can hang the program. Both issues were particularly problematic for pam_fscrypt, as they could prevent users from being able to log in. Note: these checks are arguably unneeded if we strictly check the file ownership too, which a later commit will do. But there's no reason not to do these basic checks too.
Diffstat (limited to 'actions/policy.go')
0 files changed, 0 insertions, 0 deletions