]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
evm: evm_verify_hmac must not return INTEGRITY_UNKNOWN
authorDmitry Kasatkin <dmitry.kasatkin@nokia.com>
Fri, 6 May 2011 08:34:14 +0000 (11:34 +0300)
committerMimi Zohar <zohar@linux.vnet.ibm.com>
Mon, 18 Jul 2011 16:29:48 +0000 (12:29 -0400)
commit6d38ca01c0c2d6c2e46ec1984db9ada6bad6ca26
tree6084a84cd87d18c261d62dc816d48335ce602447
parent2960e6cb5f7c662b8edb6b0d2edc72095b4f5672
evm: evm_verify_hmac must not return INTEGRITY_UNKNOWN

If EVM is not supported or enabled, evm_verify_hmac() returns
INTEGRITY_UNKNOWN, which ima_appraise_measurement() ignores and sets
the appraisal status based solely on the security.ima verification.

evm_verify_hmac() also returns INTEGRITY_UNKNOWN for other failures, such
as temporary failures like -ENOMEM, resulting in possible attack vectors.
This patch changes the default return code for temporary/unexpected
failures, like -ENOMEM, from INTEGRITY_UNKNOWN to INTEGRITY_FAIL, making
evm_verify_hmac() fail safe.

As a result, failures need to be re-evaluated in order to catch both
temporary errors, such as the -ENOMEM, as well as errors that have been
resolved in fix mode.

Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@nokia.com>
Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
security/integrity/evm/evm_main.c