[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1384523146-9290-5-git-send-email-roberto.sassu@polito.it>
Date: Fri, 15 Nov 2013 14:45:42 +0100
From: Roberto Sassu <roberto.sassu@...ito.it>
To: linux-security-module@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
linux-ima-devel@...ts.sourceforge.net, zohar@...ibm.com,
d.kasatkin@...sung.com, james.l.morris@...cle.com,
Roberto Sassu <roberto.sassu@...ito.it>,
Mimi Zohar <zohar@...ux.vnet.ibm.com>
Subject: [PATCH 4/6] ima: check result of crypto_shash_update() in ima_calc_field_array_hash_tfm
This patch adds a check of the result from the first crypto_shash_update()
in ima_calc_field_array_hash_tfm().
Signed-off-by: Roberto Sassu <roberto.sassu@...ito.it>
Signed-off-by: Mimi Zohar <zohar@...ux.vnet.ibm.com>
---
security/integrity/ima/ima_crypto.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/security/integrity/ima/ima_crypto.c b/security/integrity/ima/ima_crypto.c
index 676e029..e22708b 100644
--- a/security/integrity/ima/ima_crypto.c
+++ b/security/integrity/ima/ima_crypto.c
@@ -163,6 +163,9 @@ static int ima_calc_field_array_hash_tfm(struct ima_field_data *field_data,
rc = crypto_shash_update(&desc.shash,
(const u8 *) &field_data[i].len,
sizeof(field_data[i].len));
+ if (rc)
+ break;
+
rc = crypto_shash_update(&desc.shash, field_data[i].data,
field_data[i].len);
if (rc)
--
1.8.1.4
Download attachment "smime.p7s" of type "application/x-pkcs7-signature" (2061 bytes)
Powered by blists - more mailing lists