Trivial cleanup. In every code flow in which it is used, the context is finish()ed, which invokes SHA256_Final which is obligated to explicit_bzero out the context already.
Thanks! Will fix.
Will cover in https://reviews.freebsd.org/D16986 .
A commit references this bug: Author: cem Date: Fri Oct 26 21:00:26 UTC 2018 New revision: 339789 URL: https://svnweb.freebsd.org/changeset/base/339789 Log: fortuna: Drop global lock to zero stack variables Also drop explicit zeroing of hash context -- hash finish() operation is expected to do this. PR: 230877 Suggested by: delphij@ Reviewed by: delphij, markm Approved by: secteam (delphij) Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D16986 Changes: head/sys/dev/random/fortuna.c
A commit in branch stable/12 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=1ae8bd9a7d5ac1247db21d8f302d3d0513e08702 commit 1ae8bd9a7d5ac1247db21d8f302d3d0513e08702 Author: Conrad Meyer <cem@FreeBSD.org> AuthorDate: 2018-10-26 21:00:26 +0000 Commit: David E. O'Brien <obrien@FreeBSD.org> CommitDate: 2021-08-06 05:12:10 +0000 fortuna: Drop global lock to zero stack variables Also drop explicit zeroing of hash context -- hash finish() operation is expected to do this. PR: 230877 Suggested by: delphij@ Reviewed by: delphij, markm Approved by: secteam (delphij) Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D16986 (cherry picked from commit 7be4093a844e80a591221e93d03f3daf6a972be3) sys/dev/random/fortuna.c | 65 +++++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 31 deletions(-)