[PATCH 1/2] x86/crypto/sha256-mb: fix panic due to unaligned access

2017-10-16 Thread Andrey Ryabinin
that alignment. Unaligned vmovdqa will generate GP fault. Fix this by replacing vmovdqa with vmovdqu which doesn't have alignment requirements. Fixes: a377c6b1876e ("crypto: sha256-mb - submit/flush routines for AVX2") Reported-by: Josh Poimboeuf <jpoim...@redhat.com> Signed-off-by:

[PATCH 2/2] x86/crypto/sha1-mb: fix panic due to unaligned access

2017-10-16 Thread Andrey Ryabinin
. Unaligned vmovdqa will generate GP fault. Fix this by replacing vmovdqa with vmovdqu which doesn't have alignment requirements. Fixes: 2249cbb53ead ("crypto: sha-mb - SHA1 multibuffer submit and flush routines for AVX2") Signed-off-by: Andrey Ryabinin <aryabi...@virtuozzo.

Re: [lkp-robot] [x86/kconfig] 81d3871900: BUG:unable_to_handle_kernel

2017-10-13 Thread Andrey Ryabinin
On 10/13/2017 07:45 AM, Josh Poimboeuf wrote: > On Thu, Oct 12, 2017 at 12:05:04PM -0500, Christopher Lameter wrote: >> On Wed, 11 Oct 2017, Josh Poimboeuf wrote: >> >>> I failed to add the slab maintainers to CC on the last attempt. Trying >>> again. >> >> >> Hmmm... Yea. SLOB is rarely used and

[PATCH] mpi: Fix NULL ptr dereference in mpi_powm()

2016-11-23 Thread Andrey Ryabinin
/fulldisclosure/2016/Nov/76 [2] http://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=patch;h=6e1adb05d290aeeb1c230c763970695f4a538526 Fixes: cdec9cb5167a ("crypto: GnuPG based MPI lib - source files (part 1)") Signed-off-by: Andrey Ryabinin <aryabi...@virtuozzo.com> Cc: <sta

[PATCH] X.509: Fix double free in x509_cert_parse()

2016-11-23 Thread Andrey Ryabinin
/0x2a0 [] entry_SYSCALL_64_fastpath+0x1e/0xad Fixes: db6c43bd2132 ("crypto: KEYS: convert public key and digsig asym to the akcipher api") Signed-off-by: Andrey Ryabinin <aryabi...@virtuozzo.com> Cc: <sta...@vger.kernel.org> --- crypto/asymmetric_keys/x509_cert_parser.c | 1 - 1 file change

[PATCH stable 3.10.y 17/18] crypto: cryptd - initialize child shash_desc on import

2016-10-27 Thread Andrey Ryabinin
() Cc: sta...@vger.kernel.org Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> Signed-off-by: Herbert Xu <herb...@gondor.apana.org.au> Signed-off-by: Andrey Ryabinin <aryabi...@virtuozzo.com> --- crypto/cryptd.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions

[PATCH stable 3.10.y 12/18] crypto: af_alg - Forbid bind(2) when nokey child sockets are present

2016-10-27 Thread Andrey Ryabinin
ockets have references to the tfm object which bind(2) will destroy. Cc: sta...@vger.kernel.org Signed-off-by: Herbert Xu <herb...@gondor.apana.org.au> Signed-off-by: Andrey Ryabinin <aryabi...@virtuozzo.com> --- crypto/af_alg.c | 16 +++- 1 file changed, 7 insertions(+), 9

[PATCH stable 3.10.y 06/18] crypto: algif_hash - Require setkey before accept(2)

2016-10-27 Thread Andrey Ryabinin
hat we return -ENOKEY instead of proceeding. This patch also adds a compatibility path to support old applications that do acept(2) before setkey. Cc: sta...@vger.kernel.org Signed-off-by: Herbert Xu <herb...@gondor.apana.org.au> Signed-off-by: Andrey Ryabinin <aryabi...@virtuozzo.c

[PATCH stable 3.10.y 00/18] Backport crypto fixes.

2016-10-27 Thread Andrey Ryabinin
While fuzzing our 3.10 based kernel we observed some crashes, e.g: http://lkml.kernel.org/r/ It appears that 3.10-stable lacks some crypto related fixes. Here is my attempt to backport them. Many patches didn't apply

[PATCH stable 3.10.y 08/18] crypto: algif_skcipher - Add key check exception for cipher_null

2016-10-27 Thread Andrey Ryabinin
<herb...@gondor.apana.org.au> Signed-off-by: Andrey Ryabinin <aryabi...@virtuozzo.com> --- crypto/algif_skcipher.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/algif_skcipher.c b/crypto/algif_skcipher.c index db5f0f0..4677a45 100644 --- a/crypto/algif_skcip

[PATCH stable 3.10.y 11/18] crypto: algif_skcipher - Remove custom release parent function

2016-10-27 Thread Andrey Ryabinin
<herb...@gondor.apana.org.au> Signed-off-by: Andrey Ryabinin <aryabi...@virtuozzo.com> --- crypto/algif_skcipher.c | 43 +++ 1 file changed, 3 insertions(+), 40 deletions(-) diff --git a/crypto/algif_skcipher.c b/crypto/algif_skcipher.c index 4677a

[PATCH stable 3.10.y 02/18] crypto: af_alg - Disallow bind/setkey/... after accept(2)

2016-10-27 Thread Andrey Ryabinin
el.org Reported-by: Dmitry Vyukov <dvyu...@google.com> Signed-off-by: Herbert Xu <herb...@gondor.apana.org.au> Signed-off-by: Andrey Ryabinin <aryabi...@virtuozzo.com> --- crypto/af_alg.c | 35 --- include/crypto/if_alg.h | 8 +++- 2 file

[PATCH stable 3.10.y 16/18] crypto: shash - Fix has_key setting

2016-10-27 Thread Andrey Ryabinin
hash - Add crypto_ahash_has_setkey") Cc: sta...@vger.kernel.org Reported-by: Stephan Mueller <smuel...@chronox.de> Signed-off-by: Herbert Xu <herb...@gondor.apana.org.au> Tested-by: Stephan Mueller <smuel...@chronox.de> Signed-off-by: Andrey Ryabinin <aryabi...@virtuozzo.co

[PATCH stable 3.10.y 15/18] crypto: algif_skcipher - Load TX SG list after waiting

2016-10-27 Thread Andrey Ryabinin
: Herbert Xu <herb...@gondor.apana.org.au> Tested-by: Dmitry Vyukov <dvyu...@google.com> Signed-off-by: Andrey Ryabinin <aryabi...@virtuozzo.com> --- crypto/algif_skcipher.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/crypto/algif_skciph

[PATCH stable 3.10.y 05/18] crypto: hash - Add crypto_ahash_has_setkey

2016-10-27 Thread Andrey Ryabinin
na.org.au> Signed-off-by: Andrey Ryabinin <aryabi...@virtuozzo.com> --- crypto/ahash.c| 5 - crypto/shash.c| 4 +++- include/crypto/hash.h | 6 ++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/crypto/ahash.c b/crypto/ahash.c index bcd5efc..781a8a7 1

[PATCH stable 3.10.y 10/18] crypto: algif_hash - Remove custom release parent function

2016-10-27 Thread Andrey Ryabinin
<herb...@gondor.apana.org.au> Signed-off-by: Andrey Ryabinin <aryabi...@virtuozzo.com> --- crypto/algif_hash.c | 43 +++ 1 file changed, 3 insertions(+), 40 deletions(-) diff --git a/crypto/algif_hash.c b/crypto/algif_hash.c index 7bc3f89..512aa36 1

[PATCH stable 3.10.y 07/18] crypto: skcipher - Add crypto_skcipher_has_setkey

2016-10-27 Thread Andrey Ryabinin
; Signed-off-by: Andrey Ryabinin <aryabi...@virtuozzo.com> --- crypto/ablkcipher.c| 2 ++ crypto/blkcipher.c | 1 + include/linux/crypto.h | 8 3 files changed, 11 insertions(+) diff --git a/crypto/ablkcipher.c b/crypto/ablkcipher.c index ebcec74..2b6dd74 100644 --- a/crypto/

[PATCH stable 3.10.y 04/18] crypto: algif_skcipher - Add nokey compatibility path

2016-10-27 Thread Andrey Ryabinin
; Signed-off-by: Andrey Ryabinin <aryabi...@virtuozzo.com> --- crypto/algif_skcipher.c | 149 ++-- 1 file changed, 144 insertions(+), 5 deletions(-) diff --git a/crypto/algif_skcipher.c b/crypto/algif_skcipher.c index c4c121a..db5f0f0 1

[PATCH stable 3.10.y 18/18] crypto: skcipher - Fix blkcipher walk OOM crash

2016-10-27 Thread Andrey Ryabinin
xiakaixu <xiaka...@huawei.com> Reported-by: Ard Biesheuvel <ard.biesheu...@linaro.org> Signed-off-by: Herbert Xu <herb...@gondor.apana.org.au> Tested-by: Ard Biesheuvel <ard.biesheu...@linaro.org> Signed-off-by: Andrey Ryabinin <aryabi...@virtuozzo.com> --- crypto/blk

[PATCH stable 3.10.y 14/18] crypto: algif_skcipher - Fix race condition in skcipher_check_key

2016-10-27 Thread Andrey Ryabinin
<herb...@gondor.apana.org.au> Signed-off-by: Andrey Ryabinin <aryabi...@virtuozzo.com> --- crypto/algif_skcipher.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/crypto/algif_skcipher.c b/crypto/algif_skcipher.c index a7800b7..13fd26e 100644 --- a/crypt

[PATCH stable 3.10.y 09/18] crypto: af_alg - Allow af_af_alg_release_parent to be called on nokey path

2016-10-27 Thread Andrey Ryabinin
From: Herbert Xu <herb...@gondor.apana.org.au> commit 6a935170a980024dd29199e9dbb5c4da4767a1b9 upstream. This patch allows af_alg_release_parent to be called even for nokey sockets. Cc: sta...@vger.kernel.org Signed-off-by: Herbert Xu <herb...@gondor.apana.org.au> Signed-off-by: And

[PATCH stable 3.10.y 13/18] crypto: algif_hash - Fix race condition in hash_check_key

2016-10-27 Thread Andrey Ryabinin
<herb...@gondor.apana.org.au> Signed-off-by: Andrey Ryabinin <aryabi...@virtuozzo.com> --- crypto/algif_hash.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/crypto/algif_hash.c b/crypto/algif_hash.c index 512aa36..d11d431 100644 --- a/crypto/algif_h

[PATCH stable 3.10.y 01/18] crypto: algif_skcipher - Require setkey before accept(2)

2016-10-27 Thread Andrey Ryabinin
t been done on the socket yet. Cc: sta...@vger.kernel.org Reported-by: Dmitry Vyukov <dvyu...@google.com> Signed-off-by: Herbert Xu <herb...@gondor.apana.org.au> Tested-by: Dmitry Vyukov <dvyu...@google.com> Signed-off-by: Andrey Ryabinin <aryabi...@virtuozzo.com> ---

[PATCH stable 3.10.y 03/18] crypto: af_alg - Add nokey compatibility path

2016-10-27 Thread Andrey Ryabinin
; Signed-off-by: Andrey Ryabinin <aryabi...@virtuozzo.com> --- crypto/af_alg.c | 13 - include/crypto/if_alg.h | 2 ++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/crypto/af_alg.c b/crypto/af_alg.c index 0ca108f..de130c2 100644 --- a/crypto/af_alg.c +++

[PATCH v2] crypto/testmgr: don't copy from source IV too much

2015-09-10 Thread Andrey Ryabinin
While the destination buffer 'iv' is MAX_IVLEN size, the source 'template[i].iv' could be smaller, thus memcpy may read read invalid memory. Use crypto_skcipher_ivsize() to get real ivsize and pass it to memcpy. Signed-off-by: Andrey Ryabinin <aryabi...@virtuozzo.com> --- crypto/testmgr

Re: [PATCH] crypto/testmgr: don't copy from source IV too much

2015-09-04 Thread Andrey Ryabinin
On 09/03/2015 04:20 PM, Herbert Xu wrote: > On Thu, Sep 03, 2015 at 02:32:00PM +0300, Andrey Ryabinin wrote: >> While the destination buffer 'iv' is MAX_IVLEN size, >> the source 'template[i].iv' could be smaller. Thus >> copying it via memcpy() leads to invalid memory a

[PATCH] crypto/testmgr: don't copy from source IV too much

2015-09-03 Thread Andrey Ryabinin
While the destination buffer 'iv' is MAX_IVLEN size, the source 'template[i].iv' could be smaller. Thus copying it via memcpy() leads to invalid memory access. Use strlcpy() instead. Signed-off-by: Andrey Ryabinin <aryabi...@odin.com> --- crypto/testmgr.c | 4 ++-- 1 file changed, 2 inse

[PATCH] x86/crypto/ghash-intel: specify context size for ghash async algorithm

2015-09-03 Thread Andrey Ryabinin
Currently context size (cra_ctxsize) doesn't specified for ghash_async_alg. Which means it's zero. Thus crypto_create_tfm() doesn't allocate needed space for ghash_async_ctx, so any read/write to ctx (e.g. in ghash_async_init_tfm()) is not valid. Signed-off-by: Andrey Ryabinin <aryabi...@odin.

Re: [PATCH] mm: kill kmemcheck

2015-03-11 Thread Andrey Ryabinin
own 'libsanitzer' in kernel. So I'm a little bit bitter about this, as you can see. :) -- Best regards, Andrey Ryabinin -- To unsubscribe from this list: send the line unsubscribe linux-crypto in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org

[PATCH] crypto: ccp: terminate ccp_support array with empty element

2015-01-21 Thread Andrey Ryabinin
x86_match_cpu() expects array of x86_cpu_ids terminated with empty element. Signed-off-by: Andrey Ryabinin a.ryabi...@samsung.com --- drivers/crypto/ccp/ccp-dev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/ccp/ccp-dev.c b/drivers/crypto/ccp/ccp-dev.c index c6e6171