[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <1392630275-8667-8-git-send-email-ch.naveen@samsung.com>
Date: Mon, 17 Feb 2014 15:14:33 +0530
From: Naveen Krishna Chatradhi <ch.naveen@...sung.com>
To: linux-crypto@...r.kernel.org, linux-samsung-soc@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, vzapolskiy@...il.com,
herbert@...dor.apana.org.au, naveenkrishna.ch@...il.com,
cpgs@...sung.com, davem@...emloft.net
Subject: [PATCH 7/9 v7] crypto:s5p-sss: validate iv before memcpy
This patch adds code to validate "iv" buffer before trying to
memcpy the contents
Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@...sung.com>
Reviewed-by: Tomasz Figa <t.figa@...sung.com>
CC: David S. Miller <davem@...emloft.net>
CC: Herbert Xu <herbert@...dor.apana.org.au>
CC: Vladimir Zapolskiy <vzapolskiy@...il.com>
TO: <linux-crypto@...r.kernel.org>
CC: <linux-samsung-soc@...r.kernel.org>
---
Changes since v6:
None
drivers/crypto/s5p-sss.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c
index fa21db5..7da1da4 100644
--- a/drivers/crypto/s5p-sss.c
+++ b/drivers/crypto/s5p-sss.c
@@ -380,7 +380,8 @@ static void s5p_set_aes(struct s5p_aes_dev *dev,
{
void __iomem *keystart;
- memcpy(dev->aes_ioaddr + SSS_REG_AES_IV_DATA(0), iv, 0x10);
+ if (iv)
+ memcpy(dev->aes_ioaddr + SSS_REG_AES_IV_DATA(0), iv, 0x10);
if (keylen == AES_KEYSIZE_256)
keystart = dev->aes_ioaddr + SSS_REG_AES_KEY_DATA(0);
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists