Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1212922 > unrolled thread
| Started by | Lars Persson <lars.persson@axis.com> |
|---|---|
| First post | 2015-08-25 12:00 +0200 |
| Last post | 2015-08-25 15:20 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] crypto: aead - fix for multiple operations on AF_ALG sockets Lars Persson <lars.persson@axis.com> - 2015-08-25 12:00 +0200
Re: [PATCH] crypto: aead - fix for multiple operations on AF_ALG sockets Herbert Xu <herbert@gondor.apana.org.au> - 2015-08-25 15:20 +0200
| From | Lars Persson <lars.persson@axis.com> |
|---|---|
| Date | 2015-08-25 12:00 +0200 |
| Subject | [PATCH] crypto: aead - fix for multiple operations on AF_ALG sockets |
| Message-ID | <q1jbk-2TE-19@gated-at.bofh.it> |
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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Herbert Xu <herbert@gondor.apana.org.au> |
|---|---|
| Date | 2015-08-25 15:20 +0200 |
| Subject | Re: [PATCH] crypto: aead - fix for multiple operations on AF_ALG sockets |
| Message-ID | <q1miT-7x9-21@gated-at.bofh.it> |
| In reply to | #1212922 |
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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web