projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eafa266
)
crypto: brcm - Avoid double free in ahash_finup()
author
Rob Rice
<
[email protected]
>
Tue, 14 Feb 2017 17:45:52 +0000
(12:45 -0500)
committer
Herbert Xu
<
[email protected]
>
Wed, 15 Feb 2017 05:23:51 +0000
(13:23 +0800)
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]
>
Signed-off-by: Herbert Xu <
[email protected]
>
drivers/crypto/bcm/cipher.c
patch
|
blob
|
history
diff --git
a/drivers/crypto/bcm/cipher.c
b/drivers/crypto/bcm/cipher.c
index a654a01ff2ba29f5e2dc5f5d1d002902e53cfee2..cc0d5b98006ea9e8f66faf08cdb33f63fd77092a 100644
(file)
--- a/
drivers/crypto/bcm/cipher.c
+++ b/
drivers/crypto/bcm/cipher.c
@@
-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);