Page MenuHomeFreeBSD

kern: zero out stack buffer after copying out random bits
ClosedPublic

Authored by kevans on Jul 15 2024, 3:56 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 10, 2:23 PM
Unknown Object (File)
Thu, Nov 7, 4:36 PM
Unknown Object (File)
Thu, Nov 7, 2:35 PM
Unknown Object (File)
Thu, Oct 31, 4:16 PM
Unknown Object (File)
Oct 8 2024, 11:44 PM
Unknown Object (File)
Sep 18 2024, 8:18 PM
Unknown Object (File)
Sep 14 2024, 2:52 PM
Unknown Object (File)
Sep 14 2024, 2:41 AM
Subscribers

Details

Summary

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.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable