Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge git://github.com/herbertx/crypto

* git://github.com/herbertx/crypto:
crypto: ghash - Avoid null pointer dereference if no key is set

+6
+6
crypto/ghash-generic.c
··· 67 67 struct ghash_ctx *ctx = crypto_shash_ctx(desc->tfm); 68 68 u8 *dst = dctx->buffer; 69 69 70 + if (!ctx->gf128) 71 + return -ENOKEY; 72 + 70 73 if (dctx->bytes) { 71 74 int n = min(srclen, dctx->bytes); 72 75 u8 *pos = dst + (GHASH_BLOCK_SIZE - dctx->bytes); ··· 121 118 struct ghash_desc_ctx *dctx = shash_desc_ctx(desc); 122 119 struct ghash_ctx *ctx = crypto_shash_ctx(desc->tfm); 123 120 u8 *buf = dctx->buffer; 121 + 122 + if (!ctx->gf128) 123 + return -ENOKEY; 124 124 125 125 ghash_flush(ctx, dctx); 126 126 memcpy(dst, buf, GHASH_BLOCK_SIZE);