[PATCH 1/2] X.509: Fix double free in x509_cert_parse() [ver #3]

2016-11-24 Thread David Howells
From: Andrey Ryabinin We shouldn't free cert->pub->key in x509_cert_parse() because x509_free_certificate() also does this: BUG: Double free or freeing an invalid pointer ... Call Trace: [] dump_stack+0x63/0x83 []

[PATCH 2/2] mpi: Fix NULL ptr dereference in mpi_powm() [ver #3]

2016-11-24 Thread David Howells
From: Andrey Ryabinin This fixes CVE-2016-8650. If mpi_powm() is given a zero exponent, it wants to immediately return either 1 or 0, depending on the modulus. However, if the result was initalised with zero limb space, no limbs space is allocated and a NULL-pointer

[PATCH 0/2] KEYS: Fixes [ver #3]

2016-11-24 Thread David Howells
be found here also: http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=keys-fixes Tagged thusly: git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git keys-fixes-20161124-3 David --- Andrey Ryabinin (2): X.509: Fix double free

[PATCH 0/4] crypto: CRCT10DIF support for ARM and arm64

2016-11-24 Thread Ard Biesheuvel
First of all, apologies to Yue Haibing for stealing his thunder, to some extent. But after reviewing (and replying to) his patch, I noticed that his code is not original code, but simply a transliteration of the existing Intel code that resides in arch/x86/crypto/crct10dif-pcl-asm_64.S, but with

[PATCH 1/4] crypto: testmgr - avoid overlap in chunked tests

2016-11-24 Thread Ard Biesheuvel
The IDXn offsets are chosen such that tap values (which may go up to 255) end up overlapping in the xbuf allocation. In particular, IDX1 and IDX3 are too close together, so update IDX3 to avoid this issue. Signed-off-by: Ard Biesheuvel --- crypto/testmgr.c | 2 +- 1

[PATCH 4/4] crypto: arm/crct10dif - port x86 SSE implementation to ARM

2016-11-24 Thread Ard Biesheuvel
This is a straight transliteration of the Intel algorithm implemented using SSE and PCLMULQDQ instructions that resides under in the file arch/x86/crypto/crct10dif-pcl-asm_64.S. Signed-off-by: Ard Biesheuvel --- arch/arm/crypto/Kconfig| 5 +

[PATCH 2/4] crypto: testmgr - add/enhance test cases for CRC-T10DIF

2016-11-24 Thread Ard Biesheuvel
The existing test cases only exercise a small slice of the various possible code paths through the x86 SSE/PCLMULQDQ implementation, and the upcoming ports of it for arm64. So add one that exceeds 256 bytes in size, and convert another to a chunked test. Signed-off-by: Ard Biesheuvel

[PATCH 3/4] crypto: arm64/crct10dif - port x86 SSE implementation to arm64

2016-11-24 Thread Ard Biesheuvel
This is a straight transliteration of the Intel algorithm implemented using SSE and PCLMULQDQ instructions that resides under in the file arch/x86/crypto/crct10dif-pcl-asm_64.S. Suggested-by: YueHaibing Signed-off-by: Ard Biesheuvel ---

Re: [PATCH 4/4] crypto: arm/crct10dif - port x86 SSE implementation to ARM

2016-11-24 Thread Ard Biesheuvel
On 24 November 2016 at 15:43, Ard Biesheuvel wrote: > This is a straight transliteration of the Intel algorithm implemented > using SSE and PCLMULQDQ instructions that resides under in the file > arch/x86/crypto/crct10dif-pcl-asm_64.S. > > Signed-off-by: Ard Biesheuvel