diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2016-11-17 14:07:58 (GMT) |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2016-11-18 14:34:10 (GMT) |
commit | a8348bca2944d397a528772f5c0ccb47a8b58af4 (patch) | |
tree | a3afca8b46f4b4fa4c28755681821a178bfa7e18 /crypto/ecc.c | |
parent | a5a40d4624cd2328c69768f6eb41716fc249d7be (diff) | |
download | linux-a8348bca2944d397a528772f5c0ccb47a8b58af4.tar.xz |
crypto: algif_hash - Fix NULL hash crash with shash
Recently algif_hash has been changed to allow null hashes. This
triggers a bug when used with an shash algorithm whereby it will
cause a crash during the digest operation.
This patch fixes it by avoiding the digest operation and instead
doing an init followed by a final which avoids the buggy code in
shash.
This patch also ensures that the result buffer is freed after an
error so that it is not returned as a genuine hash result on the
next recv call.
The shash/ahash wrapper code will be fixed later to handle this
case correctly.
Fixes: 493b2ed3f760 ("crypto: algif_hash - Handle NULL hashes correctly")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Tested-by: Laura Abbott <labbott@redhat.com>
Diffstat (limited to 'crypto/ecc.c')
0 files changed, 0 insertions, 0 deletions