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
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D45978

Details

Provenance
kevansAuthored on Jul 15 2024, 8:17 PM
Reviewer
cem
Differential Revision
D45978: kern: zero out stack buffer after copying out random bits
Parents
rG9cc06bf7aa28: amd64 GENERIC: Switch uart hints from "isa" to "acpi"
Branches
Unknown
Tags
Unknown