]> git.baikalelectronics.ru Git - kernel.git/commit
ima: defer determining the appraisal hash algorithm for 'ima' template
authorRoberto Sassu <roberto.sassu@polito.it>
Fri, 7 Jun 2013 10:16:39 +0000 (12:16 +0200)
committerMimi Zohar <zohar@linux.vnet.ibm.com>
Sun, 27 Oct 2013 01:32:53 +0000 (21:32 -0400)
commitdf15463b7718b0266aeaab416e99c887d034f518
treeb432080d2151c60c3ce7d07f68336113befa096d
parentb63e5e9b43cf863f63813f7553ecc205779ab1de
ima: defer determining the appraisal hash algorithm for 'ima' template

The same hash algorithm should be used for calculating the file
data hash for the IMA measurement list, as for appraising the file
data integrity.  (The appraise hash algorithm is stored in the
'security.ima' extended attribute.)  The exception is when the
reference file data hash digest, stored in the extended attribute,
is larger than the one supported by the template.  In this case,
the file data hash needs to be calculated twice, once for the
measurement list and, again, for appraisal.

Signed-off-by: Roberto Sassu <roberto.sassu@polito.it>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
security/integrity/ima/ima_main.c