mirror of
https://github.com/opnsense/src.git
synced 2026-02-03 20:49:35 -05:00
Prevent a potentially sufficiently smart compiler from optimising away our attempts to clear sensitive buffers. A related change was discussed and rejected in D16059, but I don't believe the reasoning there applies: the code clearly documents its intent that the `memset` calls clear sensitive buffers so they don't hang around. `explicit_bzero` is the appropriate function for this purpose. A potential performance disadvantage seems less important: the functions in crypt are specifically designed to be slow, so a few extra calls to guarantee that sensitive buffers are cleared does not significantly affect runtime. See also: D16059 Reviewed by: delphij, kevans MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D47037 (cherry picked from commit a2c0d2026fb422ade2171da4bc6d5d2773b268a6) |
||
|---|---|---|
| .. | ||
| tests | ||
| crypt-md5.c | ||
| crypt-nthash.c | ||
| crypt-sha256.c | ||
| crypt-sha512.c | ||
| crypt.3 | ||
| crypt.c | ||
| crypt.h | ||
| Makefile | ||
| Makefile.depend | ||
| misc.c | ||