]> git.baikalelectronics.ru Git - kernel.git/commit
ima: Fail rule parsing when the KEY_CHECK hook is combined with an invalid cond
authorTyler Hicks <tyhicks@linux.microsoft.com>
Thu, 9 Jul 2020 06:19:05 +0000 (01:19 -0500)
committerMimi Zohar <zohar@linux.ibm.com>
Fri, 17 Jul 2020 01:53:55 +0000 (21:53 -0400)
commit69254e1cb16daa424781a588ae24db68c9d02192
tree590ece87004d5d95da553a1f51fe4ea11a09f13b
parentaaea7ed15fdf74fca4b526d56c517fed74d7d5b6
ima: Fail rule parsing when the KEY_CHECK hook is combined with an invalid cond

The KEY_CHECK function only supports the uid, pcr, and keyrings
conditionals. Make this clear at policy load so that IMA policy authors
don't assume that other conditionals are supported.

Fixes: 406f67e15a98 ("IMA: Add KEY_CHECK func to measure keys")
Signed-off-by: Tyler Hicks <tyhicks@linux.microsoft.com>
Reviewed-by: Lakshmi Ramasubramanian <nramas@linux.microsoft.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
security/integrity/ima/ima_policy.c