projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
05c292a
)
crypto: ccree - use correct internal state sizes for export
author
Gilad Ben-Yossef
<gilad@benyossef.com>
Thu, 18 Apr 2019 13:39:02 +0000
(16:39 +0300)
committer
Herbert Xu
<herbert@gondor.apana.org.au>
Thu, 25 Apr 2019 07:38:15 +0000
(15:38 +0800)
We were computing the size of the import buffer based on the digest size
but the 318 and 224 byte variants use 512 and 256 bytes internal state
sizes respectfully, thus causing the import buffer to overrun.
Fix it by using the right sizes.
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Cc: stable@vger.kernel.org # v4.19+
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/ccree/cc_hash.c
patch
|
blob
|
history
diff --git
a/drivers/crypto/ccree/cc_hash.c
b/drivers/crypto/ccree/cc_hash.c
index
940101f
..
36e9fb4
100644
(file)
--- a/
drivers/crypto/ccree/cc_hash.c
+++ b/
drivers/crypto/ccree/cc_hash.c
@@
-1633,7
+1633,7
@@
static struct cc_hash_template driver_hash[] = {
.setkey = cc_hash_setkey,
.halg = {
.digestsize = SHA224_DIGEST_SIZE,
- .statesize = CC_STATE_SIZE(SHA2
24
_DIGEST_SIZE),
+ .statesize = CC_STATE_SIZE(SHA2
56
_DIGEST_SIZE),
},
},
.hash_mode = DRV_HASH_SHA224,
@@
-1660,7
+1660,7
@@
static struct cc_hash_template driver_hash[] = {
.setkey = cc_hash_setkey,
.halg = {
.digestsize = SHA384_DIGEST_SIZE,
- .statesize = CC_STATE_SIZE(SHA
384
_DIGEST_SIZE),
+ .statesize = CC_STATE_SIZE(SHA
512
_DIGEST_SIZE),
},
},
.hash_mode = DRV_HASH_SHA384,