Commit da7798a7 authored by Loganaden Velvindron's avatar Loganaden Velvindron Committed by James Morris

crypto : asymmetric_keys : verify_pefile:zero memory content before freeing

Signed-off-by: default avatarLoganaden Velvindron <logan@hackers.mu>
Signed-off-by: default avatarYasir Auleear <yasirmx@hackers.mu>
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarJames Morris <james.l.morris@oracle.com>
parent a7739544
...@@ -381,7 +381,7 @@ static int pefile_digest_pe(const void *pebuf, unsigned int pelen, ...@@ -381,7 +381,7 @@ static int pefile_digest_pe(const void *pebuf, unsigned int pelen,
} }
error: error:
kfree(desc); kzfree(desc);
error_no_desc: error_no_desc:
crypto_free_shash(tfm); crypto_free_shash(tfm);
kleave(" = %d", ret); kleave(" = %d", ret);
...@@ -450,6 +450,6 @@ int verify_pefile_signature(const void *pebuf, unsigned pelen, ...@@ -450,6 +450,6 @@ int verify_pefile_signature(const void *pebuf, unsigned pelen,
ret = pefile_digest_pe(pebuf, pelen, &ctx); ret = pefile_digest_pe(pebuf, pelen, &ctx);
error: error:
kfree(ctx.digest); kzfree(ctx.digest);
return ret; return ret;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment