]> git.baikalelectronics.ru Git - kernel.git/commit
ima: fix error handling logic when file measurement failed
authorMatt Bobrowski <mattbobrowski@google.com>
Wed, 4 Jan 2023 03:41:44 +0000 (03:41 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:34:15 +0000 (09:34 +0100)
commit406ec16d548ebddd199d22762d5be758169fff22
treec6683f3e1289695e7bf77aca9b3cb9ad3aec922b
parent50112938c76fe867fa38c0f3715f5b0d3b238f13
ima: fix error handling logic when file measurement failed

commit 48c913b0272686d8139f262621e9e6460f6ca989 upstream.

Restore the error handling logic so that when file measurement fails,
the respective iint entry is not left with the digest data being
populated with zeroes.

Fixes: 035e6f439c50 ("ima: permit fsverity's file digests in the IMA measurement list")
Cc: stable@vger.kernel.org # 5.19
Signed-off-by: Matt Bobrowski <mattbobrowski@google.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
security/integrity/ima/ima_api.c
security/integrity/ima/ima_main.c