* [PATCH] crypto: aead - fix for multiple operations on AF_ALG sockets
@ 2015-08-25 9:59 Lars Persson
2015-08-25 13:16 ` Herbert Xu
0 siblings, 1 reply; 2+ messages in thread
From: Lars Persson @ 2015-08-25 9:59 UTC (permalink / raw)
To: herbert, davem, linux-crypto, linux-kernel; +Cc: Lars Persson
The tsgl scatterlist must be re-initialized after each
operation. Otherwise the sticky bits in the page_link will corrupt the
list with pre-mature termination or false chaining.
Signed-off-by: Lars Persson <larper@axis.com>
---
crypto/algif_aead.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/crypto/algif_aead.c b/crypto/algif_aead.c
index 38a6cab..0aa6fdf 100644
--- a/crypto/algif_aead.c
+++ b/crypto/algif_aead.c
@@ -90,6 +90,7 @@ static void aead_put_sgl(struct sock *sk)
put_page(sg_page(sg + i));
sg_assign_page(sg + i, NULL);
}
+ sg_init_table(sg, ALG_MAX_PAGES);
sgl->cur = 0;
ctx->used = 0;
ctx->more = 0;
--
2.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] crypto: aead - fix for multiple operations on AF_ALG sockets
2015-08-25 9:59 [PATCH] crypto: aead - fix for multiple operations on AF_ALG sockets Lars Persson
@ 2015-08-25 13:16 ` Herbert Xu
0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2015-08-25 13:16 UTC (permalink / raw)
To: Lars Persson; +Cc: davem, linux-crypto, linux-kernel, Lars Persson
On Tue, Aug 25, 2015 at 11:59:15AM +0200, Lars Persson wrote:
> The tsgl scatterlist must be re-initialized after each
> operation. Otherwise the sticky bits in the page_link will corrupt the
> list with pre-mature termination or false chaining.
>
> Signed-off-by: Lars Persson <larper@axis.com>
Applied.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-08-25 13:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-25 9:59 [PATCH] crypto: aead - fix for multiple operations on AF_ALG sockets Lars Persson
2015-08-25 13:16 ` Herbert Xu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.