HomeFreeBSD

kern: zero out stack buffer after copying out random bits

Description

kern: zero out stack buffer after copying out random bits

The kern.arandom sysctl handler uses an intermediate buffer on the stack
to hold random data that it subsequently copies out to the sysctl
request. Err on the side of caution and zero out the stack buffer after
we're done with it to avoid a potential entropy leak later on.

Reviewed by: cem, emaste, markj

(cherry picked from commit 5862c891bb7c588aa00538d85eb26ffe77d3f709)

Details

Provenance
kevansAuthored on Jul 15 2024, 8:17 PM
Parents
rG2e57144df7e1: stand: module: unlink the entire tail when dependencies fail to load
Branches
Unknown
Tags
Unknown