]> git.baikalelectronics.ru Git - kernel.git/commit
ima: fix violation measurement list record
authorMimi Zohar <zohar@linux.ibm.com>
Thu, 30 Jun 2022 15:23:38 +0000 (11:23 -0400)
committerMimi Zohar <zohar@linux.ibm.com>
Thu, 7 Jul 2022 02:31:52 +0000 (22:31 -0400)
commitc33f4d54aa5f6b948efa439b9571f4fff1dfde87
treecbbdd930d8c4fa127f7a39fe5ae298f4a9b080dd
parent2d0f7dd7c0aa9820876ad50899da6eff5cac509b
ima: fix violation measurement list record

Although the violation digest in the IMA measurement list is always
zeroes, the size of the digest should be based on the hash algorithm.
Until recently the hash algorithm was hard coded to sha1.  Fix the
violation digest size included in the IMA measurement list.

This is just a cosmetic change which should not affect attestation.

Reported-by: Stefan Berger <stefanb@linux.ibm.com>
Fixes: dc8385cead6e ("ima: use IMA default hash algorithm for integrity violations")
Tested-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
security/integrity/ima/ima_template_lib.c