Re: Parity Error on keys used for DES crypto test

2014-04-23 Thread Kim Phillips
On Wed, 23 Apr 2014 10:20:16 +0200 leroy christophe wrote: > I'm altering the Freescale Talitos Driver in order to support the SEC1 > security engine, and I have a big issue with the DES test vectors in > testmgr.h: > > The Sec Engine reports key parity error. > > Looking at the keys defined

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

2014-04-23 Thread Dan Carpenter
On Wed, Apr 23, 2014 at 08:48:34AM -0700, Andy Lutomirski wrote: > BUILD_BUG_ON(NLMSG_MIN_TYPE != CRYPTO_MSG_BASE) might be a better > thing to add, then. I don't have a strong opinion. regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body

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

2014-04-23 Thread Marek Vasut
On Wednesday, April 23, 2014 at 07:43:35 PM, Christian Engelmayer wrote: > On Wed, 23 Apr 2014 01:33:05 +0200, Marek Vasut wrote: > > On Monday, April 21, 2014 at 08:45:59 PM, Christian Engelmayer wrote: > > > + if (aad_size >= PAGE_SIZE) { > > > > On an unrelated note ... Won't if (aad_size > PA

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

2014-04-23 Thread Christian Engelmayer
On Wed, 23 Apr 2014 01:33:05 +0200, Marek Vasut wrote: > On Monday, April 21, 2014 at 08:45:59 PM, Christian Engelmayer wrote: > > + if (aad_size >= PAGE_SIZE) { > > On an unrelated note ... Won't if (aad_size > PAGE_SIZE) be sufficient here? From what I have seen how the buffers are allocated

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

2014-04-23 Thread Marek Vasut
On Wednesday, April 23, 2014 at 07:12:19 PM, Marek Vasut wrote: > On Wednesday, April 23, 2014 at 06:35:45 PM, Horia Geantă wrote: > > [...] > > > > This entire macro looks somewhat strange. > > > > I am trying to fix it with minimal changes, so the patch qualifies for > > -stable. > > This is

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

2014-04-23 Thread Tim Chen
On Mon, 2014-04-21 at 20:47 +0200, 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 Acked. Thanks for f

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

2014-04-23 Thread Tim Chen
On Mon, 2014-04-21 at 20:46 +0200, 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. > > Signed

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

2014-04-23 Thread Tim Chen
On Mon, 2014-04-21 at 20:45 +0200, 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. >

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

2014-04-23 Thread Marek Vasut
On Wednesday, April 23, 2014 at 06:35:45 PM, Horia Geantă wrote: [...] > > This entire macro looks somewhat strange. > > I am trying to fix it with minimal changes, so the patch qualifies for > -stable. This is just broken and you're not fixing it. You're just feeding this slimy monster called

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

2014-04-23 Thread Horia Geantă
On 4/23/2014 2:56 AM, Marek Vasut wrote: 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: # 3.2+ If I recall correctly, you need to get the patch accepted into mainline bef

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

2014-04-23 Thread Andy Lutomirski
On Apr 23, 2014 4:40 AM, "Dan Carpenter" wrote: > > On Tue, Apr 22, 2014 at 12:30:28PM -0700, Andy Lutomirski wrote: > > This is unlikely to be exploitable for anything except an OOPS. > > > > Cc: sta...@vger.kernel.org > > Signed-off-by: Andy Lutomirski > > --- > > > > Notes: > > This is ent

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

2014-04-23 Thread Dan Carpenter
On Tue, Apr 22, 2014 at 12:30:28PM -0700, Andy Lutomirski wrote: > This is unlikely to be exploitable for anything except an OOPS. > > Cc: sta...@vger.kernel.org > Signed-off-by: Andy Lutomirski > --- > > Notes: > This is entirely untested, but it looks obviously correct to me. > > crypto/

RE: RFC: Crypto API User-interface

2014-04-23 Thread Jitendra Lulla
Hi, This is regarding the hash computation over a file with AF_ALG from user space. [without OpenSSL] The following link has the mail from Herbert with subject : "RFC: Crypto API User-interface" http://lwn.net/Articles/410848/ I was trying to take help from the code snippet he has put in his mai

Parity Error on keys used for DES crypto test

2014-04-23 Thread leroy christophe
Hi, I'm altering the Freescale Talitos Driver in order to support the SEC1 security engine, and I have a big issue with the DES test vectors in testmgr.h: The Sec Engine reports key parity error. Looking at the keys defined in testmgr.h for DES3, it looks like there is a real parity issue w