aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/security/integrity/ima/ima.h
diff options
context:
space:
mode:
authorTHOBY Simon <Simon.THOBY@viveris.fr>2021-08-16 08:11:00 +0000
committerMimi Zohar <zohar@linux.ibm.com>2021-08-16 17:33:07 -0400
commit583a80ae86b5ceb68119cfb9a37404cf22f6cc46 (patch)
tree69a1369662423cbd98f3f39584633e7175d95c32 /security/integrity/ima/ima.h
parentIMA: add support to restrict the hash algorithms used for file appraisal (diff)
downloadwireguard-linux-583a80ae86b5ceb68119cfb9a37404cf22f6cc46.tar.xz
wireguard-linux-583a80ae86b5ceb68119cfb9a37404cf22f6cc46.zip
IMA: add a policy option to restrict xattr hash algorithms on appraisal
The kernel has the ability to restrict the set of hash algorithms it accepts for the security.ima xattr when it appraises files. Define a new IMA policy rule option "appraise_algos=", using the mentioned mechanism to expose a user-toggable policy knob to opt-in to that restriction and select the desired set of algorithms that must be accepted. When a policy rule uses the 'appraise_algos' option, appraisal of a file referenced by that rule will now fail if the digest algorithm employed to hash the file was not one of those explicitly listed in the option. In its absence, any hash algorithm compiled in the kernel will be accepted. For example, on a system where SELinux is properly deployed, the rule appraise func=BPRM_CHECK obj_type=iptables_exec_t \ appraise_algos=sha256,sha384 will block the execution of iptables if the xattr security.ima of its executables were not hashed with either sha256 or sha384. Signed-off-by: THOBY Simon <Simon.THOBY@viveris.fr> Reviewed-by: Lakshmi Ramasubramanian <nramas@linux.microsoft.com> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Diffstat (limited to 'security/integrity/ima/ima.h')
0 files changed, 0 insertions, 0 deletions