From: Tomasz Figa <t.figa@samsung.com>
To: Naveen Krishna Chatradhi <ch.naveen@samsung.com>,
linux-crypto@vger.kernel.org, linux-samsung-soc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, vzapolskiy@gmail.com,
herbert@gondor.apana.org.au, naveenkrishna.ch@gmail.com,
cpgs@samsung.com, tomasz.figa@gmail.com
Subject: Re: [PATCH 7/8 v3] crypto:s5p-sss: validate iv before memcpy
Date: Fri, 10 Jan 2014 17:03:09 +0100 [thread overview]
Message-ID: <52D019BD.30401@samsung.com> (raw)
In-Reply-To: <1389354321-32096-1-git-send-email-ch.naveen@samsung.com>
Hi Naveen,
On 10.01.2014 12:45, Naveen Krishna Chatradhi wrote:
> This patch adds code to validate "iv" buffer before trying to
> memcpy the contents
>
> Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
> ---
> Changes since v2:
> None
>
> drivers/crypto/s5p-sss.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c
> index f274f5f..7058bb6 100644
> --- a/drivers/crypto/s5p-sss.c
> +++ b/drivers/crypto/s5p-sss.c
> @@ -381,8 +381,9 @@ static void s5p_set_aes(struct s5p_aes_dev *dev,
> struct samsung_aes_variant *var = dev->variant;
> void __iomem *keystart;
>
> - memcpy(dev->ioaddr + SSS_REG_AES_IV_DATA
> - (var->aes_offset, 0), iv, 0x10);
> + if (iv)
> + memcpy(dev->ioaddr + SSS_REG_AES_IV_DATA
> + (var->aes_offset, 0), iv, 0x10);
In what conditions can the iv end up being NULL?
Best regards,
Tomasz
next prev parent reply other threads:[~2014-01-10 16:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-09 5:00 [PATCH 6/6 v2] crypto:s5p-sss: validate iv before memcpy Naveen Krishna Chatradhi
2014-01-10 11:45 ` [PATCH 7/8 v3] " Naveen Krishna Chatradhi
2014-01-10 16:03 ` Tomasz Figa [this message]
2014-01-15 6:45 ` Naveen Krishna Ch
2014-01-15 9:16 ` [PATCH 6/8 v4] ARM: dts: exynos5250/5420: add dt node for sss module Naveen Krishna Chatradhi
2014-01-23 10:19 ` Naveen Krishna Ch
2014-01-24 15:36 ` Tomasz Figa
2014-01-29 9:24 ` [PATCH 6/9 v5] " Naveen Krishna Chatradhi
2014-01-15 9:17 ` [PATCH 7/8 v4] crypto:s5p-sss: validate iv before memcpy Naveen Krishna Chatradhi
2014-01-23 10:18 ` Naveen Krishna Ch
2014-01-24 15:52 ` Tomasz Figa
2014-01-29 9:25 ` [PATCH 7/9 v5] " Naveen Krishna Chatradhi
2014-02-07 5:25 ` [PATCH 7/9 v6] " Naveen Krishna Chatradhi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52D019BD.30401@samsung.com \
--to=t.figa@samsung.com \
--cc=ch.naveen@samsung.com \
--cc=cpgs@samsung.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=naveenkrishna.ch@gmail.com \
--cc=tomasz.figa@gmail.com \
--cc=vzapolskiy@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox