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 >

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

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 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 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 ma...@denx.de 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

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 ma...@denx.de 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

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 >

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.

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

2014-04-21 Thread Christian Engelmayer
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. Signed-off-by: Christian Engelmayer --- crypto/tcrypt.c | 14

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

2014-04-21 Thread Christian Engelmayer
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. Signed-off-by: Christian Engelmayer cenge...@gmx.at --- crypto/tcrypt.c