Merge branch 'restrict-digest-alg-v8' into next-integrity
authorMimi Zohar <zohar@linux.ibm.com>
Wed, 18 Aug 2021 14:18:29 +0000 (10:18 -0400)
committerMimi Zohar <zohar@linux.ibm.com>
Wed, 18 Aug 2021 14:18:29 +0000 (10:18 -0400)
commitd07eeeb8745973389e1d772b3b654f5860441589
treeaa22f9b920ee39cf366404b4f7468c5b8860a176
parente37be5343ae2b9419aea1442b07e5d2428b437b4
parent8ecd39cb61d9e302716d73be329c4d4822c24931
Merge branch 'restrict-digest-alg-v8' into next-integrity

Taken from the cover letter "IMA: restrict the accepted digest
algorithms for the security.ima xattr":

Provide users the ability to restrict the algorithms accepted by
their system, both when writing/updating xattrs, and when appraising
files, while retaining a permissive behavior by default to preserve
backward compatibility.

To provide these features, alter the behavior of setxattr to
only accept hashes built in the kernel, instead of any hash listed
in the kernel (complete list crypto/hash_info.c). In addition, the
user can define in his IMA policy the list of digest algorithms
allowed for writing to the security.ima xattr. In that case,
only algorithms present in that list are accepted for writing.

In addition, users may opt-in to allowlist hash algorithms for
appraising thanks to the new 'appraise_algos' IMA policy option.
By default IMA will keep accepting any hash algorithm, but specifying
that option will make appraisal of files hashed with another algorithm
fail.

Link: https://lore.kernel.org/linux-integrity/20210816081056.24530-1-Simon.THOBY@viveris.fr/