From: Stephan Mueller <smueller@chronox.de>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Linux Crypto Mailing List <linux-crypto@vger.kernel.org>
Subject: Re: [PATCH 2/11] crypto: scatterwalk - Add missing sg_init_table to scatterwalk_ffwd
Date: Wed, 27 May 2015 11:00:55 +0200 [thread overview]
Message-ID: <8805468.lNrScoBP33@tauon> (raw)
In-Reply-To: <E1YxUxz-0006lD-TG@gondolin.me.apana.org.au>
Am Mittwoch, 27. Mai 2015, 14:37:27 schrieb Herbert Xu:
Hi Herbert,
>We need to call sg_init_table as otherwise the first entry may
>inadvertently become the last.
>
>Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Although the following remark is to the previous patch to add
scatterwalk_ffwd, I would like to ask it here:
>---
>
> crypto/scatterwalk.c | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/crypto/scatterwalk.c b/crypto/scatterwalk.c
>index 8690324..2ef9cbb 100644
>--- a/crypto/scatterwalk.c
>+++ b/crypto/scatterwalk.c
>@@ -158,6 +158,7 @@ struct scatterlist *scatterwalk_ffwd(struct scatterlist
>dst[2],
> src = sg_next(src);
Shouldn't there be a check for src == NULL here? I see the scatterwalk_ffwd
being used in the IV generators where they simply use the AD len and others.
For AF_ALG, those values may be set by user space in a deliberately wrong way
(e.g. more AD len than provided buffers).
Ciao
Stephan
next prev parent reply other threads:[~2015-05-27 9:01 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-27 6:35 [PATCH 0/11] crypto: aead - Tweaks/fixes to new AEAD interface Herbert Xu
2015-05-27 6:37 ` [PATCH 1/11] crypto: aead - Document behaviour of AD in destination buffer Herbert Xu
2015-05-27 6:37 ` [PATCH 2/11] crypto: scatterwalk - Add missing sg_init_table to scatterwalk_ffwd Herbert Xu
2015-05-27 9:00 ` Stephan Mueller [this message]
2015-05-27 9:08 ` Herbert Xu
2015-05-27 11:24 ` Stephan Mueller
2015-05-27 12:01 ` Herbert Xu
2015-05-27 6:37 ` [PATCH 3/11] crypto: aead - Preserve in-place processing in old_crypt Herbert Xu
2015-05-27 6:37 ` [PATCH 4/11] crypto: aead - Add common IV generation code Herbert Xu
2015-05-27 6:37 ` [PATCH 5/11] crypto: echainiv - Copy AD along with plain text Herbert Xu
2015-05-27 6:37 ` [PATCH 6/11] crypto: echainiv - Use common IV generation code Herbert Xu
2015-05-27 6:37 ` [PATCH 7/11] crypto: echainiv - Fix IV size in context size calculation Herbert Xu
2015-05-27 6:37 ` [PATCH 8/11] crypto: seqiv - Copy AD along with plain/cipher text Herbert Xu
2015-05-27 6:37 ` [PATCH 9/11] crypto: seqiv - Use common IV generation code Herbert Xu
2015-05-27 6:37 ` [PATCH 10/11] crypto: seqiv - Fix IV size in context size calculation Herbert Xu
2015-05-27 6:37 ` [PATCH 11/11] crypto: seqiv - Fix module unload/reload crash Herbert Xu
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=8805468.lNrScoBP33@tauon \
--to=smueller@chronox.de \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).