]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
fix: dev: wipe hmac keys correctly pre-3.0 libcrypto
authorAydın Mercan <aydin@isc.org>
Fri, 6 Feb 2026 12:04:28 +0000 (15:04 +0300)
committerAydın Mercan <aydin@isc.org>
Fri, 6 Feb 2026 12:04:28 +0000 (15:04 +0300)
A lingering `sizeof` from the prototype era of !11094 caused the
key-wipe in `isc_hmac_key_destroy` to use `sizeof(key->len)` instead of
`key->len` for the length argument of `isc_safe_memwipe`.

This results in a buffer overflow of zero bytes in HMAC keys that are
less than 4 bytes. As such, the overflow can only be visibile in keys
that are less than 32-bits, which is beyond broken and creating such
keys are only possible in testing.

Therefore, this change is *not* a security fix since the conditions are
never reachable in any imaginable deployment scenario.

Builds that use OpenSSL >=3.0 are unaffected as the `sizeof` was only
remaining in pre-3.0 builds.

Closes #5732

Merge branch '5732-invalid-params-to-isc_safe_memwipe' into 'main'

See merge request isc-projects/bind9!11520


Trivial merge