[PATCH 0/2] crypto: atmel-aes: fixes on block size of aes cfb mode

2014-04-22 Thread Leilei Zhao
Hi: These two patches correct the block size in atmel-aes driver while processing cfb8 and cfb64 mode of aes. Thanks Leilei Zhao (2): crypto: atmel-aes: correct block size of cfb8 mode crypto: atmel-aes: check alignment of cfb64 mode drivers/crypto/atmel-aes.c |8 +++- 1 file

[PATCH 2/2] crypto: atmel-aes: check alignment of cfb64 mode

2014-04-22 Thread Leilei Zhao
The length shoule be 64 bit alignment and the block size shoule be 64 bit in aes cfb64 mode. Signed-off-by: Leilei Zhao leilei.z...@atmel.com --- drivers/crypto/atmel-aes.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/crypto/atmel-aes.c b/drivers/crypto/atmel-aes.c index

[PATCH 1/2] crypto: atmel-aes: correct block size of cfb8 mode

2014-04-22 Thread Leilei Zhao
The block size of aes cfb8 mode shoule be 8 bit. Signed-off-by: Leilei Zhao leilei.z...@atmel.com --- drivers/crypto/atmel-aes.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/atmel-aes.c b/drivers/crypto/atmel-aes.c index d7c9e31..12628a7 100644 ---

[PATCH] crypto_user: Fix out-of-bounds read

2014-04-22 Thread Andy Lutomirski
This is unlikely to be exploitable for anything except an OOPS. Cc: sta...@vger.kernel.org Signed-off-by: Andy Lutomirski l...@amacapital.net --- Notes: This is entirely untested, but it looks obviously correct to me. crypto/crypto_user.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH crypto 1/2] crypto: caam - fix mem leak in ahash_setkey

2014-04-22 Thread Marek Vasut
On Friday, April 18, 2014 at 12:01:41 PM, Horia Geanta wrote: In case hash key is bigger than algorithm block size, it is hashed. In this case, memory is allocated to keep this hash in hashed_key. hashed_key has to be freed on the key_dma dma mapping error path. Cc: sta...@vger.kernel.org #

Re: [PATCH 3/3] crypto: Fix leak of struct aead_request in test_aead_speed()

2014-04-22 Thread Marek Vasut
On Monday, April 21, 2014 at 08:47:05 PM, Christian Engelmayer wrote: Fix leakage of memory for struct aead_request that is allocated via aead_request_alloc() but not released via aead_request_free(). Reported by Coverity - CID 1163869. Signed-off-by: Christian Engelmayer cenge...@gmx.at

Re: [PATCH crypto 2/2] crypto: caam - add allocation failure handling in SPRINTFCAT macro

2014-04-22 Thread Marek Vasut
On Friday, April 18, 2014 at 12:01:42 PM, Horia Geanta wrote: GFP_ATOMIC memory allocation could fail. In this case, avoid NULL pointer dereference and notify user. Cc: sta...@vger.kernel.org # 3.2+ If I recall correctly, you need to get the patch accepted into mainline before sending it

Re: [PATCH 2/3] crypto: Fix potential leak in test_aead_speed() if crypto_alloc_aead() fails

2014-04-22 Thread Marek Vasut
On Monday, April 21, 2014 at 08:46:40 PM, Christian Engelmayer wrote: Fix a potential memory leak in the error handling of test_aead_speed(). In case crypto_alloc_aead() fails, the function returns without going through the centralized cleanup path. Reported by Coverity - CID 1163870.

Re: [PATCH 1/3] crypto: Fix potential leak in test_aead_speed() if aad_size is too big

2014-04-22 Thread Marek Vasut
On Monday, April 21, 2014 at 08:45:59 PM, Christian Engelmayer wrote: Fix a potential memory leak in the error handling of test_aead_speed(). In case the size check on the associate data length parameter fails, the function goes through the wrong exit label. Reported by Coverity - CID 1163870.