Home
last modified time | relevance | path

Searched hist:"8 ecd39cb61d9e302716d73be329c4d4822c24931" (Results 1 – 1 of 1) sorted by relevance

/linux/security/integrity/ima/
H A Dima_policy.cdiff 8ecd39cb61d9e302716d73be329c4d4822c24931 Mon Aug 16 10:11:01 CEST 2021 THOBY Simon <Simon.THOBY@viveris.fr> IMA: prevent SETXATTR_CHECK policy rules with unavailable algorithms

SETXATTR_CHECK policy rules assume that any algorithm listed in the
'appraise_algos' flag must be accepted when performing setxattr() on
the security.ima xattr. However nothing checks that they are
available in the current kernel. A userland application could hash
a file with a digest that the kernel wouldn't be able to verify.
However, if SETXATTR_CHECK is not in use, the kernel already forbids
that xattr write.

Verify that algorithms listed in appraise_algos are available to the
current kernel and reject the policy update otherwise. This will fix
the inconsistency between SETXATTR_CHECK and non-SETXATTR_CHECK
behaviors.

That filtering is only performed in ima_parse_appraise_algos() when
updating policies so that we do not have to pay the price of
allocating a hash object every time validate_hash_algo() is called
in ima_inode_setxattr().

Signed-off-by: THOBY Simon <Simon.THOBY@viveris.fr>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>