ima: fix blocking of security.ima xattrs of unsupported algorithms
authorMimi Zohar <zohar@linux.ibm.com>
Wed, 17 Aug 2022 21:18:42 +0000 (17:18 -0400)
committerMimi Zohar <zohar@linux.ibm.com>
Tue, 23 Aug 2022 14:42:02 +0000 (10:42 -0400)
commit5926586f291b53cb8a0c9631fc19489be1186e2d
treed0705428442592804274b3bd0b93ae8b212e214c
parent1c23f9e627a7b412978b4e852793c5e3c3efc555
ima: fix blocking of security.ima xattrs of unsupported algorithms

Limit validating the hash algorithm to just security.ima xattr, not
the security.evm xattr or any of the protected EVM security xattrs,
nor posix acls.

Fixes: 50f742dd9147 ("IMA: block writes of the security.ima xattr with unsupported algorithms")
Reported-by: Christian Brauner <brauner@kernel.org>
Acked-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
security/integrity/ima/ima_appraise.c