]> git.ipfire.org Git - thirdparty/chrony.git/commit
keys: remove misleading memset()
authorMiroslav Lichvar <mlichvar@redhat.com>
Wed, 2 Jul 2025 09:16:36 +0000 (11:16 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Wed, 2 Jul 2025 14:02:31 +0000 (16:02 +0200)
commitd30913e78c7798ec2689a0b56cb3b5fd58631eec
tree441bd04ae1c9e0d35e01a270f530d1de16b02351
parentc5d3be8cc44618441b82cf94540333461eeb3e50
keys: remove misleading memset()

After (re)loading symmetric NTP keys from the key file, there is an
attempt to erase the strings from the stack by calling memset() on the
buffer. However, compilers are free (and have been shown to do) optimize
this call out.

Remove the memset() call to not pretend the stack cannot not contain any
sensitive information. There is no such attempt made for the server and
client NTS keys.

Reported-by: Eric Sesterhenn <eric.sesterhenn@x41-dsec.de>
keys.c