Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1462339

[PATCH 3.14 19/29] crypto: gcm - Filter out async ghash if necessary

From Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Newsgroups linux.kernel
Subject [PATCH 3.14 19/29] crypto: gcm - Filter out async ghash if necessary
Date 2016-08-14 22:20 +0200
Message-ID <s6a2Z-4oa-23@gated-at.bofh.it> (permalink)
References <s69Tj-4kH-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


3.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Herbert Xu <herbert@gondor.apana.org.au>

commit b30bdfa86431afbafe15284a3ad5ac19b49b88e3 upstream.

As it is if you ask for a sync gcm you may actually end up with
an async one because it does not filter out async implementations
of ghash.

This patch fixes this by adding the necessary filter when looking
for ghash.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 crypto/gcm.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/crypto/gcm.c
+++ b/crypto/gcm.c
@@ -716,7 +716,9 @@ static struct crypto_instance *crypto_gc
 
 	ghash_alg = crypto_find_alg(ghash_name, &crypto_ahash_type,
 				    CRYPTO_ALG_TYPE_HASH,
-				    CRYPTO_ALG_TYPE_AHASH_MASK);
+				    CRYPTO_ALG_TYPE_AHASH_MASK |
+				    crypto_requires_sync(algt->type,
+							 algt->mask));
 	if (IS_ERR(ghash_alg))
 		return ERR_CAST(ghash_alg);
 

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 3.14 00/29] 3.14.76-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:10 +0200
  [PATCH 3.14 16/29] block: fix use-after-free in seq file Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:10 +0200
  [PATCH 3.14 02/29] mm: migrate dirty page without clear_page_dirty_for_io etc Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:10 +0200
  [PATCH 3.14 10/29] KEYS: 64-bit MIPS needs to use compat_sys_keyctl for 32-bit userspace Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:10 +0200
  [PATCH 3.14 09/29] arm: oabi compat: add missing access checks Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:10 +0200
  [PATCH 3.14 12/29] random: strengthen input validation for RNDADDTOENTCNT Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:10 +0200
  [PATCH 3.14 05/29] sctp: Prevent soft lockup when sctp_accept() is called during a timeout event Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:20 +0200
  [PATCH 3.14 25/29] bonding: set carrier off for devices created through netlink Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:20 +0200
  [PATCH 3.14 01/29] USB: fix invalid memory access in hub_activate() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:20 +0200
  [PATCH 3.14 22/29] ext4: fix deadlock during page writeback Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:20 +0200
  [PATCH 3.14 24/29] ext4: short-cut orphan cleanup on error Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:20 +0200
  [PATCH 3.14 28/29] [PATCH 1/8] tcp: make challenge acks less predictable Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:20 +0200
  [PATCH 3.14 11/29] apparmor: fix ref count leak when profile sha1 hash is read Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:20 +0200
  [PATCH 3.14 19/29] crypto: gcm - Filter out async ghash if necessary Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-14 22:20 +0200
  Re: [PATCH 3.14 00/29] 3.14.76-stable review Guenter Roeck <linux@roeck-us.net> - 2016-08-15 16:50 +0200
  Re: [PATCH 3.14 00/29] 3.14.76-stable review Shuah Khan <shuah.kh@samsung.com> - 2016-08-16 06:10 +0200

csiph-web