crypto: brcm - Avoid double free in ahash_finup()
PATCH 1/1 crypto: brcm - Avoid double free in ahash_finup()
In Broadcom SPU driver, in case where incremental hash is done in software in ahash_finup(), tmpbuf was freed twice.
Reported-by Dan Carpenter <[email protected]>
Signed-off-by Rob Rice <[email protected]>
--- drivers/crypto/bcm/cipher.c | 1 - 1 file changed, 1 deletion(-)
drivers/crypto/bcm/cipher.c +0 -1
@@ -2331,7 +2331,6 @@ static int ahash_finup(struct ahash_request *req)/* Call synchronous update */ ret =crypto_shash_finup (ctx->shash, tmpbuf, req->nbytes, req->result); -kfree (tmpbuf); }else {/* Otherwise call the internal function which uses SPU hw */ return __ahash_finup (req);
Signature · 1 line
2.1.0
Herbert Xu
maintainerQuoted 6 lines · Rob Rice
In Broadcom SPU driver, in case where incremental hash is done in software in
ahash_finup(), tmpbuf was freed twice.Reported-by Dan Carpenter <[email protected]>Signed-off-by Rob Rice <[email protected]>
Patch applied. Thanks.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt