crypto : asymmetric_keys : verify_pefile:zero memory content before freeing
Signed-off-by: Loganaden Velvindron <logan@hackers.mu> Signed-off-by: Yasir Auleear <yasirmx@hackers.mu> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: James Morris <james.l.morris@oracle.com>
This commit is contained in:
parent
a77395447b
commit
da7798a7b6
1 changed files with 2 additions and 2 deletions
|
@ -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,
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue