crypto: aead - fix for multiple operations on AF_ALG sockets
PATCH 1/1 crypto: aead - fix for multiple operations on AF_ALG sockets
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 <[email protected]>
--- crypto/algif_aead.c | 1 + 1 file changed, 1 insertion(+)
crypto/algif_aead.c +1 -0
@@ -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 ;
Signature · 1 line
2.1.4
Quoted 5 lines · Lars Persson
The tsgl scatterlist must be re-initialized after each operation. Otherwise the sticky bits in the
page_linkwill corrupt the list with pre-mature termination or false chaining.Signed-off-by Lars Persson <[email protected]>
Applied.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt