ima: prevent buffer overflow in ima_alloc_tfm()
authorDmitry Kasatkin <d.kasatkin@samsung.com>
Fri, 15 Aug 2014 10:28:52 +0000 (13:28 +0300)
committerMimi Zohar <zohar@linux.vnet.ibm.com>
Tue, 2 Sep 2014 21:03:36 +0000 (17:03 -0400)
commit23c19e2ca736722a9523b64b07cda7efab7b6c57
treecb0501321b7221aed0bafe9b3b016ba033053a3d
parent9a8d289fbcb7dfd1fc74959e9930b406e76b2002
ima: prevent buffer overflow in ima_alloc_tfm()

This patch fixes the case where the file's signature/hash xattr contains
an invalid hash algorithm.  Although we can not verify the xattr, we still
need to measure the file.  Use the default IMA hash algorithm.

Signed-off-by: Dmitry Kasatkin <d.kasatkin@samsung.com>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
security/integrity/ima/ima_crypto.c