]> git.ipfire.org Git - thirdparty/shadow.git/commit
Ensure memory cleaning 488/head
authorChristian Göttsche <cgzones@googlemail.com>
Mon, 3 Jan 2022 14:03:34 +0000 (15:03 +0100)
committerChristian Göttsche <cgzones@googlemail.com>
Mon, 3 Jan 2022 14:09:39 +0000 (15:09 +0100)
commit7a799ebb2c304010c1aad16490e7354c7e7659a2
treeb5bb6cacb2bcdc3ba3fc8a183905bc8c485b2699
parenteccf1c569c7ac3b9e3b535c91b6ed3c329e9ec8c
Ensure memory cleaning

Compilers are allowed to and do optimize memset(3) calls away for
pointers not accessed in the future. Since the memzero wrappers purpose
is exactly to unconditionally override memory (e.g. for stored
passwords) do not implement via regular memset(3), but via either
memset_s(3), explicit_bzero(3) or a hand written implementation using
volatile pointers.

See https://wiki.sei.cmu.edu/confluence/display/c/MSC06-C.+Beware+of+compiler+optimizations
configure.ac
lib/defines.h